Commit 5e317d3
committed
Upgrade rust to version 1.48.0.
Pkgsrc changes:
* Compensate for files being moved around upstream.
* Introduce optional, on-by-default semi-static building of cargo,
using the internal curl and openssl sources. This reduces the dynamic
dependencies of cargo and therefore the rust package itself.
Ref. options.mk.
* The 1.47.0 bootstrap kits have been re-built with the above option
turned on, so no longer depends on curl or openssl from pkgsrc and/or
from earlier OS or pkgsrc versions. This should hopefully fix
installation of rust with non-default PREFIX, ref. PR#54453.
Upstream changes:
Version 1.48.0 (2020-11-19)
==========================
Language
--------
- [The `unsafe` keyword is now syntactically permitted on modules.][75857] This
is still rejected *semantically*, but can now be parsed by procedural macros.
Compiler
--------
- [Stabilised the `-C link-self-contained=<yes|no>` compiler flag.][76158]
This tells `rustc` whether to link its own C runtime and libraries
or to rely on a external linker to find them. (Supported only on
`windows-gnu`, `linux-musl`, and `wasi` platforms.)
- [You can now use `-C target-feature=+crt-static` on `linux-gnu` targets.]
[77386]
Note: If you're using cargo you must explicitly pass the `--target` flag.
- [Added tier 2\* support for `aarch64-unknown-linux-musl`.][76420]
\* Refer to Rust's [platform support page][forge-platform-support] for more
information on Rust's tiered platform support.
Libraries
---------
- [`io::Write` is now implemented for `&ChildStdin` `&Sink`, `&Stdout`,
and `&Stderr`.][76275]
- [All arrays of any length now implement `TryFrom<Vec<T>>`.][76310]
- [The `matches!` macro now supports having a trailing comma.][74880]
- [`Vec<A>` now implements `PartialEq<[B]>` where `A: PartialEq<B>`.][74194]
- [The `RefCell::{replace, replace_with, clone}` methods now all use
`#[track_caller]`.][77055]
Stabilized APIs
---------------
- [`slice::as_ptr_range`]
- [`slice::as_mut_ptr_range`]
- [`VecDeque::make_contiguous`]
- [`future::pending`]
- [`future::ready`]
The following previously stable methods are now `const fn`'s:
- [`Option::is_some`]
- [`Option::is_none`]
- [`Option::as_ref`]
- [`Result::is_ok`]
- [`Result::is_err`]
- [`Result::as_ref`]
- [`Ordering::reverse`]
- [`Ordering::then`]
Cargo
-----
Rustdoc
-------
- [You can now link to items in `rustdoc` using the intra-doc link
syntax.][74430] E.g. ``/// Uses [`std::future`]`` will automatically generate
a link to `std::future`'s documentation. See ["Linking to items by
name"][intradoc-links] for more information.
- [You can now specify `#[doc(alias = "<alias>")]` on items to add
search aliases when searching through `rustdoc`'s UI.][75740]
Compatibility Notes
-------------------
- [Promotion of references to `'static` lifetime inside `const fn`
now follows the same rules as inside a `fn` body.][75502] In
particular, `&foo()` will not be promoted to `'static` lifetime
any more inside `const fn`s.
- [Associated type bindings on trait objects are now verified to meet the bounds
declared on the trait when checking that they implement the trait.][27675]
- [When trait bounds on associated types or opaque types are ambiguous, the
compiler no longer makes an arbitrary choice on which bound to use.][54121]
- [Fixed recursive nonterminals not being expanded in macros during
pretty-print/reparse check.][77153] This may cause errors if your macro wasn't
correctly handling recursive nonterminal tokens.
- [`&mut` references to non zero-sized types are no longer promoted.][75585]
- [`rustc` will now warn if you use attributes like `#[link_name]` or `#[cold]`
in places where they have no effect.][73461]
- [Updated `_mm256_extract_epi8` and `_mm256_extract_epi16` signatures in
`arch::{x86, x86_64}` to return `i32` to match the vendor signatures.][73166]
- [`mem::uninitialized` will now panic if any inner types inside
a struct or enum disallow zero-initialization.][71274]
- [`#[target_feature]` will now error if used in a place where it
has no effect.][78143]
- [Foreign exceptions are now caught by `catch_unwind` and will
cause an abort.][70212] Note: This behaviour is not guaranteed
and is still considered undefined behaviour, see the [`catch_unwind`]
documentation for further information.
Internal Only
-------------
These changes provide no direct user facing benefits, but represent significant
improvements to the internals and overall performance of rustc and
related tools.
- [Building `rustc` from source now uses `ninja` by default over `make`.][74922]
You can continue building with `make` by setting `ninja=false` in
your `config.toml`.
- [cg_llvm: `fewer_names` in `uncached_llvm_type`][76030]
- [Made `ensure_sufficient_stack()` non-generic][76680]
[78143]: rust-lang/rust#78143
[76680]: rust-lang/rust#76680
[76030]: rust-lang/rust#76030
[70212]: rust-lang/rust#70212
[27675]: rust-lang/rust#27675
[54121]: rust-lang/rust#54121
[71274]: rust-lang/rust#71274
[77386]: rust-lang/rust#77386
[77153]: rust-lang/rust#77153
[77055]: rust-lang/rust#77055
[76275]: rust-lang/rust#76275
[76310]: rust-lang/rust#76310
[76420]: rust-lang/rust#76420
[76158]: rust-lang/rust#76158
[75857]: rust-lang/rust#75857
[75585]: rust-lang/rust#75585
[75740]: rust-lang/rust#75740
[75502]: rust-lang/rust#75502
[74880]: rust-lang/rust#74880
[74922]: rust-lang/rust#74922
[74430]: rust-lang/rust#74430
[74194]: rust-lang/rust#74194
[73461]: rust-lang/rust#73461
[73166]: rust-lang/rust#73166
[intradoc-links]: https://doc.rust-lang.org/rustdoc/linking-to-items-by-name.html
[`catch_unwind`]: https://doc.rust-lang.org/std/panic/fn.catch_unwind.html
[`Option::is_some`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.is_some
[`Option::is_none`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.is_none
[`Option::as_ref`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.as_ref
[`Result::is_ok`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.is_ok
[`Result::is_err`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.is_err
[`Result::as_ref`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.as_ref
[`Ordering::reverse`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.reverse
[`Ordering::then`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.then
[`slice::as_ptr_range`]: https://doc.rust-lang.org/std/primitive.slice.html#method.as_ptr_range
[`slice::as_mut_ptr_range`]: https://doc.rust-lang.org/std/primitive.slice.html#method.as_mut_ptr_range
[`VecDeque::make_contiguous`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.make_contiguous
[`future::pending`]: https://doc.rust-lang.org/std/future/fn.pending.html
[`future::ready`]: https://doc.rust-lang.org/std/future/fn.ready.html1 parent 663c234 commit 5e317d3
File tree
13 files changed
+310
-156
lines changed- lang/rust
- patches
13 files changed
+310
-156
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
47 | 51 | | |
48 | | - | |
| 52 | + | |
| 53 | + | |
49 | 54 | | |
| 55 | + | |
50 | 56 | | |
51 | | - | |
52 | | - | |
| 57 | + | |
| 58 | + | |
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
| |||
154 | 160 | | |
155 | 161 | | |
156 | 162 | | |
157 | | - | |
| 163 | + | |
158 | 164 | | |
159 | 165 | | |
160 | 166 | | |
161 | 167 | | |
162 | 168 | | |
163 | 169 | | |
164 | 170 | | |
165 | | - | |
| 171 | + | |
166 | 172 | | |
167 | 173 | | |
168 | 174 | | |
169 | 175 | | |
170 | 176 | | |
171 | 177 | | |
172 | 178 | | |
173 | | - | |
| 179 | + | |
174 | 180 | | |
175 | 181 | | |
176 | 182 | | |
| |||
187 | 193 | | |
188 | 194 | | |
189 | 195 | | |
190 | | - | |
| 196 | + | |
191 | 197 | | |
192 | 198 | | |
193 | 199 | | |
194 | 200 | | |
195 | 201 | | |
196 | 202 | | |
197 | 203 | | |
198 | | - | |
| 204 | + | |
199 | 205 | | |
200 | 206 | | |
201 | 207 | | |
202 | 208 | | |
203 | 209 | | |
204 | 210 | | |
205 | 211 | | |
206 | | - | |
| 212 | + | |
207 | 213 | | |
208 | 214 | | |
209 | 215 | | |
| |||
220 | 226 | | |
221 | 227 | | |
222 | 228 | | |
223 | | - | |
| 229 | + | |
224 | 230 | | |
225 | 231 | | |
226 | 232 | | |
227 | 233 | | |
228 | 234 | | |
229 | 235 | | |
230 | 236 | | |
231 | | - | |
| 237 | + | |
232 | 238 | | |
233 | 239 | | |
234 | 240 | | |
| |||
252 | 258 | | |
253 | 259 | | |
254 | 260 | | |
255 | | - | |
| 261 | + | |
256 | 262 | | |
257 | 263 | | |
258 | 264 | | |
| |||
262 | 268 | | |
263 | 269 | | |
264 | 270 | | |
265 | | - | |
| 271 | + | |
266 | 272 | | |
267 | 273 | | |
268 | 274 | | |
| |||
273 | 279 | | |
274 | 280 | | |
275 | 281 | | |
276 | | - | |
| 282 | + | |
277 | 283 | | |
278 | 284 | | |
279 | 285 | | |
| |||
282 | 288 | | |
283 | 289 | | |
284 | 290 | | |
285 | | - | |
| 291 | + | |
| 292 | + | |
286 | 293 | | |
287 | 294 | | |
288 | 295 | | |
| |||
299 | 306 | | |
300 | 307 | | |
301 | 308 | | |
302 | | - | |
| 309 | + | |
303 | 310 | | |
| 311 | + | |
304 | 312 | | |
305 | 313 | | |
306 | 314 | | |
| |||
310 | 318 | | |
311 | 319 | | |
312 | 320 | | |
313 | | - | |
314 | | - | |
| 321 | + | |
| 322 | + | |
315 | 323 | | |
316 | 324 | | |
317 | 325 | | |
318 | 326 | | |
319 | 327 | | |
320 | 328 | | |
321 | | - | |
322 | | - | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
323 | 340 | | |
324 | 341 | | |
325 | 342 | | |
| |||
330 | 347 | | |
331 | 348 | | |
332 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
333 | 361 | | |
334 | 362 | | |
335 | 363 | | |
| |||
351 | 379 | | |
352 | 380 | | |
353 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
354 | 388 | | |
355 | 389 | | |
356 | 390 | | |
| |||
439 | 473 | | |
440 | 474 | | |
441 | 475 | | |
| 476 | + | |
442 | 477 | | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
443 | 481 | | |
444 | 482 | | |
445 | 483 | | |
446 | 484 | | |
447 | 485 | | |
448 | 486 | | |
449 | 487 | | |
450 | | - | |
| 488 | + | |
451 | 489 | | |
452 | 490 | | |
453 | 491 | | |
454 | 492 | | |
455 | | - | |
| 493 | + | |
456 | 494 | | |
457 | 495 | | |
458 | 496 | | |
| |||
527 | 565 | | |
528 | 566 | | |
529 | 567 | | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
530 | 575 | | |
531 | 576 | | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | 577 | | |
0 commit comments