diff options
Diffstat (limited to 'tests')
134 files changed, 879 insertions, 266 deletions
diff --git a/tests/crashes/123154.rs b/tests/crashes/123154.rs deleted file mode 100644 index 510ae8adf35..00000000000 --- a/tests/crashes/123154.rs +++ /dev/null @@ -1,12 +0,0 @@ -//@ known-bug: #123154 -struct AA { - pub data: [&usize] -} - -impl AA { - const fn new() -> Self { } -} - -static AA = AA::new(); - -fn main() { } diff --git a/tests/debuginfo/include_string.rs b/tests/debuginfo/include_string.rs index 75013ab5274..628ac92fe34 100644 --- a/tests/debuginfo/include_string.rs +++ b/tests/debuginfo/include_string.rs @@ -1,4 +1,6 @@ //@ min-lldb-version: 310 +//@ ignore-gdb-version: 15.0 - 99.0 +// ^ test temporarily disabled as it fails under gdb 15 //@ compile-flags:-g // gdb-command:run diff --git a/tests/debuginfo/vec-slices.rs b/tests/debuginfo/vec-slices.rs index 5a8481699b2..a8235dba40c 100644 --- a/tests/debuginfo/vec-slices.rs +++ b/tests/debuginfo/vec-slices.rs @@ -1,4 +1,6 @@ //@ min-lldb-version: 310 +//@ ignore-gdb-version: 15.0 - 99.0 +// ^ test temporarily disabled as it fails under gdb 15 //@ compile-flags:-g diff --git a/tests/run-make/relro-levels/Makefile b/tests/run-make/relro-levels/Makefile index e0402f59f12..94f08bcb494 100644 --- a/tests/run-make/relro-levels/Makefile +++ b/tests/run-make/relro-levels/Makefile @@ -3,20 +3,20 @@ include ../tools.mk # only-linux # -# This tests the different -Zrelro-level values, and makes sure that they work properly. +# This tests the different -Crelro-level values, and makes sure that they work properly. all: # Ensure that binaries built with the full relro level links them with both # RELRO and BIND_NOW for doing eager symbol resolving. - $(RUSTC) -Zrelro-level=full hello.rs + $(RUSTC) -Crelro-level=full hello.rs readelf -l $(TMPDIR)/hello | grep -q GNU_RELRO readelf -d $(TMPDIR)/hello | grep -q BIND_NOW - $(RUSTC) -Zrelro-level=partial hello.rs + $(RUSTC) -Crelro-level=partial hello.rs readelf -l $(TMPDIR)/hello | grep -q GNU_RELRO # Ensure that we're *not* built with RELRO when setting it to off. We do # not want to check for BIND_NOW however, as the linker might have that # enabled by default. - $(RUSTC) -Zrelro-level=off hello.rs + $(RUSTC) -Crelro-level=off hello.rs ! readelf -l $(TMPDIR)/hello | grep -q GNU_RELRO diff --git a/tests/rustdoc/auxiliary/issue-73061.rs b/tests/rustdoc-ui/auxiliary/issue-73061.rs index 9a2e4aaf75e..9a2e4aaf75e 100644 --- a/tests/rustdoc/auxiliary/issue-73061.rs +++ b/tests/rustdoc-ui/auxiliary/issue-73061.rs diff --git a/tests/rustdoc-ui/check-cfg/check-cfg.rs b/tests/rustdoc-ui/check-cfg.rs index 27b09985728..6ca37db75af 100644 --- a/tests/rustdoc-ui/check-cfg/check-cfg.rs +++ b/tests/rustdoc-ui/check-cfg.rs @@ -1,5 +1,5 @@ //@ check-pass -//@ compile-flags: --check-cfg=cfg() -Z unstable-options +//@ compile-flags: --check-cfg=cfg() /// uniz is nor a builtin nor pass as arguments so is unexpected #[cfg(uniz)] diff --git a/tests/rustdoc-ui/check-cfg/check-cfg.stderr b/tests/rustdoc-ui/check-cfg.stderr index 3bca5dd0834..6f026cee41e 100644 --- a/tests/rustdoc-ui/check-cfg/check-cfg.stderr +++ b/tests/rustdoc-ui/check-cfg.stderr @@ -5,7 +5,7 @@ LL | #[cfg(uniz)] | ^^^^ help: there is a config with a similar name: `unix` | = help: to expect this configuration use `--check-cfg=cfg(uniz)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: 1 warning emitted diff --git a/tests/rustdoc-ui/check-cfg/check-cfg-test.stderr b/tests/rustdoc-ui/check-cfg/check-cfg-test.stderr deleted file mode 100644 index 9770be2f191..00000000000 --- a/tests/rustdoc-ui/check-cfg/check-cfg-test.stderr +++ /dev/null @@ -1,11 +0,0 @@ -warning: unexpected `cfg` condition value - --> $DIR/check-cfg-test.rs:9:7 - | -LL | #[cfg(feature = "invalid")] - | ^^^^^^^^^^^^^^^^^^^ - | - = note: expected values for `feature` are: test - = note: `#[warn(unexpected_cfgs)]` on by default - -warning: 1 warning emitted - diff --git a/tests/rustdoc-ui/check-cfg/check-cfg-unstable.rs b/tests/rustdoc-ui/check-cfg/check-cfg-unstable.rs deleted file mode 100644 index b24b198e807..00000000000 --- a/tests/rustdoc-ui/check-cfg/check-cfg-unstable.rs +++ /dev/null @@ -1,2 +0,0 @@ -//@ check-fail -//@ compile-flags: --check-cfg=cfg() diff --git a/tests/rustdoc-ui/check-cfg/check-cfg-unstable.stderr b/tests/rustdoc-ui/check-cfg/check-cfg-unstable.stderr deleted file mode 100644 index 9b27c2bc058..00000000000 --- a/tests/rustdoc-ui/check-cfg/check-cfg-unstable.stderr +++ /dev/null @@ -1,2 +0,0 @@ -error: the `-Z unstable-options` flag must also be passed to enable the flag `check-cfg` - diff --git a/tests/rustdoc-ui/doctest/check-cfg-test.stderr b/tests/rustdoc-ui/doctest/check-cfg-test.stderr index 5524f582d56..a2f173a2cb9 100644 --- a/tests/rustdoc-ui/doctest/check-cfg-test.stderr +++ b/tests/rustdoc-ui/doctest/check-cfg-test.stderr @@ -6,7 +6,7 @@ LL | #[cfg(feature = "invalid")] | = note: expected values for `feature` are: `test` = help: to expect this configuration use `--check-cfg=cfg(feature, values("invalid"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: 1 warning emitted diff --git a/tests/rustdoc/issue-56701.rs b/tests/rustdoc-ui/ice-blanket-impl-56701.rs index ba00743fcd1..13b0fc9032a 100644 --- a/tests/rustdoc/issue-56701.rs +++ b/tests/rustdoc-ui/ice-blanket-impl-56701.rs @@ -1,4 +1,6 @@ +//@ check-pass // This shouldn't cause a stack overflow when rustdoc is run +// https://github.com/rust-lang/rust/issues/56701 use std::ops::Deref; use std::ops::DerefMut; diff --git a/tests/rustdoc/issue-73061-cross-crate-opaque-assoc-type.rs b/tests/rustdoc-ui/ice-cross-crate-opaque-assoc-type-73061.rs index e16aeac65cc..1434bef49e0 100644 --- a/tests/rustdoc/issue-73061-cross-crate-opaque-assoc-type.rs +++ b/tests/rustdoc-ui/ice-cross-crate-opaque-assoc-type-73061.rs @@ -1,5 +1,6 @@ -// Regression test for ICE #73061 +// Regression test for ICE https://github.com/rust-lang/rust/issues/73061 +//@ check-pass //@ aux-build:issue-73061.rs extern crate issue_73061; diff --git a/tests/rustdoc/issue-78673.rs b/tests/rustdoc/blanket-impl-78673.rs index d09141c3204..d7ceef2c057 100644 --- a/tests/rustdoc/issue-78673.rs +++ b/tests/rustdoc/blanket-impl-78673.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/78673 #![crate_name = "issue_78673"] pub trait Something {} diff --git a/tests/rustdoc/issue-76501.rs b/tests/rustdoc/const-fn-76501.rs index 5caea0ec992..4a7284f9851 100644 --- a/tests/rustdoc/issue-76501.rs +++ b/tests/rustdoc/const-fn-76501.rs @@ -1,4 +1,7 @@ -// @has 'issue_76501/fn.bloop.html' '//pre' 'pub const fn bloop() -> i32' +// https://github.com/rust-lang/rust/issues/76501 +#![crate_name="foo"] + +// @has 'foo/fn.bloop.html' '//pre' 'pub const fn bloop() -> i32' /// A useless function that always returns 1. pub const fn bloop() -> i32 { 1 @@ -8,7 +11,7 @@ pub const fn bloop() -> i32 { pub struct Struct {} impl Struct { - // @has 'issue_76501/struct.Struct.html' '//*[@class="method"]' \ + // @has 'foo/struct.Struct.html' '//*[@class="method"]' \ // 'pub const fn blurp() -> i32' /// A useless function that always returns 1. pub const fn blurp() -> i32 { diff --git a/tests/rustdoc/issue-79201.rs b/tests/rustdoc/doc-cfg-inherit-from-module-79201.rs index f95d79cd493..76260c4a502 100644 --- a/tests/rustdoc/issue-79201.rs +++ b/tests/rustdoc/doc-cfg-inherit-from-module-79201.rs @@ -1,6 +1,9 @@ +// https://github.com/rust-lang/rust/issues/79201 +#![crate_name="foo"] + #![feature(doc_cfg)] -// @has 'issue_79201/trait.Foo.html' +// @has 'foo/trait.Foo.html' // @count - '//*[@class="stab portability"]' 6 // @matches - '//*[@class="stab portability"]' 'crate feature foo-root' // @matches - '//*[@class="stab portability"]' 'crate feature foo-public-mod' diff --git a/tests/rustdoc/issue-67851-both.rs b/tests/rustdoc/doc-hidden-private-67851-both.rs index ed59652838e..e6eb6a68ffd 100644 --- a/tests/rustdoc/issue-67851-both.rs +++ b/tests/rustdoc/doc-hidden-private-67851-both.rs @@ -1,8 +1,10 @@ //@ compile-flags: -Zunstable-options --document-private-items --document-hidden-items +// https://github.com/rust-lang/rust/issues/67851 +#![crate_name="foo"] -// @has issue_67851_both/struct.Hidden.html +// @has foo/struct.Hidden.html #[doc(hidden)] pub struct Hidden; -// @has issue_67851_both/struct.Private.html +// @has foo/struct.Private.html struct Private; diff --git a/tests/rustdoc/doc-hidden-private-67851-hidden.rs b/tests/rustdoc/doc-hidden-private-67851-hidden.rs new file mode 100644 index 00000000000..9767f9c84f9 --- /dev/null +++ b/tests/rustdoc/doc-hidden-private-67851-hidden.rs @@ -0,0 +1,10 @@ +//@ compile-flags: -Zunstable-options --document-hidden-items +// https://github.com/rust-lang/rust/issues/67851 +#![crate_name="foo"] + +// @has foo/struct.Hidden.html +#[doc(hidden)] +pub struct Hidden; + +// @!has foo/struct.Private.html +struct Private; diff --git a/tests/rustdoc/doc-hidden-private-67851-neither.rs b/tests/rustdoc/doc-hidden-private-67851-neither.rs new file mode 100644 index 00000000000..6c6e84da43d --- /dev/null +++ b/tests/rustdoc/doc-hidden-private-67851-neither.rs @@ -0,0 +1,9 @@ +// https://github.com/rust-lang/rust/issues/67851 +#![crate_name="foo"] + +// @!has foo/struct.Hidden.html +#[doc(hidden)] +pub struct Hidden; + +// @!has foo/struct.Private.html +struct Private; diff --git a/tests/rustdoc/doc-hidden-private-67851-private.rs b/tests/rustdoc/doc-hidden-private-67851-private.rs new file mode 100644 index 00000000000..4aa39f5b789 --- /dev/null +++ b/tests/rustdoc/doc-hidden-private-67851-private.rs @@ -0,0 +1,10 @@ +//@ compile-flags: --document-private-items +// https://github.com/rust-lang/rust/issues/67851 +#![crate_name="foo"] + +// @!has foo/struct.Hidden.html +#[doc(hidden)] +pub struct Hidden; + +// @has foo/struct.Private.html +struct Private; diff --git a/tests/rustdoc/issue-60522-duplicated-glob-reexport.rs b/tests/rustdoc/duplicated-glob-reexport-60522.rs index 50def2c3cd9..50def2c3cd9 100644 --- a/tests/rustdoc/issue-60522-duplicated-glob-reexport.rs +++ b/tests/rustdoc/duplicated-glob-reexport-60522.rs diff --git a/tests/rustdoc/issue-74083.rs b/tests/rustdoc/hide-mut-methods-if-no-derefmut-impl-74083.rs index c7f5d7eaa58..0bed7e2fb62 100644 --- a/tests/rustdoc/issue-74083.rs +++ b/tests/rustdoc/hide-mut-methods-if-no-derefmut-impl-74083.rs @@ -1,3 +1,6 @@ +// https://github.com/rust-lang/rust/issues/74083 +#![crate_name="foo"] + use std::ops::Deref; pub struct Foo; @@ -6,7 +9,7 @@ impl Foo { pub fn foo(&mut self) {} } -// @has issue_74083/struct.Bar.html +// @has foo/struct.Bar.html // @!has - '//div[@class="sidebar-links"]/a[@href="#method.foo"]' 'foo' pub struct Bar { foo: Foo, diff --git a/tests/rustdoc/issue-75588.rs b/tests/rustdoc/implementors-unstable-75588.rs index 4f790994b41..befddf6b788 100644 --- a/tests/rustdoc/issue-75588.rs +++ b/tests/rustdoc/implementors-unstable-75588.rs @@ -2,6 +2,7 @@ //@ aux-build:real_gimli.rs // Ensure unstably exported traits have their Implementors sections. +// https://github.com/rust-lang/rust/issues/75588 #![crate_name = "foo"] #![feature(extremely_unstable_foo)] diff --git a/tests/rustdoc/auxiliary/issue-57180.rs b/tests/rustdoc/inline_cross/auxiliary/issue-57180.rs index cd905b7a598..cd905b7a598 100644 --- a/tests/rustdoc/auxiliary/issue-57180.rs +++ b/tests/rustdoc/inline_cross/auxiliary/issue-57180.rs diff --git a/tests/rustdoc/issue-57180.rs b/tests/rustdoc/inline_cross/ice-import-crate-57180.rs index aa6b7758399..264b53cbd9a 100644 --- a/tests/rustdoc/issue-57180.rs +++ b/tests/rustdoc/inline_cross/ice-import-crate-57180.rs @@ -1,4 +1,5 @@ //@ aux-build:issue-57180.rs +// https://github.com/rust-lang/rust/issues/57180 extern crate issue_57180; use issue_57180::Trait; diff --git a/tests/rustdoc/issue-72340.rs b/tests/rustdoc/intra-doc-link-method-trait-impl-72340.rs index 64044cfe947..880a308f9ab 100644 --- a/tests/rustdoc/issue-72340.rs +++ b/tests/rustdoc/intra-doc-link-method-trait-impl-72340.rs @@ -1,3 +1,5 @@ +// https://github.com/rust-lang/rust/issues/72340 + #![crate_name = "foo"] pub struct Body; diff --git a/tests/rustdoc/issue-67851-hidden.rs b/tests/rustdoc/issue-67851-hidden.rs deleted file mode 100644 index 6d532adc06f..00000000000 --- a/tests/rustdoc/issue-67851-hidden.rs +++ /dev/null @@ -1,8 +0,0 @@ -//@ compile-flags: -Zunstable-options --document-hidden-items - -// @has issue_67851_hidden/struct.Hidden.html -#[doc(hidden)] -pub struct Hidden; - -// @!has issue_67851_hidden/struct.Private.html -struct Private; diff --git a/tests/rustdoc/issue-67851-neither.rs b/tests/rustdoc/issue-67851-neither.rs deleted file mode 100644 index 4e3cd832853..00000000000 --- a/tests/rustdoc/issue-67851-neither.rs +++ /dev/null @@ -1,6 +0,0 @@ -// @!has issue_67851_neither/struct.Hidden.html -#[doc(hidden)] -pub struct Hidden; - -// @!has issue_67851_neither/struct.Private.html -struct Private; diff --git a/tests/rustdoc/issue-67851-private.rs b/tests/rustdoc/issue-67851-private.rs deleted file mode 100644 index ead7ddf397f..00000000000 --- a/tests/rustdoc/issue-67851-private.rs +++ /dev/null @@ -1,8 +0,0 @@ -//@ compile-flags: --document-private-items - -// @!has issue_67851_private/struct.Hidden.html -#[doc(hidden)] -pub struct Hidden; - -// @has issue_67851_private/struct.Private.html -struct Private; diff --git a/tests/rustdoc/issue-60482.rs b/tests/rustdoc/markdown-60482.rs index 0fd1daa746d..e40af12e022 100644 --- a/tests/rustdoc/issue-60482.rs +++ b/tests/rustdoc/markdown-60482.rs @@ -1,4 +1,5 @@ // This code caused a panic in `pulldown-cmark` 0.4.1. +// https://github.com/rust-lang/rust/issues/60482 pub const BASIC_UNICODE: bool = true; diff --git a/tests/rustdoc/issue-78701.rs b/tests/rustdoc/sidebar-trait-impl-disambiguate-78701.rs index 3f1638d5ffc..89b7ccb5222 100644 --- a/tests/rustdoc/issue-78701.rs +++ b/tests/rustdoc/sidebar-trait-impl-disambiguate-78701.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/78701 #![crate_name = "foo"] // This test ensures that if a blanket impl has the same ID as another impl, it'll diff --git a/tests/rustdoc/issue-56822.rs b/tests/rustdoc/synthetic_auto/auto-trait-lifetimes-56822.rs index c9a74335702..315b20ddd70 100644 --- a/tests/rustdoc/issue-56822.rs +++ b/tests/rustdoc/synthetic_auto/auto-trait-lifetimes-56822.rs @@ -1,3 +1,6 @@ +// https://github.com/rust-lang/rust/issues/56822 +#![crate_name="foo"] + struct Wrapper<T>(T); trait MyTrait { @@ -16,7 +19,7 @@ impl<'a, T> MyTrait for Inner<'a, T> { type Output = &'a T; } -// @has issue_56822/struct.Parser.html +// @has foo/struct.Parser.html // @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ // "impl<'a> Send for Parser<'a>" pub struct Parser<'a> { diff --git a/tests/rustdoc/issue-60726.rs b/tests/rustdoc/synthetic_auto/send-impl-conditional-60726.rs index e337e4a4f7a..ea10aee58e4 100644 --- a/tests/rustdoc/issue-60726.rs +++ b/tests/rustdoc/synthetic_auto/send-impl-conditional-60726.rs @@ -1,3 +1,6 @@ +// https://github.com/rust-lang/rust/issues/60726 +#![crate_name="foo"] + use std::marker::PhantomData; pub struct True; @@ -25,7 +28,7 @@ where I:InterfaceType<Send=True> {} -// @has issue_60726/struct.IntoIter.html +// @has foo/struct.IntoIter.html // @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ // "impl<T> !Send for IntoIter<T>" // @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \ diff --git a/tests/rustdoc/issue-61592.rs b/tests/rustdoc/underscore-import-61592.rs index 068310fa6a3..d403f2cc7ab 100644 --- a/tests/rustdoc/issue-61592.rs +++ b/tests/rustdoc/underscore-import-61592.rs @@ -1,14 +1,16 @@ //@ aux-build:issue-61592.rs +// https://github.com/rust-lang/rust/issues/61592 +#![crate_name="bar"] extern crate foo; -// @has issue_61592/index.html +// @has bar/index.html // @has - '//a[@href="#reexports"]' 'Re-exports' // @has - '//code' 'pub use foo::FooTrait as _;' // @!has - '//a[@href="trait._.html"]' '' pub use foo::FooTrait as _; -// @has issue_61592/index.html +// @has bar/index.html // @has - '//a[@href="#reexports"]' 'Re-exports' // @has - '//code' 'pub use foo::FooStruct as _;' // @!has - '//a[@href="struct._.html"]' '' diff --git a/tests/ui/check-cfg/allow-at-crate-level.rs b/tests/ui/check-cfg/allow-at-crate-level.rs index 48258b97ccc..03b4676ad5f 100644 --- a/tests/ui/check-cfg/allow-at-crate-level.rs +++ b/tests/ui/check-cfg/allow-at-crate-level.rs @@ -1,7 +1,7 @@ // This test check that #![allow(unexpected_cfgs)] works with --cfg // //@ check-pass -//@ compile-flags: --cfg=unexpected --check-cfg=cfg() -Z unstable-options +//@ compile-flags: --cfg=unexpected --check-cfg=cfg() #![allow(unexpected_cfgs)] diff --git a/tests/ui/check-cfg/allow-macro-cfg.rs b/tests/ui/check-cfg/allow-macro-cfg.rs index d3999af7766..3db6e18d77a 100644 --- a/tests/ui/check-cfg/allow-macro-cfg.rs +++ b/tests/ui/check-cfg/allow-macro-cfg.rs @@ -1,7 +1,7 @@ // This test check that local #[allow(unexpected_cfgs)] works // //@ check-pass -//@ compile-flags: --check-cfg=cfg() -Z unstable-options +//@ compile-flags: --check-cfg=cfg() #[allow(unexpected_cfgs)] fn foo() { diff --git a/tests/ui/check-cfg/allow-same-level.rs b/tests/ui/check-cfg/allow-same-level.rs index 231ad522c8d..e932ece6ee7 100644 --- a/tests/ui/check-cfg/allow-same-level.rs +++ b/tests/ui/check-cfg/allow-same-level.rs @@ -1,7 +1,7 @@ // This test check that #[allow(unexpected_cfgs)] doesn't work if put on the same level // //@ check-pass -//@ compile-flags: --check-cfg=cfg() -Z unstable-options +//@ compile-flags: --check-cfg=cfg() #[allow(unexpected_cfgs)] #[cfg(FALSE)] diff --git a/tests/ui/check-cfg/allow-same-level.stderr b/tests/ui/check-cfg/allow-same-level.stderr index 493132d462a..349f41cb142 100644 --- a/tests/ui/check-cfg/allow-same-level.stderr +++ b/tests/ui/check-cfg/allow-same-level.stderr @@ -6,7 +6,7 @@ LL | #[cfg(FALSE)] | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows` = help: to expect this configuration use `--check-cfg=cfg(FALSE)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: 1 warning emitted diff --git a/tests/ui/check-cfg/allow-top-level.rs b/tests/ui/check-cfg/allow-top-level.rs index c77a0c7c97b..0f88543d847 100644 --- a/tests/ui/check-cfg/allow-top-level.rs +++ b/tests/ui/check-cfg/allow-top-level.rs @@ -1,7 +1,7 @@ // This test check that a top-level #![allow(unexpected_cfgs)] works // //@ check-pass -//@ compile-flags: --check-cfg=cfg() -Z unstable-options +//@ compile-flags: --check-cfg=cfg() #![allow(unexpected_cfgs)] diff --git a/tests/ui/check-cfg/allow-upper-level.rs b/tests/ui/check-cfg/allow-upper-level.rs index 97339a887bf..d03d0cab37b 100644 --- a/tests/ui/check-cfg/allow-upper-level.rs +++ b/tests/ui/check-cfg/allow-upper-level.rs @@ -1,7 +1,7 @@ // This test check that #[allow(unexpected_cfgs)] work if put on an upper level // //@ check-pass -//@ compile-flags: --check-cfg=cfg() -Z unstable-options +//@ compile-flags: --check-cfg=cfg() #[allow(unexpected_cfgs)] mod aa { diff --git a/tests/ui/check-cfg/cargo-feature.none.stderr b/tests/ui/check-cfg/cargo-feature.none.stderr index 09a1c950267..0b914c2bc35 100644 --- a/tests/ui/check-cfg/cargo-feature.none.stderr +++ b/tests/ui/check-cfg/cargo-feature.none.stderr @@ -1,5 +1,5 @@ warning: unexpected `cfg` condition value: `serde` - --> $DIR/cargo-feature.rs:14:7 + --> $DIR/cargo-feature.rs:13:7 | LL | #[cfg(feature = "serde")] | ^^^^^^^^^^^^^^^^^ help: remove the condition @@ -10,7 +10,7 @@ LL | #[cfg(feature = "serde")] = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition value: (none) - --> $DIR/cargo-feature.rs:18:7 + --> $DIR/cargo-feature.rs:17:7 | LL | #[cfg(feature)] | ^^^^^^^ help: remove the condition @@ -20,7 +20,7 @@ LL | #[cfg(feature)] = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `tokio_unstable` - --> $DIR/cargo-feature.rs:22:7 + --> $DIR/cargo-feature.rs:21:7 | LL | #[cfg(tokio_unstable)] | ^^^^^^^^^^^^^^ @@ -30,7 +30,7 @@ LL | #[cfg(tokio_unstable)] = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `CONFIG_NVME` - --> $DIR/cargo-feature.rs:26:7 + --> $DIR/cargo-feature.rs:25:7 | LL | #[cfg(CONFIG_NVME = "m")] | ^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/check-cfg/cargo-feature.rs b/tests/ui/check-cfg/cargo-feature.rs index ba451921d79..ced0d381d2d 100644 --- a/tests/ui/check-cfg/cargo-feature.rs +++ b/tests/ui/check-cfg/cargo-feature.rs @@ -5,7 +5,6 @@ //@ check-pass //@ revisions: some none //@ rustc-env:CARGO_CRATE_NAME=foo -//@ compile-flags: -Z unstable-options //@ [none]compile-flags: --check-cfg=cfg(feature,values()) //@ [some]compile-flags: --check-cfg=cfg(feature,values("bitcode")) //@ [some]compile-flags: --check-cfg=cfg(CONFIG_NVME,values("y")) diff --git a/tests/ui/check-cfg/cargo-feature.some.stderr b/tests/ui/check-cfg/cargo-feature.some.stderr index 4db9c66fc86..1a4ef89efc1 100644 --- a/tests/ui/check-cfg/cargo-feature.some.stderr +++ b/tests/ui/check-cfg/cargo-feature.some.stderr @@ -1,5 +1,5 @@ warning: unexpected `cfg` condition value: `serde` - --> $DIR/cargo-feature.rs:14:7 + --> $DIR/cargo-feature.rs:13:7 | LL | #[cfg(feature = "serde")] | ^^^^^^^^^^^^^^^^^ @@ -10,7 +10,7 @@ LL | #[cfg(feature = "serde")] = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition value: (none) - --> $DIR/cargo-feature.rs:18:7 + --> $DIR/cargo-feature.rs:17:7 | LL | #[cfg(feature)] | ^^^^^^^- help: specify a config value: `= "bitcode"` @@ -20,7 +20,7 @@ LL | #[cfg(feature)] = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `tokio_unstable` - --> $DIR/cargo-feature.rs:22:7 + --> $DIR/cargo-feature.rs:21:7 | LL | #[cfg(tokio_unstable)] | ^^^^^^^^^^^^^^ @@ -30,7 +30,7 @@ LL | #[cfg(tokio_unstable)] = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `m` - --> $DIR/cargo-feature.rs:26:7 + --> $DIR/cargo-feature.rs:25:7 | LL | #[cfg(CONFIG_NVME = "m")] | ^^^^^^^^^^^^^^--- diff --git a/tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.rs b/tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.rs index 35c5f2ae31c..79d4e45c13b 100644 --- a/tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.rs +++ b/tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.rs @@ -2,7 +2,6 @@ // This test checks we won't suggest more than 3 span suggestions for cfg names // //@ check-pass -//@ compile-flags: -Z unstable-options //@ compile-flags: --check-cfg=cfg(foo,values("value")) --check-cfg=cfg(bar,values("value")) --check-cfg=cfg(bee,values("value")) --check-cfg=cfg(cow,values("value")) #[cfg(value)] diff --git a/tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.stderr b/tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.stderr index 9c190117e74..23ae4c55e42 100644 --- a/tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.stderr +++ b/tests/ui/check-cfg/cfg-value-for-cfg-name-duplicate.stderr @@ -1,12 +1,12 @@ warning: unexpected `cfg` condition name: `value` - --> $DIR/cfg-value-for-cfg-name-duplicate.rs:8:7 + --> $DIR/cfg-value-for-cfg-name-duplicate.rs:7:7 | LL | #[cfg(value)] | ^^^^^ | = help: expected names are: `bar`, `bee`, `clippy`, `cow`, `debug_assertions`, `doc`, `doctest`, `foo`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows` = help: to expect this configuration use `--check-cfg=cfg(value)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: 1 warning emitted diff --git a/tests/ui/check-cfg/cfg-value-for-cfg-name-multiple.rs b/tests/ui/check-cfg/cfg-value-for-cfg-name-multiple.rs index 6caedbe719e..f2fd050bb75 100644 --- a/tests/ui/check-cfg/cfg-value-for-cfg-name-multiple.rs +++ b/tests/ui/check-cfg/cfg-value-for-cfg-name-multiple.rs @@ -2,7 +2,6 @@ // This test checks that when a single cfg has a value for user's specified name // //@ check-pass -//@ compile-flags: -Z unstable-options //@ compile-flags: --check-cfg=cfg(foo,values("my_value")) --check-cfg=cfg(bar,values("my_value")) #[cfg(my_value)] diff --git a/tests/ui/check-cfg/cfg-value-for-cfg-name-multiple.stderr b/tests/ui/check-cfg/cfg-value-for-cfg-name-multiple.stderr index 7113790b83a..b5faaf6029c 100644 --- a/tests/ui/check-cfg/cfg-value-for-cfg-name-multiple.stderr +++ b/tests/ui/check-cfg/cfg-value-for-cfg-name-multiple.stderr @@ -1,12 +1,12 @@ warning: unexpected `cfg` condition name: `my_value` - --> $DIR/cfg-value-for-cfg-name-multiple.rs:8:7 + --> $DIR/cfg-value-for-cfg-name-multiple.rs:7:7 | LL | #[cfg(my_value)] | ^^^^^^^^ | = help: expected names are: `bar`, `clippy`, `debug_assertions`, `doc`, `doctest`, `foo`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows` = help: to expect this configuration use `--check-cfg=cfg(my_value)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default help: found config with similar value | diff --git a/tests/ui/check-cfg/cfg-value-for-cfg-name.rs b/tests/ui/check-cfg/cfg-value-for-cfg-name.rs index eade190a75c..e8f9095655b 100644 --- a/tests/ui/check-cfg/cfg-value-for-cfg-name.rs +++ b/tests/ui/check-cfg/cfg-value-for-cfg-name.rs @@ -3,7 +3,6 @@ // suggest to use `#[cfg(target_os = "linux")]` instead of `#[cfg(linux)]` // //@ check-pass -//@ compile-flags: -Z unstable-options //@ compile-flags: --check-cfg=cfg() #[cfg(linux)] diff --git a/tests/ui/check-cfg/cfg-value-for-cfg-name.stderr b/tests/ui/check-cfg/cfg-value-for-cfg-name.stderr index ba9f5f4acbd..01586a6c71d 100644 --- a/tests/ui/check-cfg/cfg-value-for-cfg-name.stderr +++ b/tests/ui/check-cfg/cfg-value-for-cfg-name.stderr @@ -1,22 +1,22 @@ warning: unexpected `cfg` condition name: `linux` - --> $DIR/cfg-value-for-cfg-name.rs:9:7 + --> $DIR/cfg-value-for-cfg-name.rs:8:7 | LL | #[cfg(linux)] | ^^^^^ help: found config with similar value: `target_os = "linux"` | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows` = help: to expect this configuration use `--check-cfg=cfg(linux)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition name: `linux` - --> $DIR/cfg-value-for-cfg-name.rs:14:7 + --> $DIR/cfg-value-for-cfg-name.rs:13:7 | LL | #[cfg(linux = "os-name")] | ^^^^^^^^^^^^^^^^^ | = help: to expect this configuration use `--check-cfg=cfg(linux, values("os-name"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: 2 warnings emitted diff --git a/tests/ui/check-cfg/compact-names.rs b/tests/ui/check-cfg/compact-names.rs index 6592d2acb82..ddbd20b99b2 100644 --- a/tests/ui/check-cfg/compact-names.rs +++ b/tests/ui/check-cfg/compact-names.rs @@ -1,7 +1,7 @@ // This test check that we correctly emit an warning for compact cfg // //@ check-pass -//@ compile-flags: --check-cfg=cfg() -Z unstable-options +//@ compile-flags: --check-cfg=cfg() #![feature(cfg_target_compact)] diff --git a/tests/ui/check-cfg/compact-names.stderr b/tests/ui/check-cfg/compact-names.stderr index 446b8f408e3..929501b420a 100644 --- a/tests/ui/check-cfg/compact-names.stderr +++ b/tests/ui/check-cfg/compact-names.stderr @@ -6,7 +6,7 @@ LL | #[cfg(target(os = "linux", architecture = "arm"))] | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows` = help: to expect this configuration use `--check-cfg=cfg(target_architecture, values("arm"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: 1 warning emitted diff --git a/tests/ui/check-cfg/compact-values.rs b/tests/ui/check-cfg/compact-values.rs index 8df2bf55264..bda4686ebd7 100644 --- a/tests/ui/check-cfg/compact-values.rs +++ b/tests/ui/check-cfg/compact-values.rs @@ -1,7 +1,7 @@ // This test check that we correctly emit an warning for compact cfg // //@ check-pass -//@ compile-flags: --check-cfg=cfg() -Z unstable-options +//@ compile-flags: --check-cfg=cfg() #![feature(cfg_target_compact)] diff --git a/tests/ui/check-cfg/compact-values.stderr b/tests/ui/check-cfg/compact-values.stderr index 661ee7bff52..45d084c46bf 100644 --- a/tests/ui/check-cfg/compact-values.stderr +++ b/tests/ui/check-cfg/compact-values.stderr @@ -5,7 +5,7 @@ LL | #[cfg(target(os = "linux", pointer_width = "X"))] | ^^^^^^^^^^^^^^^^^^^ | = note: expected values for `target_pointer_width` are: `16`, `32`, `64` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: 1 warning emitted diff --git a/tests/ui/check-cfg/concat-values.rs b/tests/ui/check-cfg/concat-values.rs index 0b2c1949ca3..c546590a2c1 100644 --- a/tests/ui/check-cfg/concat-values.rs +++ b/tests/ui/check-cfg/concat-values.rs @@ -1,5 +1,4 @@ //@ check-pass -//@ compile-flags: -Z unstable-options //@ compile-flags: --check-cfg=cfg(my_cfg,values("foo")) --check-cfg=cfg(my_cfg,values("bar")) //@ compile-flags: --check-cfg=cfg(my_cfg,values()) diff --git a/tests/ui/check-cfg/concat-values.stderr b/tests/ui/check-cfg/concat-values.stderr index 6fe9f2baa09..ca8b58f73e5 100644 --- a/tests/ui/check-cfg/concat-values.stderr +++ b/tests/ui/check-cfg/concat-values.stderr @@ -1,23 +1,23 @@ warning: unexpected `cfg` condition value: (none) - --> $DIR/concat-values.rs:6:7 + --> $DIR/concat-values.rs:5:7 | LL | #[cfg(my_cfg)] | ^^^^^^ | = note: expected values for `my_cfg` are: `bar`, `foo` = help: to expect this configuration use `--check-cfg=cfg(my_cfg)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition value: `unk` - --> $DIR/concat-values.rs:10:7 + --> $DIR/concat-values.rs:9:7 | LL | #[cfg(my_cfg = "unk")] | ^^^^^^^^^^^^^^ | = note: expected values for `my_cfg` are: `bar`, `foo` = help: to expect this configuration use `--check-cfg=cfg(my_cfg, values("unk"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: 2 warnings emitted diff --git a/tests/ui/check-cfg/diagnotics.rs b/tests/ui/check-cfg/diagnotics.rs index 134bfcf8ef4..cccd6f9bbc3 100644 --- a/tests/ui/check-cfg/diagnotics.rs +++ b/tests/ui/check-cfg/diagnotics.rs @@ -2,7 +2,7 @@ //@ revisions: cargo rustc //@ [rustc]unset-rustc-env:CARGO_CRATE_NAME //@ [cargo]rustc-env:CARGO_CRATE_NAME=foo -//@ compile-flags: --check-cfg=cfg(feature,values("foo")) --check-cfg=cfg(no_values) -Z unstable-options +//@ compile-flags: --check-cfg=cfg(feature,values("foo")) --check-cfg=cfg(no_values) #[cfg(featur)] //~^ WARNING unexpected `cfg` condition name diff --git a/tests/ui/check-cfg/diagnotics.rustc.stderr b/tests/ui/check-cfg/diagnotics.rustc.stderr index 2b1129a3920..0a938d2143e 100644 --- a/tests/ui/check-cfg/diagnotics.rustc.stderr +++ b/tests/ui/check-cfg/diagnotics.rustc.stderr @@ -6,7 +6,7 @@ LL | #[cfg(featur)] | = help: expected values for `feature` are: `foo` = help: to expect this configuration use `--check-cfg=cfg(featur)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition name: `featur` @@ -16,7 +16,7 @@ LL | #[cfg(featur = "foo")] | ^^^^^^^^^^^^^^ | = help: to expect this configuration use `--check-cfg=cfg(featur, values("foo"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration help: there is a config with a similar name and value | LL | #[cfg(feature = "foo")] @@ -30,7 +30,7 @@ LL | #[cfg(featur = "fo")] | = help: expected values for `feature` are: `foo` = help: to expect this configuration use `--check-cfg=cfg(featur, values("fo"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration help: there is a config with a similar name and different values | LL | #[cfg(feature = "foo")] @@ -43,7 +43,7 @@ LL | #[cfg(no_value)] | ^^^^^^^^ help: there is a config with a similar name: `no_values` | = help: to expect this configuration use `--check-cfg=cfg(no_value)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `no_value` --> $DIR/diagnotics.rs:26:7 @@ -52,7 +52,7 @@ LL | #[cfg(no_value = "foo")] | ^^^^^^^^^^^^^^^^ | = help: to expect this configuration use `--check-cfg=cfg(no_value, values("foo"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration help: there is a config with a similar name and no value | LL | #[cfg(no_values)] @@ -68,7 +68,7 @@ LL | #[cfg(no_values = "bar")] | = note: no expected value for `no_values` = help: to expect this configuration use `--check-cfg=cfg(no_values, values("bar"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: 6 warnings emitted diff --git a/tests/ui/check-cfg/empty-values.rs b/tests/ui/check-cfg/empty-values.rs index 07462951e1b..cad2d351b96 100644 --- a/tests/ui/check-cfg/empty-values.rs +++ b/tests/ui/check-cfg/empty-values.rs @@ -1,7 +1,7 @@ // Check that we detect unexpected value when none are allowed // //@ check-pass -//@ compile-flags: --check-cfg=cfg(foo,values()) -Zunstable-options +//@ compile-flags: --check-cfg=cfg(foo,values()) #[cfg(foo = "foo")] //~^ WARNING unexpected `cfg` condition value diff --git a/tests/ui/check-cfg/empty-values.stderr b/tests/ui/check-cfg/empty-values.stderr index e7b0b05d561..1f773b10316 100644 --- a/tests/ui/check-cfg/empty-values.stderr +++ b/tests/ui/check-cfg/empty-values.stderr @@ -6,7 +6,7 @@ LL | #[cfg(foo = "foo")] | = note: no expected values for `foo` = help: to expect this configuration use `--check-cfg=cfg(foo, values("foo"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition value: (none) @@ -17,7 +17,7 @@ LL | #[cfg(foo)] | = note: no expected values for `foo` = help: to expect this configuration use `--check-cfg=cfg(foo)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: 2 warnings emitted diff --git a/tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr b/tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr index d2870263342..9537d4f5172 100644 --- a/tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr +++ b/tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr @@ -1,16 +1,16 @@ warning: unexpected `cfg` condition name: `unknown_key` - --> $DIR/exhaustive-names-values.rs:10:7 + --> $DIR/exhaustive-names-values.rs:9:7 | LL | #[cfg(unknown_key = "value")] | ^^^^^^^^^^^^^^^^^^^^^ | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows` = help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition value: `value` - --> $DIR/exhaustive-names-values.rs:14:7 + --> $DIR/exhaustive-names-values.rs:13:7 | LL | #[cfg(test = "value")] | ^^^^---------- @@ -18,25 +18,25 @@ LL | #[cfg(test = "value")] | help: remove the value | = note: no expected value for `test` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `feature` - --> $DIR/exhaustive-names-values.rs:18:7 + --> $DIR/exhaustive-names-values.rs:17:7 | LL | #[cfg(feature = "unk")] | ^^^^^^^^^^^^^^^ | = help: to expect this configuration use `--check-cfg=cfg(feature, values("unk"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `feature` - --> $DIR/exhaustive-names-values.rs:25:7 + --> $DIR/exhaustive-names-values.rs:24:7 | LL | #[cfg(feature = "std")] | ^^^^^^^^^^^^^^^ | = help: to expect this configuration use `--check-cfg=cfg(feature, values("std"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: 4 warnings emitted diff --git a/tests/ui/check-cfg/exhaustive-names-values.feature.stderr b/tests/ui/check-cfg/exhaustive-names-values.feature.stderr index b24b10bb615..d63d8627953 100644 --- a/tests/ui/check-cfg/exhaustive-names-values.feature.stderr +++ b/tests/ui/check-cfg/exhaustive-names-values.feature.stderr @@ -1,16 +1,16 @@ warning: unexpected `cfg` condition name: `unknown_key` - --> $DIR/exhaustive-names-values.rs:10:7 + --> $DIR/exhaustive-names-values.rs:9:7 | LL | #[cfg(unknown_key = "value")] | ^^^^^^^^^^^^^^^^^^^^^ | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows` = help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition value: `value` - --> $DIR/exhaustive-names-values.rs:14:7 + --> $DIR/exhaustive-names-values.rs:13:7 | LL | #[cfg(test = "value")] | ^^^^---------- @@ -18,17 +18,17 @@ LL | #[cfg(test = "value")] | help: remove the value | = note: no expected value for `test` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `unk` - --> $DIR/exhaustive-names-values.rs:18:7 + --> $DIR/exhaustive-names-values.rs:17:7 | LL | #[cfg(feature = "unk")] | ^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `std` = help: to expect this configuration use `--check-cfg=cfg(feature, values("unk"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: 3 warnings emitted diff --git a/tests/ui/check-cfg/exhaustive-names-values.full.stderr b/tests/ui/check-cfg/exhaustive-names-values.full.stderr index b24b10bb615..d63d8627953 100644 --- a/tests/ui/check-cfg/exhaustive-names-values.full.stderr +++ b/tests/ui/check-cfg/exhaustive-names-values.full.stderr @@ -1,16 +1,16 @@ warning: unexpected `cfg` condition name: `unknown_key` - --> $DIR/exhaustive-names-values.rs:10:7 + --> $DIR/exhaustive-names-values.rs:9:7 | LL | #[cfg(unknown_key = "value")] | ^^^^^^^^^^^^^^^^^^^^^ | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows` = help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition value: `value` - --> $DIR/exhaustive-names-values.rs:14:7 + --> $DIR/exhaustive-names-values.rs:13:7 | LL | #[cfg(test = "value")] | ^^^^---------- @@ -18,17 +18,17 @@ LL | #[cfg(test = "value")] | help: remove the value | = note: no expected value for `test` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `unk` - --> $DIR/exhaustive-names-values.rs:18:7 + --> $DIR/exhaustive-names-values.rs:17:7 | LL | #[cfg(feature = "unk")] | ^^^^^^^^^^^^^^^ | = note: expected values for `feature` are: `std` = help: to expect this configuration use `--check-cfg=cfg(feature, values("unk"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: 3 warnings emitted diff --git a/tests/ui/check-cfg/exhaustive-names-values.rs b/tests/ui/check-cfg/exhaustive-names-values.rs index d554c19ef25..f6c3e1f575a 100644 --- a/tests/ui/check-cfg/exhaustive-names-values.rs +++ b/tests/ui/check-cfg/exhaustive-names-values.rs @@ -2,7 +2,6 @@ // //@ check-pass //@ revisions: empty_cfg feature full -//@ compile-flags: -Z unstable-options //@ [empty_cfg]compile-flags: --check-cfg=cfg() //@ [feature]compile-flags: --check-cfg=cfg(feature,values("std")) //@ [full]compile-flags: --check-cfg=cfg(feature,values("std")) --check-cfg=cfg() diff --git a/tests/ui/check-cfg/exhaustive-names.rs b/tests/ui/check-cfg/exhaustive-names.rs index edfb3705a7d..23bde4dff55 100644 --- a/tests/ui/check-cfg/exhaustive-names.rs +++ b/tests/ui/check-cfg/exhaustive-names.rs @@ -1,7 +1,7 @@ // Check warning for unexpected cfg // //@ check-pass -//@ compile-flags: --check-cfg=cfg() -Z unstable-options +//@ compile-flags: --check-cfg=cfg() #[cfg(unknown_key = "value")] //~^ WARNING unexpected `cfg` condition name diff --git a/tests/ui/check-cfg/exhaustive-names.stderr b/tests/ui/check-cfg/exhaustive-names.stderr index 6ca7ed93625..c42adec94b2 100644 --- a/tests/ui/check-cfg/exhaustive-names.stderr +++ b/tests/ui/check-cfg/exhaustive-names.stderr @@ -6,7 +6,7 @@ LL | #[cfg(unknown_key = "value")] | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows` = help: to expect this configuration use `--check-cfg=cfg(unknown_key, values("value"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: 1 warning emitted diff --git a/tests/ui/check-cfg/exhaustive-values.empty_cfg.stderr b/tests/ui/check-cfg/exhaustive-values.empty_cfg.stderr index e8cf29ae982..63ba2c68625 100644 --- a/tests/ui/check-cfg/exhaustive-values.empty_cfg.stderr +++ b/tests/ui/check-cfg/exhaustive-values.empty_cfg.stderr @@ -7,7 +7,7 @@ LL | #[cfg(test = "value")] | help: remove the value | = note: no expected value for `test` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: 1 warning emitted diff --git a/tests/ui/check-cfg/exhaustive-values.rs b/tests/ui/check-cfg/exhaustive-values.rs index 5e65caa6aea..029b2ff2c69 100644 --- a/tests/ui/check-cfg/exhaustive-values.rs +++ b/tests/ui/check-cfg/exhaustive-values.rs @@ -2,8 +2,8 @@ // //@ check-pass //@ revisions: empty_cfg without_names -//@ [empty_cfg]compile-flags: --check-cfg=cfg() -Z unstable-options -//@ [without_names]compile-flags: --check-cfg=cfg(any()) -Z unstable-options +//@ [empty_cfg]compile-flags: --check-cfg=cfg() +//@ [without_names]compile-flags: --check-cfg=cfg(any()) #[cfg(test = "value")] //~^ WARNING unexpected `cfg` condition value diff --git a/tests/ui/check-cfg/exhaustive-values.without_names.stderr b/tests/ui/check-cfg/exhaustive-values.without_names.stderr index e8cf29ae982..63ba2c68625 100644 --- a/tests/ui/check-cfg/exhaustive-values.without_names.stderr +++ b/tests/ui/check-cfg/exhaustive-values.without_names.stderr @@ -7,7 +7,7 @@ LL | #[cfg(test = "value")] | help: remove the value | = note: no expected value for `test` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: 1 warning emitted diff --git a/tests/ui/check-cfg/invalid-arguments.rs b/tests/ui/check-cfg/invalid-arguments.rs index bdcc202443b..84087a16e80 100644 --- a/tests/ui/check-cfg/invalid-arguments.rs +++ b/tests/ui/check-cfg/invalid-arguments.rs @@ -9,7 +9,6 @@ //@ revisions: mixed_values_any mixed_any any_values giberich unterminated //@ revisions: none_not_empty cfg_none // -//@ compile-flags: -Z unstable-options //@ [anything_else]compile-flags: --check-cfg=anything_else(...) //@ [string_for_name_1]compile-flags: --check-cfg=cfg("NOT_IDENT") //@ [string_for_name_2]compile-flags: --check-cfg=cfg(foo,"NOT_IDENT",bar) diff --git a/tests/ui/check-cfg/mix.rs b/tests/ui/check-cfg/mix.rs index 69156ab6763..ab8a180bc6f 100644 --- a/tests/ui/check-cfg/mix.rs +++ b/tests/ui/check-cfg/mix.rs @@ -3,7 +3,7 @@ // we correctly lint on the `cfg!` macro and `cfg_attr` attribute. // //@ check-pass -//@ compile-flags: --cfg feature="bar" --cfg unknown_name -Z unstable-options +//@ compile-flags: --cfg feature="bar" --cfg unknown_name //@ compile-flags: --check-cfg=cfg(feature,values("foo")) #[cfg(windows)] diff --git a/tests/ui/check-cfg/mix.stderr b/tests/ui/check-cfg/mix.stderr index 87fabf8245f..feb4f21b0ca 100644 --- a/tests/ui/check-cfg/mix.stderr +++ b/tests/ui/check-cfg/mix.stderr @@ -5,7 +5,7 @@ LL | #[cfg(widnows)] | ^^^^^^^ help: there is a config with a similar name: `windows` | = help: to expect this configuration use `--check-cfg=cfg(widnows)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition value: (none) @@ -16,7 +16,7 @@ LL | #[cfg(feature)] | = note: expected values for `feature` are: `foo` = help: to expect this configuration use `--check-cfg=cfg(feature)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `bar` --> $DIR/mix.rs:23:7 @@ -26,7 +26,7 @@ LL | #[cfg(feature = "bar")] | = note: expected values for `feature` are: `foo` = help: to expect this configuration use `--check-cfg=cfg(feature, values("bar"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `zebra` --> $DIR/mix.rs:27:7 @@ -36,7 +36,7 @@ LL | #[cfg(feature = "zebra")] | = note: expected values for `feature` are: `foo` = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `uu` --> $DIR/mix.rs:31:12 @@ -46,7 +46,7 @@ LL | #[cfg_attr(uu, test)] | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows` = help: to expect this configuration use `--check-cfg=cfg(uu)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `widnows` --> $DIR/mix.rs:40:10 @@ -55,7 +55,7 @@ LL | cfg!(widnows); | ^^^^^^^ help: there is a config with a similar name: `windows` | = help: to expect this configuration use `--check-cfg=cfg(widnows)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `bar` --> $DIR/mix.rs:43:10 @@ -65,7 +65,7 @@ LL | cfg!(feature = "bar"); | = note: expected values for `feature` are: `foo` = help: to expect this configuration use `--check-cfg=cfg(feature, values("bar"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `zebra` --> $DIR/mix.rs:45:10 @@ -75,7 +75,7 @@ LL | cfg!(feature = "zebra"); | = note: expected values for `feature` are: `foo` = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `xxx` --> $DIR/mix.rs:47:10 @@ -84,7 +84,7 @@ LL | cfg!(xxx = "foo"); | ^^^^^^^^^^^ | = help: to expect this configuration use `--check-cfg=cfg(xxx, values("foo"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `xxx` --> $DIR/mix.rs:49:10 @@ -93,7 +93,7 @@ LL | cfg!(xxx); | ^^^ | = help: to expect this configuration use `--check-cfg=cfg(xxx)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `xxx` --> $DIR/mix.rs:51:14 @@ -102,7 +102,7 @@ LL | cfg!(any(xxx, windows)); | ^^^ | = help: to expect this configuration use `--check-cfg=cfg(xxx)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `bad` --> $DIR/mix.rs:53:14 @@ -112,7 +112,7 @@ LL | cfg!(any(feature = "bad", windows)); | = note: expected values for `feature` are: `foo` = help: to expect this configuration use `--check-cfg=cfg(feature, values("bad"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `xxx` --> $DIR/mix.rs:55:23 @@ -121,7 +121,7 @@ LL | cfg!(any(windows, xxx)); | ^^^ | = help: to expect this configuration use `--check-cfg=cfg(xxx)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `xxx` --> $DIR/mix.rs:57:20 @@ -130,7 +130,7 @@ LL | cfg!(all(unix, xxx)); | ^^^ | = help: to expect this configuration use `--check-cfg=cfg(xxx)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `aa` --> $DIR/mix.rs:59:14 @@ -139,7 +139,7 @@ LL | cfg!(all(aa, bb)); | ^^ | = help: to expect this configuration use `--check-cfg=cfg(aa)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `bb` --> $DIR/mix.rs:59:18 @@ -148,7 +148,7 @@ LL | cfg!(all(aa, bb)); | ^^ | = help: to expect this configuration use `--check-cfg=cfg(bb)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `aa` --> $DIR/mix.rs:62:14 @@ -157,7 +157,7 @@ LL | cfg!(any(aa, bb)); | ^^ | = help: to expect this configuration use `--check-cfg=cfg(aa)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `bb` --> $DIR/mix.rs:62:18 @@ -166,7 +166,7 @@ LL | cfg!(any(aa, bb)); | ^^ | = help: to expect this configuration use `--check-cfg=cfg(bb)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `zebra` --> $DIR/mix.rs:65:20 @@ -176,7 +176,7 @@ LL | cfg!(any(unix, feature = "zebra")); | = note: expected values for `feature` are: `foo` = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `xxx` --> $DIR/mix.rs:67:14 @@ -185,7 +185,7 @@ LL | cfg!(any(xxx, feature = "zebra")); | ^^^ | = help: to expect this configuration use `--check-cfg=cfg(xxx)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `zebra` --> $DIR/mix.rs:67:19 @@ -195,7 +195,7 @@ LL | cfg!(any(xxx, feature = "zebra")); | = note: expected values for `feature` are: `foo` = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `xxx` --> $DIR/mix.rs:70:14 @@ -204,7 +204,7 @@ LL | cfg!(any(xxx, unix, xxx)); | ^^^ | = help: to expect this configuration use `--check-cfg=cfg(xxx)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `xxx` --> $DIR/mix.rs:70:25 @@ -213,7 +213,7 @@ LL | cfg!(any(xxx, unix, xxx)); | ^^^ | = help: to expect this configuration use `--check-cfg=cfg(xxx)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `zebra` --> $DIR/mix.rs:73:14 @@ -223,7 +223,7 @@ LL | cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra")); | = note: expected values for `feature` are: `foo` = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `zebra` --> $DIR/mix.rs:73:33 @@ -233,7 +233,7 @@ LL | cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra")); | = note: expected values for `feature` are: `foo` = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `zebra` --> $DIR/mix.rs:73:52 @@ -243,7 +243,7 @@ LL | cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra")); | = note: expected values for `feature` are: `foo` = help: to expect this configuration use `--check-cfg=cfg(feature, values("zebra"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `zebra` --> $DIR/mix.rs:77:10 @@ -252,7 +252,7 @@ LL | cfg!(target_feature = "zebra"); | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512er`, `avx512f`, `avx512fp16`, `avx512ifma`, `avx512pf`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, `avx512vpopcntdq`, `bf16`, `bmi1`, `bmi2` and 187 more - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: 27 warnings emitted diff --git a/tests/ui/check-cfg/no-expected-values.empty.stderr b/tests/ui/check-cfg/no-expected-values.empty.stderr index 0c0dbe9bac6..0f181cc2ab1 100644 --- a/tests/ui/check-cfg/no-expected-values.empty.stderr +++ b/tests/ui/check-cfg/no-expected-values.empty.stderr @@ -1,5 +1,5 @@ warning: unexpected `cfg` condition value: `foo` - --> $DIR/no-expected-values.rs:11:7 + --> $DIR/no-expected-values.rs:10:7 | LL | #[cfg(feature = "foo")] | ^^^^^^^-------- @@ -8,11 +8,11 @@ LL | #[cfg(feature = "foo")] | = note: no expected value for `feature` = help: to expect this configuration use `--check-cfg=cfg(feature, values("foo"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition value: `foo` - --> $DIR/no-expected-values.rs:15:7 + --> $DIR/no-expected-values.rs:14:7 | LL | #[cfg(test = "foo")] | ^^^^-------- @@ -20,7 +20,7 @@ LL | #[cfg(test = "foo")] | help: remove the value | = note: no expected value for `test` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: 2 warnings emitted diff --git a/tests/ui/check-cfg/no-expected-values.mixed.stderr b/tests/ui/check-cfg/no-expected-values.mixed.stderr index 0c0dbe9bac6..0f181cc2ab1 100644 --- a/tests/ui/check-cfg/no-expected-values.mixed.stderr +++ b/tests/ui/check-cfg/no-expected-values.mixed.stderr @@ -1,5 +1,5 @@ warning: unexpected `cfg` condition value: `foo` - --> $DIR/no-expected-values.rs:11:7 + --> $DIR/no-expected-values.rs:10:7 | LL | #[cfg(feature = "foo")] | ^^^^^^^-------- @@ -8,11 +8,11 @@ LL | #[cfg(feature = "foo")] | = note: no expected value for `feature` = help: to expect this configuration use `--check-cfg=cfg(feature, values("foo"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition value: `foo` - --> $DIR/no-expected-values.rs:15:7 + --> $DIR/no-expected-values.rs:14:7 | LL | #[cfg(test = "foo")] | ^^^^-------- @@ -20,7 +20,7 @@ LL | #[cfg(test = "foo")] | help: remove the value | = note: no expected value for `test` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: 2 warnings emitted diff --git a/tests/ui/check-cfg/no-expected-values.rs b/tests/ui/check-cfg/no-expected-values.rs index a80f9ec9776..42e7f45fa7a 100644 --- a/tests/ui/check-cfg/no-expected-values.rs +++ b/tests/ui/check-cfg/no-expected-values.rs @@ -2,7 +2,6 @@ // //@ check-pass //@ revisions: simple mixed empty -//@ compile-flags: -Z unstable-options //@ compile-flags: --check-cfg=cfg(values,simple,mixed,empty) //@ [simple]compile-flags: --check-cfg=cfg(test) --check-cfg=cfg(feature) //@ [mixed]compile-flags: --check-cfg=cfg(test,feature) diff --git a/tests/ui/check-cfg/no-expected-values.simple.stderr b/tests/ui/check-cfg/no-expected-values.simple.stderr index 0c0dbe9bac6..0f181cc2ab1 100644 --- a/tests/ui/check-cfg/no-expected-values.simple.stderr +++ b/tests/ui/check-cfg/no-expected-values.simple.stderr @@ -1,5 +1,5 @@ warning: unexpected `cfg` condition value: `foo` - --> $DIR/no-expected-values.rs:11:7 + --> $DIR/no-expected-values.rs:10:7 | LL | #[cfg(feature = "foo")] | ^^^^^^^-------- @@ -8,11 +8,11 @@ LL | #[cfg(feature = "foo")] | = note: no expected value for `feature` = help: to expect this configuration use `--check-cfg=cfg(feature, values("foo"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition value: `foo` - --> $DIR/no-expected-values.rs:15:7 + --> $DIR/no-expected-values.rs:14:7 | LL | #[cfg(test = "foo")] | ^^^^-------- @@ -20,7 +20,7 @@ LL | #[cfg(test = "foo")] | help: remove the value | = note: no expected value for `test` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: 2 warnings emitted diff --git a/tests/ui/check-cfg/order-independant.rs b/tests/ui/check-cfg/order-independant.rs index 9ac96d0b15b..671d2e764d3 100644 --- a/tests/ui/check-cfg/order-independant.rs +++ b/tests/ui/check-cfg/order-independant.rs @@ -1,9 +1,7 @@ //@ check-pass // //@ revisions: values_before values_after -//@ compile-flags: -Z unstable-options //@ compile-flags: --check-cfg=cfg(values_before,values_after) -// //@ [values_before]compile-flags: --check-cfg=cfg(a,values("b")) --check-cfg=cfg(a) //@ [values_after]compile-flags: --check-cfg=cfg(a) --check-cfg=cfg(a,values("b")) diff --git a/tests/ui/check-cfg/order-independant.values_after.stderr b/tests/ui/check-cfg/order-independant.values_after.stderr index d1de26ba303..7e18df8e1c2 100644 --- a/tests/ui/check-cfg/order-independant.values_after.stderr +++ b/tests/ui/check-cfg/order-independant.values_after.stderr @@ -1,12 +1,12 @@ warning: unexpected `cfg` condition value: `unk` - --> $DIR/order-independant.rs:13:7 + --> $DIR/order-independant.rs:11:7 | LL | #[cfg(a = "unk")] | ^^^^^^^^^ | = note: expected values for `a` are: (none), `b` = help: to expect this configuration use `--check-cfg=cfg(a, values("unk"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: 1 warning emitted diff --git a/tests/ui/check-cfg/order-independant.values_before.stderr b/tests/ui/check-cfg/order-independant.values_before.stderr index d1de26ba303..7e18df8e1c2 100644 --- a/tests/ui/check-cfg/order-independant.values_before.stderr +++ b/tests/ui/check-cfg/order-independant.values_before.stderr @@ -1,12 +1,12 @@ warning: unexpected `cfg` condition value: `unk` - --> $DIR/order-independant.rs:13:7 + --> $DIR/order-independant.rs:11:7 | LL | #[cfg(a = "unk")] | ^^^^^^^^^ | = note: expected values for `a` are: (none), `b` = help: to expect this configuration use `--check-cfg=cfg(a, values("unk"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: 1 warning emitted diff --git a/tests/ui/check-cfg/stmt-no-ice.rs b/tests/ui/check-cfg/stmt-no-ice.rs index 8a447ade068..866a5836db0 100644 --- a/tests/ui/check-cfg/stmt-no-ice.rs +++ b/tests/ui/check-cfg/stmt-no-ice.rs @@ -1,7 +1,7 @@ // This test checks that there is no ICE with this code // //@ check-pass -//@ compile-flags:--check-cfg=cfg() -Z unstable-options +//@ compile-flags:--check-cfg=cfg() fn main() { #[cfg(crossbeam_loom)] diff --git a/tests/ui/check-cfg/stmt-no-ice.stderr b/tests/ui/check-cfg/stmt-no-ice.stderr index 1afdbe84d34..e686cdddc1c 100644 --- a/tests/ui/check-cfg/stmt-no-ice.stderr +++ b/tests/ui/check-cfg/stmt-no-ice.stderr @@ -6,7 +6,7 @@ LL | #[cfg(crossbeam_loom)] | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows` = help: to expect this configuration use `--check-cfg=cfg(crossbeam_loom)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: 1 warning emitted diff --git a/tests/ui/check-cfg/unexpected-cfg-name.rs b/tests/ui/check-cfg/unexpected-cfg-name.rs index 5ea9f560ee4..365c29d10fb 100644 --- a/tests/ui/check-cfg/unexpected-cfg-name.rs +++ b/tests/ui/check-cfg/unexpected-cfg-name.rs @@ -1,7 +1,7 @@ // Check warning for unexpected configuration name // //@ check-pass -//@ compile-flags: --check-cfg=cfg() -Z unstable-options +//@ compile-flags: --check-cfg=cfg() #[cfg(widnows)] //~^ WARNING unexpected `cfg` condition name diff --git a/tests/ui/check-cfg/unexpected-cfg-name.stderr b/tests/ui/check-cfg/unexpected-cfg-name.stderr index 8748b324fb6..0b265078aa5 100644 --- a/tests/ui/check-cfg/unexpected-cfg-name.stderr +++ b/tests/ui/check-cfg/unexpected-cfg-name.stderr @@ -5,7 +5,7 @@ LL | #[cfg(widnows)] | ^^^^^^^ help: there is a config with a similar name: `windows` | = help: to expect this configuration use `--check-cfg=cfg(widnows)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: 1 warning emitted diff --git a/tests/ui/check-cfg/unexpected-cfg-value.rs b/tests/ui/check-cfg/unexpected-cfg-value.rs index a4a10e503be..583cf40c485 100644 --- a/tests/ui/check-cfg/unexpected-cfg-value.rs +++ b/tests/ui/check-cfg/unexpected-cfg-value.rs @@ -1,7 +1,7 @@ // Check for unexpected configuration value in the code. // //@ check-pass -//@ compile-flags: --cfg=feature="rand" -Z unstable-options +//@ compile-flags: --cfg=feature="rand" //@ compile-flags: --check-cfg=cfg(feature,values("serde","full")) #[cfg(feature = "sedre")] diff --git a/tests/ui/check-cfg/unexpected-cfg-value.stderr b/tests/ui/check-cfg/unexpected-cfg-value.stderr index e5435d37670..c3001208492 100644 --- a/tests/ui/check-cfg/unexpected-cfg-value.stderr +++ b/tests/ui/check-cfg/unexpected-cfg-value.stderr @@ -8,7 +8,7 @@ LL | #[cfg(feature = "sedre")] | = note: expected values for `feature` are: `full`, `serde` = help: to expect this configuration use `--check-cfg=cfg(feature, values("sedre"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition value: `rand` @@ -19,7 +19,7 @@ LL | #[cfg(feature = "rand")] | = note: expected values for `feature` are: `full`, `serde` = help: to expect this configuration use `--check-cfg=cfg(feature, values("rand"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: 2 warnings emitted diff --git a/tests/ui/check-cfg/unknown-values.rs b/tests/ui/check-cfg/unknown-values.rs index 61ea82871b2..7b2b00fe9d4 100644 --- a/tests/ui/check-cfg/unknown-values.rs +++ b/tests/ui/check-cfg/unknown-values.rs @@ -2,7 +2,6 @@ // //@ check-pass //@ revisions: simple mixed with_values -//@ compile-flags: -Z unstable-options //@ compile-flags: --check-cfg=cfg(simple,mixed,with_values) //@ [simple]compile-flags: --check-cfg=cfg(foo,values(any())) //@ [mixed]compile-flags: --check-cfg=cfg(foo) --check-cfg=cfg(foo,values(any())) diff --git a/tests/ui/check-cfg/values-none.explicit.stderr b/tests/ui/check-cfg/values-none.explicit.stderr index a025ff441b7..f75cc08f551 100644 --- a/tests/ui/check-cfg/values-none.explicit.stderr +++ b/tests/ui/check-cfg/values-none.explicit.stderr @@ -1,5 +1,5 @@ warning: unexpected `cfg` condition value: `too` - --> $DIR/values-none.rs:11:7 + --> $DIR/values-none.rs:10:7 | LL | #[cfg(foo = "too")] | ^^^-------- @@ -8,11 +8,11 @@ LL | #[cfg(foo = "too")] | = note: no expected value for `foo` = help: to expect this configuration use `--check-cfg=cfg(foo, values("too"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition value: `bar` - --> $DIR/values-none.rs:16:7 + --> $DIR/values-none.rs:15:7 | LL | #[cfg(foo = "bar")] | ^^^-------- @@ -21,7 +21,7 @@ LL | #[cfg(foo = "bar")] | = note: no expected value for `foo` = help: to expect this configuration use `--check-cfg=cfg(foo, values("bar"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: 2 warnings emitted diff --git a/tests/ui/check-cfg/values-none.implicit.stderr b/tests/ui/check-cfg/values-none.implicit.stderr index a025ff441b7..f75cc08f551 100644 --- a/tests/ui/check-cfg/values-none.implicit.stderr +++ b/tests/ui/check-cfg/values-none.implicit.stderr @@ -1,5 +1,5 @@ warning: unexpected `cfg` condition value: `too` - --> $DIR/values-none.rs:11:7 + --> $DIR/values-none.rs:10:7 | LL | #[cfg(foo = "too")] | ^^^-------- @@ -8,11 +8,11 @@ LL | #[cfg(foo = "too")] | = note: no expected value for `foo` = help: to expect this configuration use `--check-cfg=cfg(foo, values("too"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition value: `bar` - --> $DIR/values-none.rs:16:7 + --> $DIR/values-none.rs:15:7 | LL | #[cfg(foo = "bar")] | ^^^-------- @@ -21,7 +21,7 @@ LL | #[cfg(foo = "bar")] | = note: no expected value for `foo` = help: to expect this configuration use `--check-cfg=cfg(foo, values("bar"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: 2 warnings emitted diff --git a/tests/ui/check-cfg/values-none.rs b/tests/ui/check-cfg/values-none.rs index 6a68020e418..bd9c0255b7d 100644 --- a/tests/ui/check-cfg/values-none.rs +++ b/tests/ui/check-cfg/values-none.rs @@ -1,7 +1,6 @@ //@ check-pass // //@ revisions: explicit implicit -//@ compile-flags: -Zunstable-options //@ [explicit]compile-flags: --check-cfg=cfg(foo,values(none())) //@ [implicit]compile-flags: --check-cfg=cfg(foo) //@ [simple] compile-flags: --check-cfg=cfg(foo,values(none(),"too")) diff --git a/tests/ui/check-cfg/values-target-json.rs b/tests/ui/check-cfg/values-target-json.rs index afe6e0aaffd..f3a27043e67 100644 --- a/tests/ui/check-cfg/values-target-json.rs +++ b/tests/ui/check-cfg/values-target-json.rs @@ -2,7 +2,7 @@ // //@ check-pass //@ needs-llvm-components: x86 -//@ compile-flags: --crate-type=lib --check-cfg=cfg() --target={{src-base}}/check-cfg/my-awesome-platform.json -Z unstable-options +//@ compile-flags: --crate-type=lib --check-cfg=cfg() --target={{src-base}}/check-cfg/my-awesome-platform.json #![feature(lang_items, no_core, auto_traits)] #![no_core] diff --git a/tests/ui/check-cfg/well-known-names.rs b/tests/ui/check-cfg/well-known-names.rs index a0feee4225a..c277b84d9bd 100644 --- a/tests/ui/check-cfg/well-known-names.rs +++ b/tests/ui/check-cfg/well-known-names.rs @@ -1,7 +1,7 @@ // This test checks that we lint on non well known names and that we don't lint on well known names // //@ check-pass -//@ compile-flags: --check-cfg=cfg() -Z unstable-options +//@ compile-flags: --check-cfg=cfg() #[cfg(target_oz = "linux")] //~^ WARNING unexpected `cfg` condition name diff --git a/tests/ui/check-cfg/well-known-names.stderr b/tests/ui/check-cfg/well-known-names.stderr index 467f9675f7f..b2db777e8a8 100644 --- a/tests/ui/check-cfg/well-known-names.stderr +++ b/tests/ui/check-cfg/well-known-names.stderr @@ -5,7 +5,7 @@ LL | #[cfg(target_oz = "linux")] | ^^^^^^^^^^^^^^^^^^^ | = help: to expect this configuration use `--check-cfg=cfg(target_oz, values("linux"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default help: there is a config with a similar name and value | @@ -20,7 +20,7 @@ LL | #[cfg(features = "foo")] | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `doctest`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows` = help: to expect this configuration use `--check-cfg=cfg(features, values("foo"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `feature` --> $DIR/well-known-names.rs:17:7 @@ -29,7 +29,7 @@ LL | #[cfg(feature = "foo")] | ^^^^^^^^^^^^^^^ | = help: to expect this configuration use `--check-cfg=cfg(feature, values("foo"))` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition name: `uniw` --> $DIR/well-known-names.rs:21:7 @@ -38,7 +38,7 @@ LL | #[cfg(uniw)] | ^^^^ help: there is a config with a similar name: `unix` | = help: to expect this configuration use `--check-cfg=cfg(uniw)` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: 4 warnings emitted diff --git a/tests/ui/check-cfg/well-known-values.rs b/tests/ui/check-cfg/well-known-values.rs index 2758a793538..4c010a62d21 100644 --- a/tests/ui/check-cfg/well-known-values.rs +++ b/tests/ui/check-cfg/well-known-values.rs @@ -5,7 +5,7 @@ // values since the suggestion shows them. // //@ check-pass -//@ compile-flags: --check-cfg=cfg() -Z unstable-options +//@ compile-flags: --check-cfg=cfg() //@ compile-flags: -Zcheck-cfg-all-expected #![feature(cfg_overflow_checks)] diff --git a/tests/ui/check-cfg/well-known-values.stderr b/tests/ui/check-cfg/well-known-values.stderr index 729794150f6..af3ef92fdd5 100644 --- a/tests/ui/check-cfg/well-known-values.stderr +++ b/tests/ui/check-cfg/well-known-values.stderr @@ -7,7 +7,7 @@ LL | clippy = "_UNEXPECTED_VALUE", | help: remove the value | = note: no expected value for `clippy` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` @@ -19,7 +19,7 @@ LL | debug_assertions = "_UNEXPECTED_VALUE", | help: remove the value | = note: no expected value for `debug_assertions` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:31:5 @@ -30,7 +30,7 @@ LL | doc = "_UNEXPECTED_VALUE", | help: remove the value | = note: no expected value for `doc` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:33:5 @@ -41,7 +41,7 @@ LL | doctest = "_UNEXPECTED_VALUE", | help: remove the value | = note: no expected value for `doctest` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:35:5 @@ -52,7 +52,7 @@ LL | miri = "_UNEXPECTED_VALUE", | help: remove the value | = note: no expected value for `miri` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:37:5 @@ -63,7 +63,7 @@ LL | overflow_checks = "_UNEXPECTED_VALUE", | help: remove the value | = note: no expected value for `overflow_checks` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:39:5 @@ -72,7 +72,7 @@ LL | panic = "_UNEXPECTED_VALUE", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `panic` are: `abort`, `unwind` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:41:5 @@ -83,7 +83,7 @@ LL | proc_macro = "_UNEXPECTED_VALUE", | help: remove the value | = note: no expected value for `proc_macro` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:43:5 @@ -92,7 +92,7 @@ LL | relocation_model = "_UNEXPECTED_VALUE", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `relocation_model` are: `dynamic-no-pic`, `pic`, `pie`, `ropi`, `ropi-rwpi`, `rwpi`, `static` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:45:5 @@ -101,7 +101,7 @@ LL | sanitize = "_UNEXPECTED_VALUE", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `sanitize` are: `address`, `cfi`, `dataflow`, `hwaddress`, `kcfi`, `kernel-address`, `leak`, `memory`, `memtag`, `safestack`, `shadow-call-stack`, `thread` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:47:5 @@ -110,7 +110,7 @@ LL | target_abi = "_UNEXPECTED_VALUE", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `target_abi` are: ``, `abi64`, `abiv2`, `abiv2hf`, `eabi`, `eabihf`, `elf`, `fortanix`, `ilp32`, `llvm`, `macabi`, `sim`, `softfloat`, `spe`, `uwp`, `vec-extabi`, `x32` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:49:5 @@ -119,7 +119,7 @@ LL | target_arch = "_UNEXPECTED_VALUE", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `target_arch` are: `aarch64`, `arm`, `arm64ec`, `avr`, `bpf`, `csky`, `hexagon`, `loongarch64`, `m68k`, `mips`, `mips32r6`, `mips64`, `mips64r6`, `msp430`, `nvptx64`, `powerpc`, `powerpc64`, `riscv32`, `riscv64`, `s390x`, `sparc`, `sparc64`, `wasm32`, `wasm64`, `x86`, `x86_64` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:51:5 @@ -128,7 +128,7 @@ LL | target_endian = "_UNEXPECTED_VALUE", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `target_endian` are: `big`, `little` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:53:5 @@ -137,7 +137,7 @@ LL | target_env = "_UNEXPECTED_VALUE", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `target_env` are: ``, `gnu`, `msvc`, `musl`, `newlib`, `nto70`, `nto71`, `ohos`, `p2`, `psx`, `relibc`, `sgx`, `uclibc` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:55:5 @@ -146,7 +146,7 @@ LL | target_family = "_UNEXPECTED_VALUE", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `target_family` are: `unix`, `wasm`, `windows` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:57:5 @@ -155,7 +155,7 @@ LL | target_feature = "_UNEXPECTED_VALUE", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512er`, `avx512f`, `avx512fp16`, `avx512ifma`, `avx512pf`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, `avx512vpopcntdq`, `bf16`, `bmi1`, `bmi2`, `bti`, `bulk-memory`, `c`, `cache`, `cmpxchg16b`, `crc`, `crt-static`, `d`, `d32`, `dit`, `doloop`, `dotprod`, `dpb`, `dpb2`, `dsp`, `dsp1e2`, `dspe60`, `e`, `e1`, `e2`, `edsp`, `elrw`, `ermsb`, `exception-handling`, `f`, `f16c`, `f32mm`, `f64mm`, `fast-unaligned-access`, `fcma`, `fdivdu`, `fhm`, `flagm`, `float1e2`, `float1e3`, `float3e4`, `float7e60`, `floate1`, `fma`, `fp-armv8`, `fp16`, `fp64`, `fpuv2_df`, `fpuv2_sf`, `fpuv3_df`, `fpuv3_hf`, `fpuv3_hi`, `fpuv3_sf`, `frecipe`, `frintts`, `fxsr`, `gfni`, `hard-float`, `hard-float-abi`, `hard-tp`, `high-registers`, `hvx`, `hvx-length128b`, `hwdiv`, `i8mm`, `jsconv`, `lahfsahf`, `lasx`, `lbt`, `lor`, `lse`, `lsx`, `lvz`, `lzcnt`, `m`, `mclass`, `movbe`, `mp`, `mp1e2`, `msa`, `mte`, `multivalue`, `mutable-globals`, `neon`, `nontrapping-fptoint`, `nvic`, `paca`, `pacg`, `pan`, `pclmulqdq`, `pmuv3`, `popcnt`, `power10-vector`, `power8-altivec`, `power8-vector`, `power9-altivec`, `power9-vector`, `prfchw`, `rand`, `ras`, `rclass`, `rcpc`, `rcpc2`, `rdm`, `rdrand`, `rdseed`, `reference-types`, `relax`, `relaxed-simd`, `rtm`, `sb`, `sha`, `sha2`, `sha3`, `sign-ext`, `simd128`, `sm4`, `spe`, `ssbs`, `sse`, `sse2`, `sse3`, `sse4.1`, `sse4.2`, `sse4a`, `ssse3`, `sve`, `sve2`, `sve2-aes`, `sve2-bitperm`, `sve2-sha3`, `sve2-sm4`, `tbm`, `thumb-mode`, `thumb2`, `tme`, `trust`, `trustzone`, `ual`, `v`, `v5te`, `v6`, `v6k`, `v6t2`, `v7`, `v8`, `v8.1a`, `v8.2a`, `v8.3a`, `v8.4a`, `v8.5a`, `v8.6a`, `v8.7a`, `vaes`, `vdsp2e60f`, `vdspv1`, `vdspv2`, `vfp2`, `vfp3`, `vfp4`, `vh`, `virt`, `virtualization`, `vpclmulqdq`, `vsx`, `xsave`, `xsavec`, `xsaveopt`, `xsaves`, `zba`, `zbb`, `zbc`, `zbkb`, `zbkc`, `zbkx`, `zbs`, `zdinx`, `zfh`, `zfhmin`, `zfinx`, `zhinx`, `zhinxmin`, `zk`, `zkn`, `zknd`, `zkne`, `zknh`, `zkr`, `zks`, `zksed`, `zksh`, `zkt` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:59:5 @@ -164,7 +164,7 @@ LL | target_has_atomic = "_UNEXPECTED_VALUE", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `target_has_atomic` are: (none), `128`, `16`, `32`, `64`, `8`, `ptr` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:61:5 @@ -173,7 +173,7 @@ LL | target_has_atomic_equal_alignment = "_UNEXPECTED_VALUE", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `target_has_atomic_equal_alignment` are: (none), `128`, `16`, `32`, `64`, `8`, `ptr` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:63:5 @@ -182,7 +182,7 @@ LL | target_has_atomic_load_store = "_UNEXPECTED_VALUE", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `target_has_atomic_load_store` are: (none), `128`, `16`, `32`, `64`, `8`, `ptr` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:65:5 @@ -191,7 +191,7 @@ LL | target_os = "_UNEXPECTED_VALUE", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `target_os` are: `aix`, `android`, `cuda`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `macos`, `netbsd`, `none`, `nto`, `openbsd`, `psp`, `redox`, `solaris`, `solid_asp3`, `teeos`, `tvos`, `uefi`, `unknown`, `visionos`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`, `zkvm` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:67:5 @@ -200,7 +200,7 @@ LL | target_pointer_width = "_UNEXPECTED_VALUE", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `target_pointer_width` are: `16`, `32`, `64` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:69:5 @@ -211,7 +211,7 @@ LL | target_thread_local = "_UNEXPECTED_VALUE", | help: remove the value | = note: no expected value for `target_thread_local` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:71:5 @@ -220,7 +220,7 @@ LL | target_vendor = "_UNEXPECTED_VALUE", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expected values for `target_vendor` are: `apple`, `espressif`, `fortanix`, `ibm`, `kmc`, `nintendo`, `nvidia`, `pc`, `risc0`, `sony`, `sun`, `unikraft`, `unknown`, `uwp`, `win7`, `wrs` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:73:5 @@ -231,7 +231,7 @@ LL | test = "_UNEXPECTED_VALUE", | help: remove the value | = note: no expected value for `test` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:75:5 @@ -242,7 +242,7 @@ LL | ub_checks = "_UNEXPECTED_VALUE", | help: remove the value | = note: no expected value for `ub_checks` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:77:5 @@ -253,7 +253,7 @@ LL | unix = "_UNEXPECTED_VALUE", | help: remove the value | = note: no expected value for `unix` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` --> $DIR/well-known-values.rs:79:5 @@ -264,7 +264,7 @@ LL | windows = "_UNEXPECTED_VALUE", | help: remove the value | = note: no expected value for `windows` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: unexpected `cfg` condition value: `linuz` --> $DIR/well-known-values.rs:85:7 @@ -275,7 +275,7 @@ LL | #[cfg(target_os = "linuz")] // testing that we suggest `linux` | help: there is a expected value with a similar name: `"linux"` | = note: expected values for `target_os` are: `aix`, `android`, `cuda`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `hurd`, `illumos`, `ios`, `l4re`, `linux`, `macos`, `netbsd`, `none`, `nto`, `openbsd`, `psp`, `redox`, `solaris`, `solid_asp3`, `teeos`, `tvos`, `uefi`, `unknown`, `visionos`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`, `zkvm` - = note: see <https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-cfg.html> for more information about checking conditional configuration + = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration warning: 28 warnings emitted diff --git a/tests/ui/closures/issue-78720.rs b/tests/ui/closures/issue-78720.rs index 0c4f337ba57..81af030fe55 100644 --- a/tests/ui/closures/issue-78720.rs +++ b/tests/ui/closures/issue-78720.rs @@ -1,6 +1,5 @@ fn server() -> impl { //~^ ERROR at least one trait must be specified - //~| ERROR type annotations needed ().map2(|| "") } diff --git a/tests/ui/closures/issue-78720.stderr b/tests/ui/closures/issue-78720.stderr index 2f57c7616f1..5d65c87b0fd 100644 --- a/tests/ui/closures/issue-78720.stderr +++ b/tests/ui/closures/issue-78720.stderr @@ -5,7 +5,7 @@ LL | fn server() -> impl { | ^^^^ error[E0412]: cannot find type `F` in this scope - --> $DIR/issue-78720.rs:14:12 + --> $DIR/issue-78720.rs:13:12 | LL | _func: F, | ^ @@ -22,14 +22,8 @@ help: you might be missing a type parameter LL | struct Map2<Segment2, F> { | +++ -error[E0282]: type annotations needed - --> $DIR/issue-78720.rs:1:16 - | -LL | fn server() -> impl { - | ^^^^ cannot infer type - error[E0308]: mismatched types - --> $DIR/issue-78720.rs:8:39 + --> $DIR/issue-78720.rs:7:39 | LL | fn map2<F>(self, f: F) -> Map2<F> {} | ^^ expected `Map2<F>`, found `()` @@ -38,7 +32,7 @@ LL | fn map2<F>(self, f: F) -> Map2<F> {} found unit type `()` error[E0277]: the size for values of type `Self` cannot be known at compilation time - --> $DIR/issue-78720.rs:8:16 + --> $DIR/issue-78720.rs:7:16 | LL | fn map2<F>(self, f: F) -> Map2<F> {} | ^^^^ doesn't have a size known at compile-time @@ -53,7 +47,7 @@ help: function arguments must have a statically known size, borrowed types alway LL | fn map2<F>(&self, f: F) -> Map2<F> {} | + -error: aborting due to 5 previous errors +error: aborting due to 4 previous errors -Some errors have detailed explanations: E0277, E0282, E0308, E0412. +Some errors have detailed explanations: E0277, E0308, E0412. For more information about an error, try `rustc --explain E0277`. diff --git a/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.rs b/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.rs index dc9782295c1..a41a159c1fd 100644 --- a/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.rs +++ b/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.rs @@ -13,7 +13,6 @@ impl Opcode2 { pub fn example2(msg_type: Opcode2) -> impl FnMut(&[u8]) { move |i| match msg_type { Opcode2::OP2 => unimplemented!(), - //~^ ERROR could not evaluate constant pattern } } diff --git a/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr b/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr index 9442eac0cf5..d95a8861230 100644 --- a/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr +++ b/tests/ui/const_prop/ice-type-mismatch-when-copying-112824.stderr @@ -17,13 +17,7 @@ help: you might be missing a type parameter LL | pub struct Opcode2<S>(&'a S); | +++ -error: could not evaluate constant pattern - --> $DIR/ice-type-mismatch-when-copying-112824.rs:15:9 - | -LL | Opcode2::OP2 => unimplemented!(), - | ^^^^^^^^^^^^ - -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors Some errors have detailed explanations: E0261, E0412. For more information about an error, try `rustc --explain E0261`. diff --git a/tests/ui/consts/const-eval/ice-unsized-struct-const-eval-123154.rs b/tests/ui/consts/const-eval/ice-unsized-struct-const-eval-123154.rs new file mode 100644 index 00000000000..24a2cd19b18 --- /dev/null +++ b/tests/ui/consts/const-eval/ice-unsized-struct-const-eval-123154.rs @@ -0,0 +1,15 @@ +// Regression test for #123154 + +struct AA { + pub data: [&usize] + //~^ ERROR missing lifetime specifier +} + +impl AA { + const fn new() -> Self { } + //~^ ERROR mismatched types +} + +static ST: AA = AA::new(); + +fn main() {} diff --git a/tests/ui/consts/const-eval/ice-unsized-struct-const-eval-123154.stderr b/tests/ui/consts/const-eval/ice-unsized-struct-const-eval-123154.stderr new file mode 100644 index 00000000000..9657e5cdda1 --- /dev/null +++ b/tests/ui/consts/const-eval/ice-unsized-struct-const-eval-123154.stderr @@ -0,0 +1,24 @@ +error[E0106]: missing lifetime specifier + --> $DIR/ice-unsized-struct-const-eval-123154.rs:4:16 + | +LL | pub data: [&usize] + | ^ expected named lifetime parameter + | +help: consider introducing a named lifetime parameter + | +LL ~ struct AA<'a> { +LL ~ pub data: [&'a usize] + | + +error[E0308]: mismatched types + --> $DIR/ice-unsized-struct-const-eval-123154.rs:9:23 + | +LL | const fn new() -> Self { } + | --- ^^^^ expected `AA`, found `()` + | | + | implicitly returns `()` as its body has no tail or `return` expression + +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0106, E0308. +For more information about an error, try `rustc --explain E0106`. diff --git a/tests/ui/feature-gates/feature-gate-check-cfg.rs b/tests/ui/feature-gates/feature-gate-check-cfg.rs deleted file mode 100644 index 1e0106aa748..00000000000 --- a/tests/ui/feature-gates/feature-gate-check-cfg.rs +++ /dev/null @@ -1,3 +0,0 @@ -//@ compile-flags: --check-cfg "cfg()" - -fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-check-cfg.stderr b/tests/ui/feature-gates/feature-gate-check-cfg.stderr deleted file mode 100644 index 9b27c2bc058..00000000000 --- a/tests/ui/feature-gates/feature-gate-check-cfg.stderr +++ /dev/null @@ -1,2 +0,0 @@ -error: the `-Z unstable-options` flag must also be passed to enable the flag `check-cfg` - diff --git a/tests/ui/feature-gates/feature-gate-precise-capturing.rs b/tests/ui/feature-gates/feature-gate-precise-capturing.rs new file mode 100644 index 00000000000..0c3b4977623 --- /dev/null +++ b/tests/ui/feature-gates/feature-gate-precise-capturing.rs @@ -0,0 +1,4 @@ +fn hello() -> impl use<> Sized {} +//~^ ERROR precise captures on `impl Trait` are experimental + +fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-precise-capturing.stderr b/tests/ui/feature-gates/feature-gate-precise-capturing.stderr new file mode 100644 index 00000000000..102b39148f9 --- /dev/null +++ b/tests/ui/feature-gates/feature-gate-precise-capturing.stderr @@ -0,0 +1,13 @@ +error[E0658]: precise captures on `impl Trait` are experimental + --> $DIR/feature-gate-precise-capturing.rs:1:20 + | +LL | fn hello() -> impl use<> Sized {} + | ^^^ + | + = note: see issue #123432 <https://github.com/rust-lang/rust/issues/123432> for more information + = help: add `#![feature(precise_capturing)]` to the crate attributes to enable + = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/impl-trait/precise-capturing/apit.rs b/tests/ui/impl-trait/precise-capturing/apit.rs new file mode 100644 index 00000000000..efcac9ebb0b --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/apit.rs @@ -0,0 +1,7 @@ +#![feature(precise_capturing)] +//~^ WARN the feature `precise_capturing` is incomplete + +fn hello(_: impl use<> Sized) {} +//~^ ERROR `use<...>` precise capturing syntax not allowed on argument-position `impl Trait` + +fn main() {} diff --git a/tests/ui/impl-trait/precise-capturing/apit.stderr b/tests/ui/impl-trait/precise-capturing/apit.stderr new file mode 100644 index 00000000000..36bf80d9e2f --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/apit.stderr @@ -0,0 +1,17 @@ +warning: the feature `precise_capturing` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/apit.rs:1:12 + | +LL | #![feature(precise_capturing)] + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #123432 <https://github.com/rust-lang/rust/issues/123432> for more information + = note: `#[warn(incomplete_features)]` on by default + +error: `use<...>` precise capturing syntax not allowed on argument-position `impl Trait` + --> $DIR/apit.rs:4:18 + | +LL | fn hello(_: impl use<> Sized) {} + | ^^^ + +error: aborting due to 1 previous error; 1 warning emitted + diff --git a/tests/ui/impl-trait/precise-capturing/bad-lifetimes.rs b/tests/ui/impl-trait/precise-capturing/bad-lifetimes.rs new file mode 100644 index 00000000000..623063a8f50 --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/bad-lifetimes.rs @@ -0,0 +1,14 @@ +#![feature(precise_capturing)] +//~^ WARN the feature `precise_capturing` is incomplete + +fn no_elided_lt() -> impl use<'_> Sized {} +//~^ ERROR missing lifetime specifier +//~| ERROR expected lifetime parameter in `use<...>` precise captures list, found `'_` + +fn static_lt() -> impl use<'static> Sized {} +//~^ ERROR expected lifetime parameter in `use<...>` precise captures list, found `'static` + +fn missing_lt() -> impl use<'missing> Sized {} +//~^ ERROR use of undeclared lifetime name `'missing` + +fn main() {} diff --git a/tests/ui/impl-trait/precise-capturing/bad-lifetimes.stderr b/tests/ui/impl-trait/precise-capturing/bad-lifetimes.stderr new file mode 100644 index 00000000000..a926362c50c --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/bad-lifetimes.stderr @@ -0,0 +1,45 @@ +error[E0106]: missing lifetime specifier + --> $DIR/bad-lifetimes.rs:4:31 + | +LL | fn no_elided_lt() -> impl use<'_> Sized {} + | ^^ expected named lifetime parameter + | + = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from +help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values + | +LL | fn no_elided_lt() -> impl use<'static> Sized {} + | ~~~~~~~ + +error[E0261]: use of undeclared lifetime name `'missing` + --> $DIR/bad-lifetimes.rs:11:29 + | +LL | fn missing_lt() -> impl use<'missing> Sized {} + | - ^^^^^^^^ undeclared lifetime + | | + | help: consider introducing lifetime `'missing` here: `<'missing>` + +warning: the feature `precise_capturing` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/bad-lifetimes.rs:1:12 + | +LL | #![feature(precise_capturing)] + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #123432 <https://github.com/rust-lang/rust/issues/123432> for more information + = note: `#[warn(incomplete_features)]` on by default + +error: expected lifetime parameter in `use<...>` precise captures list, found `'_` + --> $DIR/bad-lifetimes.rs:4:31 + | +LL | fn no_elided_lt() -> impl use<'_> Sized {} + | ^^ + +error: expected lifetime parameter in `use<...>` precise captures list, found `'static` + --> $DIR/bad-lifetimes.rs:8:28 + | +LL | fn static_lt() -> impl use<'static> Sized {} + | ^^^^^^^ + +error: aborting due to 4 previous errors; 1 warning emitted + +Some errors have detailed explanations: E0106, E0261. +For more information about an error, try `rustc --explain E0106`. diff --git a/tests/ui/impl-trait/precise-capturing/bad-params.rs b/tests/ui/impl-trait/precise-capturing/bad-params.rs new file mode 100644 index 00000000000..7970d49bf7c --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/bad-params.rs @@ -0,0 +1,19 @@ +#![feature(precise_capturing)] +//~^ WARN the feature `precise_capturing` is incomplete + +fn missing() -> impl use<T> Sized {} +//~^ ERROR cannot find type `T` in this scope + +fn missing_self() -> impl use<Self> Sized {} +//~^ ERROR cannot find type `Self` in this scope + +struct MyType; +impl MyType { + fn self_is_not_param() -> impl use<Self> Sized {} + //~^ ERROR `Self` can't be captured in `use<...>` precise captures list, since it is an alias +} + +fn hello() -> impl use<hello> Sized {} +//~^ ERROR expected type or const parameter in `use<...>` precise captures list, found function + +fn main() {} diff --git a/tests/ui/impl-trait/precise-capturing/bad-params.stderr b/tests/ui/impl-trait/precise-capturing/bad-params.stderr new file mode 100644 index 00000000000..27bf05302f9 --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/bad-params.stderr @@ -0,0 +1,46 @@ +error[E0412]: cannot find type `T` in this scope + --> $DIR/bad-params.rs:4:26 + | +LL | fn missing() -> impl use<T> Sized {} + | ^ not found in this scope + | +help: you might be missing a type parameter + | +LL | fn missing<T>() -> impl use<T> Sized {} + | +++ + +error[E0411]: cannot find type `Self` in this scope + --> $DIR/bad-params.rs:7:31 + | +LL | fn missing_self() -> impl use<Self> Sized {} + | ------------ ^^^^ `Self` is only available in impls, traits, and type definitions + | | + | `Self` not allowed in a function + +warning: the feature `precise_capturing` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/bad-params.rs:1:12 + | +LL | #![feature(precise_capturing)] + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #123432 <https://github.com/rust-lang/rust/issues/123432> for more information + = note: `#[warn(incomplete_features)]` on by default + +error: `Self` can't be captured in `use<...>` precise captures list, since it is an alias + --> $DIR/bad-params.rs:12:40 + | +LL | impl MyType { + | ----------- `Self` is not a generic argument, but an alias to the type of the implementation +LL | fn self_is_not_param() -> impl use<Self> Sized {} + | ^^^^ + +error: expected type or const parameter in `use<...>` precise captures list, found function + --> $DIR/bad-params.rs:16:24 + | +LL | fn hello() -> impl use<hello> Sized {} + | ^^^^^ + +error: aborting due to 4 previous errors; 1 warning emitted + +Some errors have detailed explanations: E0411, E0412. +For more information about an error, try `rustc --explain E0411`. diff --git a/tests/ui/impl-trait/precise-capturing/elided.rs b/tests/ui/impl-trait/precise-capturing/elided.rs new file mode 100644 index 00000000000..de80e8a5d58 --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/elided.rs @@ -0,0 +1,8 @@ +//@ check-pass + +#![feature(precise_capturing)] +//~^ WARN the feature `precise_capturing` is incomplete + +fn elided(x: &()) -> impl use<'_> Sized { x } + +fn main() {} diff --git a/tests/ui/impl-trait/precise-capturing/elided.stderr b/tests/ui/impl-trait/precise-capturing/elided.stderr new file mode 100644 index 00000000000..38da0828de9 --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/elided.stderr @@ -0,0 +1,11 @@ +warning: the feature `precise_capturing` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/elided.rs:3:12 + | +LL | #![feature(precise_capturing)] + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #123432 <https://github.com/rust-lang/rust/issues/123432> for more information + = note: `#[warn(incomplete_features)]` on by default + +warning: 1 warning emitted + diff --git a/tests/ui/impl-trait/precise-capturing/forgot-to-capture-const.rs b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-const.rs new file mode 100644 index 00000000000..1b604e6c358 --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-const.rs @@ -0,0 +1,7 @@ +#![feature(precise_capturing)] +//~^ WARN the feature `precise_capturing` is incomplete + +fn constant<const C: usize>() -> impl use<> Sized {} +//~^ ERROR `impl Trait` must mention all const parameters in scope + +fn main() {} diff --git a/tests/ui/impl-trait/precise-capturing/forgot-to-capture-const.stderr b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-const.stderr new file mode 100644 index 00000000000..9c99f2b711e --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-const.stderr @@ -0,0 +1,19 @@ +warning: the feature `precise_capturing` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/forgot-to-capture-const.rs:1:12 + | +LL | #![feature(precise_capturing)] + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #123432 <https://github.com/rust-lang/rust/issues/123432> for more information + = note: `#[warn(incomplete_features)]` on by default + +error: `impl Trait` must mention all const parameters in scope + --> $DIR/forgot-to-capture-const.rs:4:13 + | +LL | fn constant<const C: usize>() -> impl use<> Sized {} + | ^^^^^^^^^^^^^^ ---------------- const parameter is implicitly captured by this `impl Trait` + | + = note: currently, all const parameters are required to be mentioned in the precise captures list + +error: aborting due to 1 previous error; 1 warning emitted + diff --git a/tests/ui/impl-trait/precise-capturing/forgot-to-capture-lifetime.rs b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-lifetime.rs new file mode 100644 index 00000000000..cc86bf83107 --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-lifetime.rs @@ -0,0 +1,10 @@ +#![feature(precise_capturing)] +//~^ WARN the feature `precise_capturing` is incomplete + +fn lifetime_in_bounds<'a>(x: &'a ()) -> impl use<> Into<&'a ()> { x } +//~^ ERROR `impl Trait` captures lifetime parameter, but it is not mentioned in `use<...>` precise captures list + +fn lifetime_in_hidden<'a>(x: &'a ()) -> impl use<> Sized { x } +//~^ ERROR hidden type for `impl Sized` captures lifetime that does not appear in bounds + +fn main() {} diff --git a/tests/ui/impl-trait/precise-capturing/forgot-to-capture-lifetime.stderr b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-lifetime.stderr new file mode 100644 index 00000000000..e472c898050 --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-lifetime.stderr @@ -0,0 +1,35 @@ +warning: the feature `precise_capturing` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/forgot-to-capture-lifetime.rs:1:12 + | +LL | #![feature(precise_capturing)] + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #123432 <https://github.com/rust-lang/rust/issues/123432> for more information + = note: `#[warn(incomplete_features)]` on by default + +error: `impl Trait` captures lifetime parameter, but it is not mentioned in `use<...>` precise captures list + --> $DIR/forgot-to-capture-lifetime.rs:4:58 + | +LL | fn lifetime_in_bounds<'a>(x: &'a ()) -> impl use<> Into<&'a ()> { x } + | -- -----------------^^---- + | | | + | | lifetime captured due to being mentioned in the bounds of the `impl Trait` + | this lifetime parameter is captured + +error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds + --> $DIR/forgot-to-capture-lifetime.rs:7:60 + | +LL | fn lifetime_in_hidden<'a>(x: &'a ()) -> impl use<> Sized { x } + | -- ---------------- ^ + | | | + | | opaque type defined here + | hidden type `&'a ()` captures the lifetime `'a` as defined here + | +help: to declare that `impl Sized` captures `'a`, you can add an explicit `'a` lifetime bound + | +LL | fn lifetime_in_hidden<'a>(x: &'a ()) -> impl use<> Sized + 'a { x } + | ++++ + +error: aborting due to 2 previous errors; 1 warning emitted + +For more information about this error, try `rustc --explain E0700`. diff --git a/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.rs b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.rs new file mode 100644 index 00000000000..6eaff01183d --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.rs @@ -0,0 +1,12 @@ +#![feature(precise_capturing)] +//~^ WARN the feature `precise_capturing` is incomplete + +fn type_param<T>() -> impl use<> Sized {} +//~^ ERROR `impl Trait` must mention all type parameters in scope + +trait Foo { +//~^ ERROR `impl Trait` must mention all type parameters in scope + fn bar() -> impl use<> Sized; +} + +fn main() {} diff --git a/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.stderr b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.stderr new file mode 100644 index 00000000000..a8eb4547dcd --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/forgot-to-capture-type.stderr @@ -0,0 +1,30 @@ +warning: the feature `precise_capturing` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/forgot-to-capture-type.rs:1:12 + | +LL | #![feature(precise_capturing)] + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #123432 <https://github.com/rust-lang/rust/issues/123432> for more information + = note: `#[warn(incomplete_features)]` on by default + +error: `impl Trait` must mention all type parameters in scope + --> $DIR/forgot-to-capture-type.rs:4:15 + | +LL | fn type_param<T>() -> impl use<> Sized {} + | ^ ---------------- type parameter is implicitly captured by this `impl Trait` + | + = note: currently, all type parameters are required to be mentioned in the precise captures list + +error: `impl Trait` must mention all type parameters in scope + --> $DIR/forgot-to-capture-type.rs:7:1 + | +LL | trait Foo { + | ^^^^^^^^^ +LL | +LL | fn bar() -> impl use<> Sized; + | ---------------- type parameter is implicitly captured by this `impl Trait` + | + = note: currently, all type parameters are required to be mentioned in the precise captures list + +error: aborting due to 2 previous errors; 1 warning emitted + diff --git a/tests/ui/impl-trait/precise-capturing/higher-ranked.rs b/tests/ui/impl-trait/precise-capturing/higher-ranked.rs new file mode 100644 index 00000000000..28fb1fa4b9e --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/higher-ranked.rs @@ -0,0 +1,18 @@ +//@ check-pass + +// Show how precise captures allow us to skip capturing a higher-ranked lifetime + +#![feature(lifetime_capture_rules_2024, precise_capturing)] +//~^ WARN the feature `precise_capturing` is incomplete + +trait Trait<'a> { + type Item; +} + +impl Trait<'_> for () { + type Item = Vec<()>; +} + +fn hello() -> impl for<'a> Trait<'a, Item = impl use<> IntoIterator> {} + +fn main() {} diff --git a/tests/ui/impl-trait/precise-capturing/higher-ranked.stderr b/tests/ui/impl-trait/precise-capturing/higher-ranked.stderr new file mode 100644 index 00000000000..e48d6d42af0 --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/higher-ranked.stderr @@ -0,0 +1,11 @@ +warning: the feature `precise_capturing` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/higher-ranked.rs:5:41 + | +LL | #![feature(lifetime_capture_rules_2024, precise_capturing)] + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #123432 <https://github.com/rust-lang/rust/issues/123432> for more information + = note: `#[warn(incomplete_features)]` on by default + +warning: 1 warning emitted + diff --git a/tests/ui/impl-trait/precise-capturing/ordering.rs b/tests/ui/impl-trait/precise-capturing/ordering.rs new file mode 100644 index 00000000000..2bace798c57 --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/ordering.rs @@ -0,0 +1,16 @@ +#![feature(precise_capturing)] +//~^ WARN the feature `precise_capturing` is incomplete + +fn lt<'a>() -> impl use<'a, 'a> Sized {} +//~^ ERROR cannot capture parameter `'a` twice + +fn ty<T>() -> impl use<T, T> Sized {} +//~^ ERROR cannot capture parameter `T` twice + +fn ct<const N: usize>() -> impl use<N, N> Sized {} +//~^ ERROR cannot capture parameter `N` twice + +fn ordering<'a, T>() -> impl use<T, 'a> Sized {} +//~^ ERROR lifetime parameter `'a` must be listed before non-lifetime parameters + +fn main() {} diff --git a/tests/ui/impl-trait/precise-capturing/ordering.stderr b/tests/ui/impl-trait/precise-capturing/ordering.stderr new file mode 100644 index 00000000000..3f545108df5 --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/ordering.stderr @@ -0,0 +1,37 @@ +warning: the feature `precise_capturing` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/ordering.rs:1:12 + | +LL | #![feature(precise_capturing)] + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #123432 <https://github.com/rust-lang/rust/issues/123432> for more information + = note: `#[warn(incomplete_features)]` on by default + +error: cannot capture parameter `'a` twice + --> $DIR/ordering.rs:4:25 + | +LL | fn lt<'a>() -> impl use<'a, 'a> Sized {} + | ^^ -- parameter captured again here + +error: cannot capture parameter `T` twice + --> $DIR/ordering.rs:7:24 + | +LL | fn ty<T>() -> impl use<T, T> Sized {} + | ^ - parameter captured again here + +error: cannot capture parameter `N` twice + --> $DIR/ordering.rs:10:37 + | +LL | fn ct<const N: usize>() -> impl use<N, N> Sized {} + | ^ - parameter captured again here + +error: lifetime parameter `'a` must be listed before non-lifetime parameters + --> $DIR/ordering.rs:13:37 + | +LL | fn ordering<'a, T>() -> impl use<T, 'a> Sized {} + | - ^^ + | | + | move the lifetime before this parameter + +error: aborting due to 4 previous errors; 1 warning emitted + diff --git a/tests/ui/impl-trait/precise-capturing/outlives.rs b/tests/ui/impl-trait/precise-capturing/outlives.rs new file mode 100644 index 00000000000..71e6333934e --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/outlives.rs @@ -0,0 +1,16 @@ +//@ check-pass + +// Show that precise captures allow us to skip a lifetime param for outlives + +#![feature(lifetime_capture_rules_2024, precise_capturing)] +//~^ WARN the feature `precise_capturing` is incomplete + +fn hello<'a: 'a, 'b: 'b>() -> impl use<'a> Sized { } + +fn outlives<'a, T: 'a>(_: T) {} + +fn test<'a, 'b>() { + outlives::<'a, _>(hello::<'a, 'b>()); +} + +fn main() {} diff --git a/tests/ui/impl-trait/precise-capturing/outlives.stderr b/tests/ui/impl-trait/precise-capturing/outlives.stderr new file mode 100644 index 00000000000..405c09cccd9 --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/outlives.stderr @@ -0,0 +1,11 @@ +warning: the feature `precise_capturing` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/outlives.rs:5:41 + | +LL | #![feature(lifetime_capture_rules_2024, precise_capturing)] + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #123432 <https://github.com/rust-lang/rust/issues/123432> for more information + = note: `#[warn(incomplete_features)]` on by default + +warning: 1 warning emitted + diff --git a/tests/ui/impl-trait/precise-capturing/self-capture.rs b/tests/ui/impl-trait/precise-capturing/self-capture.rs new file mode 100644 index 00000000000..ecbc388e27b --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/self-capture.rs @@ -0,0 +1,10 @@ +//@ check-pass + +#![feature(precise_capturing)] +//~^ WARN the feature `precise_capturing` is incomplete + +trait Foo { + fn bar<'a>() -> impl use<Self> Sized; +} + +fn main() {} diff --git a/tests/ui/impl-trait/precise-capturing/self-capture.stderr b/tests/ui/impl-trait/precise-capturing/self-capture.stderr new file mode 100644 index 00000000000..5a058c6826d --- /dev/null +++ b/tests/ui/impl-trait/precise-capturing/self-capture.stderr @@ -0,0 +1,11 @@ +warning: the feature `precise_capturing` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/self-capture.rs:3:12 + | +LL | #![feature(precise_capturing)] + | ^^^^^^^^^^^^^^^^^ + | + = note: see issue #123432 <https://github.com/rust-lang/rust/issues/123432> for more information + = note: `#[warn(incomplete_features)]` on by default + +warning: 1 warning emitted + diff --git a/tests/ui/pattern/feature-gate-mut_preserve_binding_mode_2024.rs b/tests/ui/pattern/feature-gate-mut_preserve_binding_mode_2024.rs new file mode 100644 index 00000000000..15c542e6bf1 --- /dev/null +++ b/tests/ui/pattern/feature-gate-mut_preserve_binding_mode_2024.rs @@ -0,0 +1,14 @@ +//@ edition: 2024 +//@ compile-flags: -Zunstable-options + +struct Foo(u8); + +fn main() { + let Foo(mut a) = &Foo(0); + a = &42; + //~^ ERROR: mismatched types + + let Foo(mut a) = &mut Foo(0); + a = &mut 42; + //~^ ERROR: mismatched types +} diff --git a/tests/ui/pattern/feature-gate-mut_preserve_binding_mode_2024.stderr b/tests/ui/pattern/feature-gate-mut_preserve_binding_mode_2024.stderr new file mode 100644 index 00000000000..6d0a034be21 --- /dev/null +++ b/tests/ui/pattern/feature-gate-mut_preserve_binding_mode_2024.stderr @@ -0,0 +1,31 @@ +error[E0308]: mismatched types + --> $DIR/feature-gate-mut_preserve_binding_mode_2024.rs:8:9 + | +LL | let Foo(mut a) = &Foo(0); + | ----- expected due to the type of this binding +LL | a = &42; + | ^^^ expected `u8`, found `&{integer}` + | +help: consider removing the borrow + | +LL - a = &42; +LL + a = 42; + | + +error[E0308]: mismatched types + --> $DIR/feature-gate-mut_preserve_binding_mode_2024.rs:12:9 + | +LL | let Foo(mut a) = &mut Foo(0); + | ----- expected due to the type of this binding +LL | a = &mut 42; + | ^^^^^^^ expected `u8`, found `&mut {integer}` + | +help: consider removing the borrow + | +LL - a = &mut 42; +LL + a = 42; + | + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/pattern/mut_preserve_binding_mode_2021.rs b/tests/ui/pattern/mut_preserve_binding_mode_2021.rs new file mode 100644 index 00000000000..befa49fdc24 --- /dev/null +++ b/tests/ui/pattern/mut_preserve_binding_mode_2021.rs @@ -0,0 +1,16 @@ +//@ edition: 2021 +//@ compile-flags: -Zunstable-options +#![feature(mut_preserve_binding_mode_2024)] +#![allow(incomplete_features)] + +struct Foo(u8); + +fn main() { + let Foo(mut a) = &Foo(0); + a = &42; + //~^ ERROR: mismatched types + + let Foo(mut a) = &mut Foo(0); + a = &mut 42; + //~^ ERROR: mismatched types +} diff --git a/tests/ui/pattern/mut_preserve_binding_mode_2021.stderr b/tests/ui/pattern/mut_preserve_binding_mode_2021.stderr new file mode 100644 index 00000000000..b800cc4a0f4 --- /dev/null +++ b/tests/ui/pattern/mut_preserve_binding_mode_2021.stderr @@ -0,0 +1,31 @@ +error[E0308]: mismatched types + --> $DIR/mut_preserve_binding_mode_2021.rs:10:9 + | +LL | let Foo(mut a) = &Foo(0); + | ----- expected due to the type of this binding +LL | a = &42; + | ^^^ expected `u8`, found `&{integer}` + | +help: consider removing the borrow + | +LL - a = &42; +LL + a = 42; + | + +error[E0308]: mismatched types + --> $DIR/mut_preserve_binding_mode_2021.rs:14:9 + | +LL | let Foo(mut a) = &mut Foo(0); + | ----- expected due to the type of this binding +LL | a = &mut 42; + | ^^^^^^^ expected `u8`, found `&mut {integer}` + | +help: consider removing the borrow + | +LL - a = &mut 42; +LL + a = 42; + | + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/pattern/mut_preserve_binding_mode_2024.rs b/tests/ui/pattern/mut_preserve_binding_mode_2024.rs new file mode 100644 index 00000000000..5454962e16c --- /dev/null +++ b/tests/ui/pattern/mut_preserve_binding_mode_2024.rs @@ -0,0 +1,15 @@ +//@ run-pass +//@ edition: 2024 +//@ compile-flags: -Zunstable-options +#![feature(mut_preserve_binding_mode_2024)] +#![allow(incomplete_features, unused)] + +struct Foo(u8); + +fn main() { + let Foo(mut a) = &Foo(0); + a = &42; + + let Foo(mut a) = &mut Foo(0); + a = &mut 42; +} diff --git a/tests/ui/pattern/mut_preserve_binding_mode_2024_lint.rs b/tests/ui/pattern/mut_preserve_binding_mode_2024_lint.rs new file mode 100644 index 00000000000..249f251d2cd --- /dev/null +++ b/tests/ui/pattern/mut_preserve_binding_mode_2024_lint.rs @@ -0,0 +1,16 @@ +//@ edition: 2021 +#![feature(mut_preserve_binding_mode_2024)] +#![allow(incomplete_features, unused)] +#![forbid(dereferencing_mut_binding)] + +struct Foo(u8); + +fn main() { + let Foo(mut a) = &Foo(0); + //~^ ERROR: dereferencing `mut` binding + a = 42; + + let Foo(mut a) = &mut Foo(0); + //~^ ERROR: dereferencing `mut` binding + a = 42; +} diff --git a/tests/ui/pattern/mut_preserve_binding_mode_2024_lint.stderr b/tests/ui/pattern/mut_preserve_binding_mode_2024_lint.stderr new file mode 100644 index 00000000000..e8d11acd83e --- /dev/null +++ b/tests/ui/pattern/mut_preserve_binding_mode_2024_lint.stderr @@ -0,0 +1,31 @@ +error: dereferencing `mut` binding + --> $DIR/mut_preserve_binding_mode_2024_lint.rs:9:13 + | +LL | let Foo(mut a) = &Foo(0); + | ^^^^^ `mut` dereferences the type of this binding + | +help: this will change in edition 2024 + --> $DIR/mut_preserve_binding_mode_2024_lint.rs:9:13 + | +LL | let Foo(mut a) = &Foo(0); + | ^^^^^ +note: the lint level is defined here + --> $DIR/mut_preserve_binding_mode_2024_lint.rs:4:11 + | +LL | #![forbid(dereferencing_mut_binding)] + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: dereferencing `mut` binding + --> $DIR/mut_preserve_binding_mode_2024_lint.rs:13:13 + | +LL | let Foo(mut a) = &mut Foo(0); + | ^^^^^ `mut` dereferences the type of this binding + | +help: this will change in edition 2024 + --> $DIR/mut_preserve_binding_mode_2024_lint.rs:13:13 + | +LL | let Foo(mut a) = &mut Foo(0); + | ^^^^^ + +error: aborting due to 2 previous errors + diff --git a/tests/ui/specialization/issue-68830-spurious-diagnostics.rs b/tests/ui/specialization/issue-68830-spurious-diagnostics.rs index d11ec798332..a7487b8aecb 100644 --- a/tests/ui/specialization/issue-68830-spurious-diagnostics.rs +++ b/tests/ui/specialization/issue-68830-spurious-diagnostics.rs @@ -17,6 +17,7 @@ impl<T, D> MyTrait<T> for D { } impl<T> MyTrait<T> for BadStruct { +//~^ ERROR: conflicting implementations of trait `MyTrait<_>` for type `BadStruct` fn foo() {} } diff --git a/tests/ui/specialization/issue-68830-spurious-diagnostics.stderr b/tests/ui/specialization/issue-68830-spurious-diagnostics.stderr index 0ecec03a023..13f6ae0805d 100644 --- a/tests/ui/specialization/issue-68830-spurious-diagnostics.stderr +++ b/tests/ui/specialization/issue-68830-spurious-diagnostics.stderr @@ -4,6 +4,16 @@ error[E0412]: cannot find type `MissingType` in this scope LL | err: MissingType | ^^^^^^^^^^^ not found in this scope -error: aborting due to 1 previous error +error[E0119]: conflicting implementations of trait `MyTrait<_>` for type `BadStruct` + --> $DIR/issue-68830-spurious-diagnostics.rs:19:1 + | +LL | impl<T, D> MyTrait<T> for D { + | --------------------------- first implementation here +... +LL | impl<T> MyTrait<T> for BadStruct { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `BadStruct` + +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0412`. +Some errors have detailed explanations: E0119, E0412. +For more information about an error, try `rustc --explain E0119`. |
