|  | 
|  | 1 | +Version 1.32.0 (2019-01-17) | 
|  | 2 | +========================== | 
|  | 3 | + | 
|  | 4 | +Language | 
|  | 5 | +-------- | 
|  | 6 | +#### 2018 edition | 
|  | 7 | +- [You can now use the `?` operator in macro definitions.][56245] The `?` | 
|  | 8 | +  operator allows you to specify zero or one repetitions similar to the `*` and | 
|  | 9 | +  `+` operators. | 
|  | 10 | +- [Module paths with no leading keyword like `super`, `self`, or `crate`, will | 
|  | 11 | +  now always resolve to the item (`enum`, `struct`, etc.) available in the | 
|  | 12 | +  module if present, before resolving to a external crate or an item the prelude.][56759] | 
|  | 13 | +  E.g. | 
|  | 14 | +  ```rust | 
|  | 15 | +  enum Color { Red, Green, Blue } | 
|  | 16 | + | 
|  | 17 | +  use Color::*; | 
|  | 18 | +  ``` | 
|  | 19 | + | 
|  | 20 | +#### All editions | 
|  | 21 | +- [You can now match against `PhantomData<T>` types.][55837] | 
|  | 22 | +- [You can now match against literals in macros with the `literal` | 
|  | 23 | +  specifier.][56072] This will match against a literal of any type. | 
|  | 24 | +  E.g. `1`, `'A'`, `"Hello World"` | 
|  | 25 | +- [Self can now be used as a constructor and pattern for unit and tuple structs.][56365] E.g.  | 
|  | 26 | +  ```rust | 
|  | 27 | +  struct Point(i32, i32); | 
|  | 28 | + | 
|  | 29 | +  impl Point { | 
|  | 30 | +      pub fn new(x: i32, y: i32) -> Self { | 
|  | 31 | +          Self(x, y) | 
|  | 32 | +      } | 
|  | 33 | + | 
|  | 34 | +      pub fn is_origin(&self) -> bool { | 
|  | 35 | +          match self { | 
|  | 36 | +              Self(0, 0) => true, | 
|  | 37 | +              _ => false, | 
|  | 38 | +          } | 
|  | 39 | +      } | 
|  | 40 | +  } | 
|  | 41 | +  ``` | 
|  | 42 | +- [Self can also now be used in type definitions.][56366] E.g. | 
|  | 43 | +  ```rust | 
|  | 44 | +  enum List<T> | 
|  | 45 | +  where | 
|  | 46 | +      Self: PartialOrd<Self> // can write `Self` instead of `List<T>` | 
|  | 47 | +  { | 
|  | 48 | +      Nil, | 
|  | 49 | +      Cons(T, Box<Self>) // likewise here | 
|  | 50 | +  } | 
|  | 51 | +  ``` | 
|  | 52 | +- [You can now mark traits with `#[must_use]`.][55663] This provides a warning if | 
|  | 53 | +  a `impl Trait` or `dyn Trait` is returned and unused in the program. | 
|  | 54 | + | 
|  | 55 | +Compiler | 
|  | 56 | +-------- | 
|  | 57 | +- [The default allocator has changed from jemalloc to the default allocator on | 
|  | 58 | +  your system.][55238] The compiler itself on Linux & macOS will still use | 
|  | 59 | +  jemalloc, but programs compiled with it will use the system allocator. | 
|  | 60 | +- [Added the `aarch64-pc-windows-msvc` target.][55702] | 
|  | 61 | + | 
|  | 62 | +Libraries | 
|  | 63 | +--------- | 
|  | 64 | +- [`PathBuf` now implements `FromStr`.][55148] | 
|  | 65 | +- [`Box<[T]>` now implements `FromIterator<T>`.][55843] | 
|  | 66 | +- [The `dbg!` macro has been stabilized.][56395] This macro enables you to | 
|  | 67 | +  easily debug expressions in your rust program. E.g. | 
|  | 68 | +  ```rust | 
|  | 69 | +  let a = 2; | 
|  | 70 | +  let b = dbg!(a * 2) + 1; | 
|  | 71 | +  //      ^-- prints: [src/main.rs:4] a * 2 = 4 | 
|  | 72 | +  assert_eq!(b, 5); | 
|  | 73 | +  ``` | 
|  | 74 | + | 
|  | 75 | +The following APIs are now `const` functions and can be used in a | 
|  | 76 | +`const` context. | 
|  | 77 | + | 
|  | 78 | +- [`Cell::as_ptr`] | 
|  | 79 | +- [`UnsafeCell::get`] | 
|  | 80 | +- [`char::is_ascii`] | 
|  | 81 | +- [`iter::empty`] | 
|  | 82 | +- [`ManuallyDrop::new`] | 
|  | 83 | +- [`ManuallyDrop::into_inner`] | 
|  | 84 | +- [`RangeInclusive::start`] | 
|  | 85 | +- [`RangeInclusive::end`] | 
|  | 86 | +- [`NonNull::as_ptr`] | 
|  | 87 | +- [`slice::as_ptr`] | 
|  | 88 | +- [`str::as_ptr`] | 
|  | 89 | +- [`Duration::as_secs`] | 
|  | 90 | +- [`Duration::subsec_millis`] | 
|  | 91 | +- [`Duration::subsec_micros`] | 
|  | 92 | +- [`Duration::subsec_nanos`] | 
|  | 93 | +- [`CStr::as_ptr`] | 
|  | 94 | +- [`Ipv4Addr::is_unspecified`] | 
|  | 95 | +- [`Ipv6Addr::new`] | 
|  | 96 | +- [`Ipv6Addr::octets`] | 
|  | 97 | + | 
|  | 98 | +Stabilized APIs | 
|  | 99 | +--------------- | 
|  | 100 | +- [`i8::to_be_bytes`] | 
|  | 101 | +- [`i8::to_le_bytes`] | 
|  | 102 | +- [`i8::to_ne_bytes`] | 
|  | 103 | +- [`i8::from_be_bytes`] | 
|  | 104 | +- [`i8::from_le_bytes`] | 
|  | 105 | +- [`i8::from_ne_bytes`] | 
|  | 106 | +- [`i16::to_be_bytes`] | 
|  | 107 | +- [`i16::to_le_bytes`] | 
|  | 108 | +- [`i16::to_ne_bytes`] | 
|  | 109 | +- [`i16::from_be_bytes`] | 
|  | 110 | +- [`i16::from_le_bytes`] | 
|  | 111 | +- [`i16::from_ne_bytes`] | 
|  | 112 | +- [`i32::to_be_bytes`] | 
|  | 113 | +- [`i32::to_le_bytes`] | 
|  | 114 | +- [`i32::to_ne_bytes`] | 
|  | 115 | +- [`i32::from_be_bytes`] | 
|  | 116 | +- [`i32::from_le_bytes`] | 
|  | 117 | +- [`i32::from_ne_bytes`] | 
|  | 118 | +- [`i64::to_be_bytes`] | 
|  | 119 | +- [`i64::to_le_bytes`] | 
|  | 120 | +- [`i64::to_ne_bytes`] | 
|  | 121 | +- [`i64::from_be_bytes`] | 
|  | 122 | +- [`i64::from_le_bytes`] | 
|  | 123 | +- [`i64::from_ne_bytes`] | 
|  | 124 | +- [`isize::to_be_bytes`] | 
|  | 125 | +- [`isize::to_le_bytes`] | 
|  | 126 | +- [`isize::to_ne_bytes`] | 
|  | 127 | +- [`isize::from_be_bytes`] | 
|  | 128 | +- [`isize::from_le_bytes`] | 
|  | 129 | +- [`isize::from_ne_bytes`] | 
|  | 130 | +- [`u8::to_be_bytes`] | 
|  | 131 | +- [`u8::to_le_bytes`] | 
|  | 132 | +- [`u8::to_ne_bytes`] | 
|  | 133 | +- [`u8::from_be_bytes`] | 
|  | 134 | +- [`u8::from_le_bytes`] | 
|  | 135 | +- [`u8::from_ne_bytes`] | 
|  | 136 | +- [`u16::to_be_bytes`] | 
|  | 137 | +- [`u16::to_le_bytes`] | 
|  | 138 | +- [`u16::to_ne_bytes`] | 
|  | 139 | +- [`u16::from_be_bytes`] | 
|  | 140 | +- [`u16::from_le_bytes`] | 
|  | 141 | +- [`u16::from_ne_bytes`] | 
|  | 142 | +- [`u32::to_be_bytes`] | 
|  | 143 | +- [`u32::to_le_bytes`] | 
|  | 144 | +- [`u32::to_ne_bytes`] | 
|  | 145 | +- [`u32::from_be_bytes`] | 
|  | 146 | +- [`u32::from_le_bytes`] | 
|  | 147 | +- [`u32::from_ne_bytes`] | 
|  | 148 | +- [`u64::to_be_bytes`] | 
|  | 149 | +- [`u64::to_le_bytes`] | 
|  | 150 | +- [`u64::to_ne_bytes`] | 
|  | 151 | +- [`u64::from_be_bytes`] | 
|  | 152 | +- [`u64::from_le_bytes`] | 
|  | 153 | +- [`u64::from_ne_bytes`] | 
|  | 154 | +- [`usize::to_be_bytes`] | 
|  | 155 | +- [`usize::to_le_bytes`] | 
|  | 156 | +- [`usize::to_ne_bytes`] | 
|  | 157 | +- [`usize::from_be_bytes`] | 
|  | 158 | +- [`usize::from_le_bytes`] | 
|  | 159 | +- [`usize::from_ne_bytes`] | 
|  | 160 | + | 
|  | 161 | +Cargo | 
|  | 162 | +----- | 
|  | 163 | +- [You can now run `cargo c` as an alias for `cargo check`.][cargo/6218] | 
|  | 164 | +- [Usernames are now allowed in alt registry URLs.][cargo/6242] | 
|  | 165 | + | 
|  | 166 | +Misc | 
|  | 167 | +---- | 
|  | 168 | +- [`libproc_macro` has been added to the `rust-src` distribution.][55280] | 
|  | 169 | + | 
|  | 170 | +Compatibility Notes | 
|  | 171 | +------------------- | 
|  | 172 | +- [The argument types for AVX's | 
|  | 173 | +  `_mm256_stream_si256`, `_mm256_stream_pd`, `_mm256_stream_ps`][55610] have | 
|  | 174 | +  been changed from `*const` to `*mut` as the previous implementation | 
|  | 175 | +  was unsound. | 
|  | 176 | + | 
|  | 177 | + | 
|  | 178 | +[55148]: https://github.com/rust-lang/rust/pull/55148/ | 
|  | 179 | +[55238]: https://github.com/rust-lang/rust/pull/55238/ | 
|  | 180 | +[55280]: https://github.com/rust-lang/rust/pull/55280/ | 
|  | 181 | +[55610]: https://github.com/rust-lang/rust/pull/55610/ | 
|  | 182 | +[55663]: https://github.com/rust-lang/rust/pull/55663/ | 
|  | 183 | +[55702]: https://github.com/rust-lang/rust/pull/55702/ | 
|  | 184 | +[55837]: https://github.com/rust-lang/rust/pull/55837/ | 
|  | 185 | +[55843]: https://github.com/rust-lang/rust/pull/55843/ | 
|  | 186 | +[56072]: https://github.com/rust-lang/rust/pull/56072/ | 
|  | 187 | +[56245]: https://github.com/rust-lang/rust/pull/56245/ | 
|  | 188 | +[56365]: https://github.com/rust-lang/rust/pull/56365/ | 
|  | 189 | +[56366]: https://github.com/rust-lang/rust/pull/56366/ | 
|  | 190 | +[56395]: https://github.com/rust-lang/rust/pull/56395/ | 
|  | 191 | +[56759]: https://github.com/rust-lang/rust/pull/56759/ | 
|  | 192 | +[cargo/6218]: https://github.com/rust-lang/cargo/pull/6218/ | 
|  | 193 | +[cargo/6242]: https://github.com/rust-lang/cargo/pull/6242/ | 
|  | 194 | +[`CStr::as_ptr`]: https://doc.rust-lang.org/std/ffi/struct.CStr.html#method.as_ptr | 
|  | 195 | +[`Cell::as_ptr`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_ptr | 
|  | 196 | +[`Duration::as_secs`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs | 
|  | 197 | +[`Duration::subsec_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_micros | 
|  | 198 | +[`Duration::subsec_millis`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_millis | 
|  | 199 | +[`Duration::subsec_nanos`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_nanos | 
|  | 200 | +[`Ipv4Addr::is_unspecified`]: https://doc.rust-lang.org/std/net/struct.Ipv4Addr.html#method.is_unspecified | 
|  | 201 | +[`Ipv6Addr::new`]: https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html#method.new | 
|  | 202 | +[`Ipv6Addr::octets`]: https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html#method.octets | 
|  | 203 | +[`ManuallyDrop::into_inner`]: https://doc.rust-lang.org/std/mem/struct.ManuallyDrop.html#method.into_inner | 
|  | 204 | +[`ManuallyDrop::new`]: https://doc.rust-lang.org/std/mem/struct.ManuallyDrop.html#method.new | 
|  | 205 | +[`NonNull::as_ptr`]: https://doc.rust-lang.org/std/ptr/struct.NonNull.html#method.as_ptr | 
|  | 206 | +[`RangeInclusive::end`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html#method.end | 
|  | 207 | +[`RangeInclusive::start`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html#method.start | 
|  | 208 | +[`UnsafeCell::get`]: https://doc.rust-lang.org/std/cell/struct.UnsafeCell.html#method.get | 
|  | 209 | +[`slice::as_ptr`]: https://doc.rust-lang.org/std/primitive.slice.html#method.as_ptr | 
|  | 210 | +[`char::is_ascii`]: https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii | 
|  | 211 | +[`i16::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_be_bytes | 
|  | 212 | +[`i16::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_le_bytes | 
|  | 213 | +[`i16::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_ne_bytes | 
|  | 214 | +[`i16::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.to_be_bytes | 
|  | 215 | +[`i16::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.to_le_bytes | 
|  | 216 | +[`i16::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.to_ne_bytes | 
|  | 217 | +[`i32::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.from_be_bytes | 
|  | 218 | +[`i32::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.from_le_bytes | 
|  | 219 | +[`i32::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.from_ne_bytes | 
|  | 220 | +[`i32::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.to_be_bytes | 
|  | 221 | +[`i32::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.to_le_bytes | 
|  | 222 | +[`i32::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.to_ne_bytes | 
|  | 223 | +[`i64::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.from_be_bytes | 
|  | 224 | +[`i64::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.from_le_bytes | 
|  | 225 | +[`i64::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.from_ne_bytes | 
|  | 226 | +[`i64::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.to_be_bytes | 
|  | 227 | +[`i64::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.to_le_bytes | 
|  | 228 | +[`i64::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.to_ne_bytes | 
|  | 229 | +[`i8::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.from_be_bytes | 
|  | 230 | +[`i8::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.from_le_bytes | 
|  | 231 | +[`i8::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.from_ne_bytes | 
|  | 232 | +[`i8::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.to_be_bytes | 
|  | 233 | +[`i8::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.to_le_bytes | 
|  | 234 | +[`i8::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.to_ne_bytes | 
|  | 235 | +[`isize::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.from_be_bytes | 
|  | 236 | +[`isize::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.from_le_bytes | 
|  | 237 | +[`isize::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.from_ne_bytes | 
|  | 238 | +[`isize::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_be_bytes | 
|  | 239 | +[`isize::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_le_bytes | 
|  | 240 | +[`isize::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_ne_bytes | 
|  | 241 | +[`iter::empty`]: https://doc.rust-lang.org/std/iter/fn.empty.html | 
|  | 242 | +[`str::as_ptr`]: https://doc.rust-lang.org/std/primitive.str.html#method.as_ptr | 
|  | 243 | +[`u16::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_be_bytes | 
|  | 244 | +[`u16::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_le_bytes | 
|  | 245 | +[`u16::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_ne_bytes | 
|  | 246 | +[`u16::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.to_be_bytes | 
|  | 247 | +[`u16::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.to_le_bytes | 
|  | 248 | +[`u16::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.to_ne_bytes | 
|  | 249 | +[`u32::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.from_be_bytes | 
|  | 250 | +[`u32::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.from_le_bytes | 
|  | 251 | +[`u32::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.from_ne_bytes | 
|  | 252 | +[`u32::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.to_be_bytes | 
|  | 253 | +[`u32::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.to_le_bytes | 
|  | 254 | +[`u32::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.to_ne_bytes | 
|  | 255 | +[`u64::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.from_be_bytes | 
|  | 256 | +[`u64::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.from_le_bytes | 
|  | 257 | +[`u64::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.from_ne_bytes | 
|  | 258 | +[`u64::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.to_be_bytes | 
|  | 259 | +[`u64::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.to_le_bytes | 
|  | 260 | +[`u64::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.to_ne_bytes | 
|  | 261 | +[`u8::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.from_be_bytes | 
|  | 262 | +[`u8::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.from_le_bytes | 
|  | 263 | +[`u8::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.from_ne_bytes | 
|  | 264 | +[`u8::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_be_bytes | 
|  | 265 | +[`u8::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_le_bytes | 
|  | 266 | +[`u8::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_ne_bytes | 
|  | 267 | +[`usize::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.from_be_bytes | 
|  | 268 | +[`usize::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.from_le_bytes | 
|  | 269 | +[`usize::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.from_ne_bytes | 
|  | 270 | +[`usize::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.to_be_bytes | 
|  | 271 | +[`usize::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.to_le_bytes | 
|  | 272 | +[`usize::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.to_ne_bytes | 
|  | 273 | + | 
|  | 274 | + | 
| 1 | 275 | Version 1.31.1 (2018-12-20) | 
| 2 | 276 | =========================== | 
| 3 | 277 | 
 | 
|  | 
0 commit comments