1+ Version 1.50.0 (2021-02-11)
2+ ============================
3+
4+ Language
5+ -----------------------
6+ - [ You can now use ` const ` values for ` x ` in ` [x; N] ` array expressions.] [ 79270 ]
7+ This has been technically possible since 1.38.0, as it was unintentionally stabilized.
8+ - [ Assignments to ` ManuallyDrop<T> ` union fields are now considered safe.] [ 78068 ]
9+
10+ Compiler
11+ -----------------------
12+ - [ Added tier 3\* support for the ` armv5te-unknown-linux-uclibceabi ` target.] [ 78142 ]
13+ - [ Added tier 3 support for the ` aarch64-apple-ios-macabi ` target.] [ 77484 ]
14+ - [ The ` x86_64-unknown-freebsd ` is now built with the full toolset.] [ 79484 ]
15+
16+ \* Refer to Rust's [ platform support page] [ forge-platform-support ] for more
17+ information on Rust's tiered platform support.
18+
19+ Libraries
20+ -----------------------
21+
22+ - [ ` proc_macro::Punct ` now implements ` PartialEq<char> ` .] [ 78636 ]
23+ - [ ` ops::{Index, IndexMut} ` are now implemented for fixed sized arrays of any length.] [ 74989 ]
24+ - [ On Unix platforms, the ` std::fs::File ` type now has a "niche" of ` -1 ` .] [ 74699 ]
25+ This value cannot be a valid file descriptor, and now means ` Option<File> ` takes
26+ up the same amount of space as ` File ` .
27+
28+ Stabilized APIs
29+ ---------------
30+
31+ - [ ` bool::then ` ]
32+ - [ ` btree_map::Entry::or_insert_with_key ` ]
33+ - [ ` f32::clamp ` ]
34+ - [ ` f64::clamp ` ]
35+ - [ ` hash_map::Entry::or_insert_with_key ` ]
36+ - [ ` Ord::clamp ` ]
37+ - [ ` RefCell::take ` ]
38+ - [ ` slice::fill ` ]
39+ - [ ` UnsafeCell::get_mut ` ]
40+
41+ The following previously stable methods are now ` const ` .
42+
43+ - [ ` IpAddr::is_ipv4 ` ]
44+ - [ ` IpAddr::is_ipv6 ` ]
45+ - [ ` Layout::size ` ]
46+ - [ ` Layout::align ` ]
47+ - [ ` Layout::from_size_align ` ]
48+ - ` pow ` for all integer types.
49+ - ` checked_pow ` for all integer types.
50+ - ` saturating_pow ` for all integer types.
51+ - ` wrapping_pow ` for all integer types.
52+ - ` next_power_of_two ` for all unsigned integer types.
53+ - ` checked_power_of_two ` for all unsigned integer types.
54+
55+ Cargo
56+ -----------------------
57+
58+ - [ Added the ` [build.rustc-workspace-wrapper] ` option.] [ cargo/8976 ]
59+ This option sets a wrapper to execute instead of ` rustc ` , for workspace members only.
60+ - [ ` cargo:rerun-if-changed ` will now, if provided a directory, scan the entire
61+ contents of that directory for changes.] [ cargo/8973 ]
62+ - [ Added the ` --workspace ` flag to the ` cargo update ` command.] [ cargo/8725 ]
63+
64+ Misc
65+ ----
66+
67+ - [ The search results tab and the help button are focusable with keyboard in rustdoc.] [ 79896 ]
68+ - [ Running tests will now print the total time taken to execute.] [ 75752 ]
69+
70+ Compatibility Notes
71+ -------------------
72+
73+ - [ The ` compare_and_swap ` method on atomics has been deprecated.] [ 79261 ] It's
74+ recommended to use the ` compare_exchange ` and ` compare_exchange_weak ` methods instead.
75+ - [ Changes in how ` TokenStream ` s are checked have fixed some cases where you could write
76+ unhygenic ` macro_rules! ` macros.] [ 79472 ]
77+ - [ ` #![test] ` as an inner attribute is now considered unstable like other inner macro
78+ attributes, and reports an error by default through the ` soft_unstable ` lint.] [ 79003 ]
79+ - [ Overriding a ` forbid ` lint at the same level that it was set is now a hard error.] [ 78864 ]
80+ - [ Dropped support for all cloudabi targets.] [ 78439 ]
81+ - [ You can no longer intercept ` panic! ` calls by supplying your own macro.] [ 78343 ] It's
82+ recommended to use the ` #[panic_handler] ` attribute to provide your own implementation.
83+ - [ Semi-colons after item statements (e.g. ` struct Foo {}; ` ) now produce a warning.] [ 78296 ]
84+
85+ [ 74989 ] : https://github.com/rust-lang/rust/pull/74989
86+ [ 79261 ] : https://github.com/rust-lang/rust/pull/79261
87+ [ 79896 ] : https://github.com/rust-lang/rust/pull/79896
88+ [ 79484 ] : https://github.com/rust-lang/rust/pull/79484
89+ [ 79472 ] : https://github.com/rust-lang/rust/pull/79472
90+ [ 79270 ] : https://github.com/rust-lang/rust/pull/79270
91+ [ 79003 ] : https://github.com/rust-lang/rust/pull/79003
92+ [ 78864 ] : https://github.com/rust-lang/rust/pull/78864
93+ [ 78636 ] : https://github.com/rust-lang/rust/pull/78636
94+ [ 78439 ] : https://github.com/rust-lang/rust/pull/78439
95+ [ 78343 ] : https://github.com/rust-lang/rust/pull/78343
96+ [ 78296 ] : https://github.com/rust-lang/rust/pull/78296
97+ [ 78068 ] : https://github.com/rust-lang/rust/pull/78068
98+ [ 75752 ] : https://github.com/rust-lang/rust/pull/75752
99+ [ 74699 ] : https://github.com/rust-lang/rust/pull/74699
100+ [ 78142 ] : https://github.com/rust-lang/rust/pull/78142
101+ [ 77484 ] : https://github.com/rust-lang/rust/pull/77484
102+ [ cargo/8976 ] : https://github.com/rust-lang/cargo/pull/8976
103+ [ cargo/8973 ] : https://github.com/rust-lang/cargo/pull/8973
104+ [ cargo/8725 ] : https://github.com/rust-lang/cargo/pull/8725
105+ [ `IpAddr::is_ipv4` ] : https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_ipv4
106+ [ `IpAddr::is_ipv6` ] : https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_ipv6
107+ [ `Layout::align` ] : https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.align
108+ [ `Layout::from_size_align` ] : https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.from_size_align
109+ [ `Layout::size` ] : https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.size
110+ [ `Ord::clamp` ] : https://doc.rust-lang.org/stable/std/cmp/trait.Ord.html#method.clamp
111+ [ `RefCell::take` ] : https://doc.rust-lang.org/stable/std/cell/struct.RefCell.html#method.take
112+ [ `UnsafeCell::get_mut` ] : https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.get_mut
113+ [ `bool::then` ] : https://doc.rust-lang.org/stable/std/primitive.bool.html#method.then
114+ [ `btree_map::Entry::or_insert_with_key` ] : https://doc.rust-lang.org/stable/std/collections/btree_map/enum.Entry.html#method.or_insert_with_key
115+ [ `f32::clamp` ] : https://doc.rust-lang.org/stable/std/primitive.f32.html#method.clamp
116+ [ `f64::clamp` ] : https://doc.rust-lang.org/stable/std/primitive.f64.html#method.clamp
117+ [ `hash_map::Entry::or_insert_with_key` ] : https://doc.rust-lang.org/stable/std/collections/hash_map/enum.Entry.html#method.or_insert_with_key
118+ [ `slice::fill` ] : https://doc.rust-lang.org/stable/std/primitive.slice.html#method.fill
119+
120+
121+ Version 1.49.0 (2020-12-31)
122+ ============================
123+
124+ Language
125+ -----------------------
126+
127+ - [ Unions can now implement ` Drop ` , and you can now have a field in a union
128+ with ` ManuallyDrop<T> ` .] [ 77547 ]
129+ - [ You can now cast uninhabited enums to integers.] [ 76199 ]
130+ - [ You can now bind by reference and by move in patterns.] [ 76119 ] This
131+ allows you to selectively borrow individual components of a type. E.g.
132+ ``` rust
133+ #[derive(Debug )]
134+ struct Person {
135+ name : String ,
136+ age : u8 ,
137+ }
138+
139+ let person = Person {
140+ name : String :: from (" Alice" ),
141+ age : 20 ,
142+ };
143+
144+ // `name` is moved out of person, but `age` is referenced.
145+ let Person { name , ref age } = person ;
146+ println! (" {} {}" , name , age );
147+ ```
148+
149+ Compiler
150+ -----------------------
151+
152+ - [ Added tier 1\* support for ` aarch64-unknown-linux-gnu ` .] [ 78228 ]
153+ - [ Added tier 2 support for ` aarch64-apple-darwin ` .] [ 75991 ]
154+ - [ Added tier 2 support for ` aarch64-pc-windows-msvc ` .] [ 75914 ]
155+ - [ Added tier 3 support for ` mipsel-unknown-none ` .] [ 78676 ]
156+ - [ Raised the minimum supported LLVM version to LLVM 9.] [ 78848 ]
157+ - [ Output from threads spawned in tests is now captured.] [ 78227 ]
158+ - [ Change os and vendor values to "none" and "unknown" for some targets] [ 78951 ]
159+
160+ \* Refer to Rust's [ platform support page] [ forge-platform-support ] for more
161+ information on Rust's tiered platform support.
162+
163+ Libraries
164+ -----------------------
165+
166+ - [ ` RangeInclusive ` now checks for exhaustion when calling ` contains ` and indexing.] [ 78109 ]
167+ - [ ` ToString::to_string ` now no longer shrinks the internal buffer in the default implementation.] [ 77997 ]
168+
169+ Stabilized APIs
170+ ---------------
171+
172+ - [ ` slice::select_nth_unstable ` ]
173+ - [ ` slice::select_nth_unstable_by ` ]
174+ - [ ` slice::select_nth_unstable_by_key ` ]
175+
176+ The following previously stable methods are now ` const ` .
177+
178+ - [ ` Poll::is_ready ` ]
179+ - [ ` Poll::is_pending ` ]
180+
181+ Cargo
182+ -----------------------
183+ - [ Building a crate with ` cargo-package ` should now be independently reproducible.] [ cargo/8864 ]
184+ - [ ` cargo-tree ` now marks proc-macro crates.] [ cargo/8765 ]
185+ - [ Added ` CARGO_PRIMARY_PACKAGE ` build-time environment variable.] [ cargo/8758 ] This
186+ variable will be set if the crate being built is one the user selected to build, either
187+ with ` -p ` or through defaults.
188+ - [ You can now use glob patterns when specifying packages & targets.] [ cargo/8752 ]
189+
190+
191+ Compatibility Notes
192+ -------------------
193+
194+ - [ Demoted ` i686-unknown-freebsd ` from host tier 2 to target tier 2 support.] [ 78746 ]
195+ - [ Macros that end with a semi-colon are now treated as statements even if they expand to nothing.] [ 78376 ]
196+ - [ Rustc will now check for the validity of some built-in attributes on enum variants.] [ 77015 ]
197+ Previously such invalid or unused attributes could be ignored.
198+ - Leading whitespace is stripped more uniformly in documentation comments, which may change behavior. You
199+ read [ this post about the changes] [ rustdoc-ws-post ] for more details.
200+ - [ Trait bounds are no longer inferred for associated types.] [ 79904 ]
201+
202+ Internal Only
203+ -------------
204+ These changes provide no direct user facing benefits, but represent significant
205+ improvements to the internals and overall performance of rustc and
206+ related tools.
207+
208+ - [ rustc's internal crates are now compiled using the ` initial-exec ` Thread
209+ Local Storage model.] [ 78201 ]
210+ - [ Calculate visibilities once in resolve.] [ 78077 ]
211+ - [ Added ` system ` to the ` llvm-libunwind ` bootstrap config option.] [ 77703 ]
212+ - [ Added ` --color ` for configuring terminal color support to bootstrap.] [ 79004 ]
213+
214+
215+ [ 75991 ] : https://github.com/rust-lang/rust/pull/75991
216+ [ 78951 ] : https://github.com/rust-lang/rust/pull/78951
217+ [ 78848 ] : https://github.com/rust-lang/rust/pull/78848
218+ [ 78746 ] : https://github.com/rust-lang/rust/pull/78746
219+ [ 78376 ] : https://github.com/rust-lang/rust/pull/78376
220+ [ 78228 ] : https://github.com/rust-lang/rust/pull/78228
221+ [ 78227 ] : https://github.com/rust-lang/rust/pull/78227
222+ [ 78201 ] : https://github.com/rust-lang/rust/pull/78201
223+ [ 78109 ] : https://github.com/rust-lang/rust/pull/78109
224+ [ 78077 ] : https://github.com/rust-lang/rust/pull/78077
225+ [ 77997 ] : https://github.com/rust-lang/rust/pull/77997
226+ [ 77703 ] : https://github.com/rust-lang/rust/pull/77703
227+ [ 77547 ] : https://github.com/rust-lang/rust/pull/77547
228+ [ 77015 ] : https://github.com/rust-lang/rust/pull/77015
229+ [ 76199 ] : https://github.com/rust-lang/rust/pull/76199
230+ [ 76119 ] : https://github.com/rust-lang/rust/pull/76119
231+ [ 75914 ] : https://github.com/rust-lang/rust/pull/75914
232+ [ 79004 ] : https://github.com/rust-lang/rust/pull/79004
233+ [ 78676 ] : https://github.com/rust-lang/rust/pull/78676
234+ [ 79904 ] : https://github.com/rust-lang/rust/issues/79904
235+ [ cargo/8864 ] : https://github.com/rust-lang/cargo/pull/8864
236+ [ cargo/8765 ] : https://github.com/rust-lang/cargo/pull/8765
237+ [ cargo/8758 ] : https://github.com/rust-lang/cargo/pull/8758
238+ [ cargo/8752 ] : https://github.com/rust-lang/cargo/pull/8752
239+ [ `slice::select_nth_unstable` ] : https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.select_nth_unstable
240+ [ `slice::select_nth_unstable_by` ] : https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.select_nth_unstable_by
241+ [ `slice::select_nth_unstable_by_key` ] : https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.select_nth_unstable_by_key
242+ [ `hint::spin_loop` ] : https://doc.rust-lang.org/stable/std/hint/fn.spin_loop.html
243+ [ `Poll::is_ready` ] : https://doc.rust-lang.org/stable/std/task/enum.Poll.html#method.is_ready
244+ [ `Poll::is_pending` ] : https://doc.rust-lang.org/stable/std/task/enum.Poll.html#method.is_pending
245+ [ rustdoc-ws-post ] : https://blog.guillaume-gomez.fr/articles/2020-11-11+New+doc+comment+handling+in+rustdoc
246+
1247Version 1.48.0 (2020-11-19)
2248==========================
3249
@@ -10,7 +256,7 @@ Language
10256Compiler
11257--------
12258- [ Stabilised the ` -C link-self-contained=<yes|no> ` compiler flag.] [ 76158 ] This tells
13- ` rustc ` whether to link its own C runtime and libraries or to rely on a external
259+ ` rustc ` whether to link its own C runtime and libraries or to rely on a external
14260 linker to find them. (Supported only on ` windows-gnu ` , ` linux-musl ` , and ` wasi ` platforms.)
15261- [ You can now use ` -C target-feature=+crt-static ` on ` linux-gnu ` targets.] [ 77386 ]
16262 Note: If you're using cargo you must explicitly pass the ` --target ` flag.
@@ -82,7 +328,7 @@ Compatibility Notes
82328- [ Foreign exceptions are now caught by ` catch_unwind ` and will cause an abort.] [ 70212 ]
83329 Note: This behaviour is not guaranteed and is still considered undefined behaviour,
84330 see the [ ` catch_unwind ` ] documentation for further information.
85-
331+
86332
87333
88334Internal Only
@@ -102,7 +348,7 @@ related tools.
102348[ 76030 ] : https://github.com/rust-lang/rust/pull/76030/
103349[ 70212 ] : https://github.com/rust-lang/rust/pull/70212/
104350[ 27675 ] : https://github.com/rust-lang/rust/issues/27675/
105- [ 54121] : https://github.com/rust-lang/rust/issues/54121/
351+ [ 54121 ] : https://github.com/rust-lang/rust/issues/54121/
106352[ 71274 ] : https://github.com/rust-lang/rust/pull/71274/
107353[ 77386 ] : https://github.com/rust-lang/rust/pull/77386/
108354[ 77153 ] : https://github.com/rust-lang/rust/pull/77153/
0 commit comments