rust/src/test
Dylan DPC d7a24003d8
Rollup merge of #95354 - dtolnay:rustc_const_stable, r=lcnr
Handle rustc_const_stable attribute in library feature collector

The library feature collector in [compiler/rustc_passes/src/lib_features.rs](551b4fa395/compiler/rustc_passes/src/lib_features.rs) has only been looking at `#[stable(…)]`, `#[unstable(…)]`, and `#[rustc_const_unstable(…)]` attributes, while ignoring `#[rustc_const_stable(…)]`. The consequences of this were:

- When any const feature got stabilized (changing one or more `rustc_const_unstable` to `rustc_const_stable`), users who had previously enabled that unstable feature using `#![feature(…)]` would get told "unknown feature", rather than rustc's nicer "the feature … has been stable since … and no longer requires an attribute to enable".

    This can be seen in the way that https://github.com/rust-lang/rust/pull/93957#issuecomment-1079794660 failed after rebase:

    ```console
    error[E0635]: unknown feature `const_ptr_offset`
      --> $DIR/offset_from_ub.rs:1:35
       |
    LL | #![feature(const_ptr_offset_from, const_ptr_offset)]
       |                                   ^^^^^^^^^^^^^^^^
    ```

- We weren't enforcing that a particular feature is either stable everywhere or unstable everywhere, and that a feature that has been stabilized has the same stabilization version everywhere, both of which we enforce for the other stability attributes.

This PR updates the library feature collector to handle `rustc_const_stable`, and fixes places in the standard library and test suite where `rustc_const_stable` was being used in a way that does not meet the rules for a stability attribute.
2022-04-02 03:34:21 +02:00
..
assembly short-circuit the easy cases in is_copy_modulo_regions 2022-03-10 01:19:02 -08:00
auxiliary
codegen Rollup merge of #95011 - michaelwoerister:awaitee_field, r=tmandry 2022-03-31 00:26:30 +02:00
codegen-units
debuginfo debuginfo: Fix debuginfo for Box<T> where T is unsized. 2022-03-24 11:12:41 +01:00
incremental Revert "Auto merge of #93893 - oli-obk:sad_revert, r=oli-obk" 2022-03-28 16:27:14 +00:00
mir-opt Disable the test on wasm32 2022-03-10 01:19:02 -08:00
pretty Format core and std macro rules, removing needless surrounding blocks 2022-03-11 15:26:51 -08:00
run-make Stabilize native library modifier syntax and the whole-archive modifier specifically 2022-03-30 23:53:21 +03:00
run-make-fulldeps Auto merge of #94566 - yanganto:show-ignore-message, r=m-ou-se 2022-03-29 15:18:57 +00:00
run-pass-valgrind
rustdoc Rollup merge of #95354 - dtolnay:rustc_const_stable, r=lcnr 2022-04-02 03:34:21 +02:00
rustdoc-gui Rollup merge of #95470 - GuillaumeGomez:fix-gui-spurious-test, r=notriddle 2022-03-31 13:09:52 +02:00
rustdoc-js rustdoc: add test case for multiple traits and erased names 2022-01-26 13:03:31 -07:00
rustdoc-js-std Update macro:print typed-query rustdoc test to include pin! results 2022-02-14 16:56:37 +01:00
rustdoc-json rustdoc-json: Lifetime tests 2022-03-15 18:34:16 +00:00
rustdoc-ui Bless rustdoc tests. 2022-03-25 12:50:48 +01:00
ui Rollup merge of #95354 - dtolnay:rustc_const_stable, r=lcnr 2022-04-02 03:34:21 +02:00
ui-fulldeps Deduplicate ui-fulldeps. 2022-03-21 19:43:53 +01:00
COMPILER_TESTS.md