Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 0cefbc5

Browse files
committed
Update RELEASES.md for 1.51.0
1 parent f4008fe commit 0cefbc5

File tree

1 file changed

+148
-0
lines changed

1 file changed

+148
-0
lines changed

RELEASES.md

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,151 @@
1+
Version 1.51.0 (2021-03-25)
2+
============================
3+
4+
Language
5+
--------
6+
- [You can now parameterize items such as functions, traits, and `struct`s by constant
7+
values in addition to by types.][78135] E.g. You can now write the following. Note:
8+
Only values of primitive integers, `bool`, or `char` types are currently permitted.
9+
```rust
10+
struct GenericArray<T, const LENGTH: usize> {
11+
inner: [T; LENGTH]
12+
}
13+
14+
impl<T, const LENGTH: usize> GenericArray<T, LENGTH> {
15+
const fn last(&self) -> Option<&T> {
16+
if LENGTH == 0 {
17+
None
18+
} else {
19+
Some(&self.inner[LENGTH-1])
20+
}
21+
}
22+
}
23+
```
24+
25+
26+
Compiler
27+
--------
28+
29+
- [Added the `-Csplit-debuginfo` codegen option.][79570] This option controls whether
30+
debug information is split across multiple files or packed into a single file.
31+
- [Added tier 3\* support for `aarch64_be-unknown-linux-gnu`, `aarch64-unknown-linux-gnu_ilp32`,
32+
and `aarch64_be-unknown-linux-gnu_ilp32` targets.][81455]
33+
- [Added tier 3 support for `i386-unknown-linux-gnu` and `i486-unknown-linux-gnu` targets.][80662]
34+
- [The `target-cpu=native` option will now detect individual features of CPUs.][80749]
35+
- [Rust now uses `inline-asm` for stack probes when used with LLVM 11.0.1+][77885]
36+
37+
Libraries
38+
---------
39+
40+
- [`Box::downcast` is now also implemented for any `dyn Any + Send + Sync` object.][80945]
41+
- [`str` now implements `AsMut<str>`.][80279]
42+
- [`u64` and `u128` now implement `From<char>`.][79502]
43+
- [`Error` is now implemented for `&T` where `T` implements `Error`.][75180]
44+
- [`Poll::{map_ok, map_err}` are now implemented for `Poll<Option<Result<T, E>>>`.][80968]
45+
- [`unsigned_abs` is now implemented for all signed integer types.][80959]
46+
- [`io::Empty` now implements `io::Seek`.][78044]
47+
- [`rc::Weak<T>` and `sync::Weak<T>`'s methods such as `as_ptr` are now implemented for
48+
`T: ?Sized` types.][80764]
49+
50+
Stabilized APIs
51+
---------------
52+
53+
- [`Arc::decrement_strong_count`]
54+
- [`Arc::increment_strong_count`]
55+
- [`Once::call_once_force`]
56+
- [`Peekable::next_if_eq`]
57+
- [`Peekable::next_if`]
58+
- [`Seek::stream_position`]
59+
- [`array::IntoIter`]
60+
- [`panic::panic_any`]
61+
- [`ptr::addr_of!`]
62+
- [`ptr::addr_of_mut!`]
63+
- [`slice::SlicePattern`]
64+
- [`slice::fill_with`]
65+
- [`slice::split_inclusive_mut`]
66+
- [`slice::split_inclusive`]
67+
- [`slice::strip_prefix`]
68+
- [`slice::strip_suffix`]
69+
- [`str::split_inclusive`]
70+
- [`sync::OnceState`]
71+
- [`task::Wake`]
72+
73+
Rustdoc
74+
-------
75+
76+
- [Rustdoc will now include documentation for methods available from `Deref` traits.][80653]
77+
- [You can now provide a `--default-theme` flag which sets the default theme to use for
78+
documentation.][79642]
79+
80+
Various improvements to intra-doc links:
81+
82+
- [You can link to no path based primitives such as `slice`.][80181]
83+
- [You can link to associated items.][74489]
84+
- [You can now link to items with generics such as `Vec<T>`.][76934]
85+
86+
Misc
87+
----
88+
- [You can now pass `--include-ignored` to tests (e.g. with
89+
`cargo test -- --include-ignored`) to include testing tests marked `#[ignore]`.][80053]
90+
91+
Compatibility Notes
92+
-------------------
93+
94+
- [Bumped the minimum `g++` for `linux-gnu` targets to `g++-8` from `g++-7`.][81521]
95+
- [WASI platforms no longer use the `wasm-bindgen` ABI.][79998]
96+
- [rustc no longer promotes division, modulo and indexing operations to `const` that
97+
could fail.][80579]
98+
99+
Internal Only
100+
-------------
101+
102+
- [Consistently avoid constructing optimized MIR when not doing codegen][80718]
103+
104+
[78135]: https://github.com/rust-lang/rust/pull/78135
105+
[74489]: https://github.com/rust-lang/rust/pull/74489
106+
[76934]: https://github.com/rust-lang/rust/pull/76934
107+
[79570]: https://github.com/rust-lang/rust/pull/79570
108+
[80181]: https://github.com/rust-lang/rust/pull/80181
109+
[79642]: https://github.com/rust-lang/rust/pull/79642
110+
[80945]: https://github.com/rust-lang/rust/pull/80945
111+
[80279]: https://github.com/rust-lang/rust/pull/80279
112+
[80053]: https://github.com/rust-lang/rust/pull/80053
113+
[79502]: https://github.com/rust-lang/rust/pull/79502
114+
[75180]: https://github.com/rust-lang/rust/pull/75180
115+
[79135]: https://github.com/rust-lang/rust/pull/79135
116+
[81521]: https://github.com/rust-lang/rust/pull/81521
117+
[80968]: https://github.com/rust-lang/rust/pull/80968
118+
[80959]: https://github.com/rust-lang/rust/pull/80959
119+
[80718]: https://github.com/rust-lang/rust/pull/80718
120+
[80653]: https://github.com/rust-lang/rust/pull/80653
121+
[80579]: https://github.com/rust-lang/rust/pull/80579
122+
[79998]: https://github.com/rust-lang/rust/pull/79998
123+
[78044]: https://github.com/rust-lang/rust/pull/78044
124+
[81455]: https://github.com/rust-lang/rust/pull/81455
125+
[80764]: https://github.com/rust-lang/rust/pull/80764
126+
[80749]: https://github.com/rust-lang/rust/pull/80749
127+
[80662]: https://github.com/rust-lang/rust/pull/80662
128+
[77885]: https://github.com/rust-lang/rust/pull/77885
129+
[`Once::call_once_force`]: https://doc.rust-lang.org/stable/std/sync/struct.Once.html#method.call_once_force
130+
[`sync::OnceState`]: https://doc.rust-lang.org/stable/std/sync/struct.OnceState.html
131+
[`panic::panic_any`]: https://doc.rust-lang.org/stable/std/panic/fn.panic_any.html
132+
[`slice::strip_prefix`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.strip_prefix
133+
[`slice::strip_suffix`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.strip_prefix
134+
[`slice::SlicePattern`]: https://doc.rust-lang.org/nightly/core/slice/trait.SlicePattern.html
135+
[`Arc::increment_strong_count`]: https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.increment_strong_count
136+
[`Arc::decrement_strong_count`]: https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.decrement_strong_count
137+
[`slice::fill_with`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.fill_with
138+
[`ptr::addr_of!`]: https://doc.rust-lang.org/nightly/std/ptr/macro.addr_of.html
139+
[`ptr::addr_of_mut!`]: https://doc.rust-lang.org/nightly/std/ptr/macro.addr_of_mut.html
140+
[`array::IntoIter`]: https://doc.rust-lang.org/nightly/std/array/struct.IntoIter.html
141+
[`slice::split_inclusive`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_inclusive
142+
[`slice::split_inclusive_mut`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_inclusive_mut
143+
[`str::split_inclusive`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_inclusive
144+
[`task::Wake`]: https://doc.rust-lang.org/nightly/std/task/trait.Wake.html
145+
[`Seek::stream_position`]: https://doc.rust-lang.org/nightly/std/io/trait.Seek.html#method.stream_position
146+
[`Peekable::next_if`]: https://doc.rust-lang.org/nightly/std/iter/struct.Peekable.html#method.next_if
147+
[`Peekable::next_if_eq`]: https://doc.rust-lang.org/nightly/std/iter/struct.Peekable.html#method.next_if_eq
148+
1149
Version 1.50.0 (2021-02-11)
2150
============================
3151

0 commit comments

Comments
 (0)