Rust 0.7.0
Released on July 3, 2013
What's Changed
- ~2000 changes, numerous bugfixes
- Language
impls no longer accept a visibility qualifier. Put them on methods- The borrow checker has been rewritten with flow-sensitivity, fixing
- The
selfparameter no longer implicitly means&'self self, - Overloadable compound operators (
+=, etc.) have been temporarily - The
forloop protocol now requiresfor-iterators to returnbool - The
Durabletrait is replaced with the'staticbounds. - Trait default methods work more often.
- Structs with the
#[packed]attribute have byte alignment and - Type parameters bound by
Copymust now be copied explicitly with - It is now illegal to move out of a dereferenced unsafe pointer.
Option<~T>is now represented as a nullable pointer.@mutdoes dynamic borrow checks correctly.- The
mainfunction is only detected at the topmost level of the crate. - Struct fields may no longer be mutable. Use inherited mutability.
- The
#[no_send]attribute makes a type that would otherwise be - The
#[no_freeze]attribute makes a type that would otherwise be - Unbounded recursion will abort the process after reaching the limit
- The
vecs_implicitly_copyablelint mode has been removed. Vectors #[static_assert]makes compile-time assertions about static bools.- At long last, 'argument modes' no longer exist.
- The rarely used
use modstatement no longer exists. - Syntax extensions
fail!andassert!accept~str,&'static strorfmt!-styleEncodable,Decodable,Ord,TotalOrd,TotalEq,DeepClone,- The
bytes!macro returns a vector of bytes for string, u8, char, - Libraries
- The
corecrate was renamed tostd. - The
stdcrate was renamed toextra. - More and improved documentation.
- std:
iteratormodule for external iterator objects. - Many old-style (internal, higher-order function) iterators replaced by
- std: Many old internal vector and string iterators,
- std: The
finalizemethod ofDroprenamed todrop. - std: The
dropmethod now takes&mut selfinstead of&self. - std: The prelude no longer re-exports any modules, only types and traits.
- std: Prelude additions:
print,println,FromStr,ApproxEq,Equiv, - std: New numeric traits:
Fractional,Real,RealExt,Integer,Ratio, - std: Tuple traits and accessors defined for up to 12-tuples, e.g.
- std: Many types implement
Clone. - std:
pathtype renamed toPath. - std:
mutmodule andMuttype removed. - std: Many standalone functions removed in favor of methods and iterators
- std:
reinterpret_castremoved. Usetransmute. - std: ascii string handling in
std::ascii. - std:
Randis implemented for ~/@. - std:
runmodule for spawning processes overhauled. - std: Various atomic types added to
unstable::atomic. - std: Various types implement
Zero. - std:
LinearMapandLinearSetrenamed toHashMapandHashSet. - std: Borrowed pointer functions moved from
ptrtoborrow. - std: Added
os::mkdir_recursive. - std: Added
os::globfunction performs filesystems globs. - std:
FuzzyEqrenamed toApproxEq. - std:
Mapnow definespopandswapmethods. - std:
Cellconstructors converted to static methods. - extra:
rcmodule adds the reference counted pointers,RcandRcMut. - extra:
flatemodule moved fromstdtoextra. - extra:
fileinputmodule for iterating over a series of files. - extra:
Complexnumber type andcomplexmodule. - extra:
Rationalnumber type andrationalmodule. - extra:
BigInt,BigUintimplement numeric and comparison traits. - extra:
termuses terminfo now, is more correct. - extra:
arcfunctions converted to methods. - extra: Implementation of fixed output size variations of SHA-2.
- Tooling
unused_variableslint mode for unused variables (default: warn).unused_unsafelint mode for detecting unnecessaryunsafeblocksunused_mutlint mode for identifying unusedmutqualifiersdead_assignmentlint mode for unread variables (default: warn).unnecessary_allocationlint mode detects some heap allocations that aremissing_doclint mode (default: allow).unreachable_codelint mode (default: warn).- The
rusticommand has been rewritten and a number of bugs addressed. - rustc outputs in color on more terminals.
- rustc accepts a
--link-argsflag to pass arguments to the linker. - rustc accepts a
-Z print-link-argsflag for debugging linkage. - Compiling with
-gwill make the binary record information about - rustdoc has a nicer stylesheet.
- Various improvements to rustdoc.
- Improvements to rustpkg (see the detailed release notes).
Full Changelog
* ~2000 changes, numerous bugfixes
* Language
* impls no longer accept a visibility qualifier. Put them on methods
instead.
* The borrow checker has been rewritten with flow-sensitivity, fixing
many bugs and inconveniences.
* The self parameter no longer implicitly means &'self self,
and can be explicitly marked with a lifetime.
* Overloadable compound operators (+=, etc.) have been temporarily
removed due to bugs.
* The for loop protocol now requires for-iterators to return bool
so they compose better.
* The Durable trait is replaced with the 'static bounds.
* Trait default methods work more often.
* Structs with the #[packed] attribute have byte alignment and
no padding between fields.
* Type parameters bound by Copy must now be copied explicitly with
the copy keyword.
* It is now illegal to move out of a dereferenced unsafe pointer.
* Option<~T> is now represented as a nullable pointer.
* @mut does dynamic borrow checks correctly.
* The main function is only detected at the topmost level of the crate.
The #[main] attribute is still valid anywhere.
* Struct fields may no longer be mutable. Use inherited mutability.
* The #[no_send] attribute makes a type that would otherwise be
Send, not.
* The #[no_freeze] attribute makes a type that would otherwise be
Freeze, not.
* Unbounded recursion will abort the process after reaching the limit
specified by the RUST_MAX_STACK environment variable (default: 1GB).
* The vecs_implicitly_copyable lint mode has been removed. Vectors
are never implicitly copyable.
* #[static_assert] makes compile-time assertions about static bools.
* At long last, 'argument modes' no longer exist.
* The rarely used use mod statement no longer exists.
* Syntax extensions
* fail! and assert! accept ~str, &'static str or fmt!-style
argument list.
* Encodable, Decodable, Ord, TotalOrd, TotalEq, DeepClone,
Rand, Zero and ToStr can all be automatically derived with
#[deriving(...)].
* The bytes! macro returns a vector of bytes for string, u8, char,
and unsuffixed integer literals.
* Libraries
* The core crate was renamed to std.
* The std crate was renamed to extra.
* More and improved documentation.
* std: iterator module for external iterator objects.
* Many old-style (internal, higher-order function) iterators replaced by
implementations of Iterator.
* std: Many old internal vector and string iterators,
incl. any, all. removed.
* std: The finalize method of Drop renamed to drop.
* std: The drop method now takes &mut self instead of &self.
* std: The prelude no longer re-exports any modules, only types and traits.
* std: Prelude additions: print, println, FromStr, ApproxEq, Equiv,
Iterator, IteratorUtil, many numeric traits, many tuple traits.
* std: New numeric traits: Fractional, Real, RealExt, Integer, Ratio,
Algebraic, Trigonometric, Exponential, Primitive.
* std: Tuple traits and accessors defined for up to 12-tuples, e.g.
(0, 1, 2).n2() or (0, 1, 2).n2_ref().
* std: Many types implement Clone.
* std: path type renamed to Path.
* std: mut module and Mut type removed.
* std: Many standalone functions removed in favor of methods and iterators
in vec, str. In the future methods will also work as functions.
* std: reinterpret_cast removed. Use transmute.
* std: ascii string handling in std::ascii.
* std: Rand is implemented for ~/@.
* std: run module for spawning processes overhauled.
* std: Various atomic types added to unstable::atomic.
* std: Various types implement Zero.
* std: LinearMap and LinearSet renamed to HashMap and HashSet.
* std: Borrowed pointer functions moved from ptr to borrow.
* std: Added os::mkdir_recursive.
* std: Added os::glob function performs filesystems globs.
* std: FuzzyEq renamed to ApproxEq.
* std: Map now defines pop and swap methods.
* std: Cell constructors converted to static methods.
* extra: rc module adds the reference counted pointers, Rc and RcMut.
* extra: flate module moved from std to extra.
* extra: fileinput module for iterating over a series of files.
* extra: Complex number type and complex module.
* extra: Rational number type and rational module.
* extra: BigInt, BigUint implement numeric and comparison traits.
* extra: term uses terminfo now, is more correct.
* extra: arc functions converted to methods.
* extra: Implementation of fixed output size variations of SHA-2.
* Tooling
* unused_variables lint mode for unused variables (default: warn).
* unused_unsafe lint mode for detecting unnecessary unsafe blocks
(default: warn).
* unused_mut lint mode for identifying unused mut qualifiers
(default: warn).
* dead_assignment lint mode for unread variables (default: warn).
* unnecessary_allocation lint mode detects some heap allocations that are
immediately borrowed so could be written without allocating (default: warn).
* missing_doc lint mode (default: allow).
* unreachable_code lint mode (default: warn).
* The rusti command has been rewritten and a number of bugs addressed.
* rustc outputs in color on more terminals.
* rustc accepts a --link-args flag to pass arguments to the linker.
* rustc accepts a -Z print-link-args flag for debugging linkage.
* Compiling with -g will make the binary record information about
dynamic borrowcheck failures for debugging.
* rustdoc has a nicer stylesheet.
* Various improvements to rustdoc.
* Improvements to rustpkg (see the detailed release notes).