diff options
| author | Michael Goulet <michael@errs.io> | 2023-07-29 19:47:15 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-07-29 19:47:15 +0000 |
| commit | 4b58ae0bb8374aa41ccfc69820c68680979fa315 (patch) | |
| tree | b4c7bbc3c48fc309151fe881e4e0036e7b84c99e | |
| parent | 4c968227965f101e41bda8a38ff02fd1baee28c4 (diff) | |
| download | rust-4b58ae0bb8374aa41ccfc69820c68680979fa315.tar.gz rust-4b58ae0bb8374aa41ccfc69820c68680979fa315.zip | |
Mark lazy_type_alias as incomplete
| -rw-r--r-- | compiler/rustc_feature/src/active.rs | 2 | ||||
| -rw-r--r-- | tests/rustdoc/alias-reexport.rs | 1 | ||||
| -rw-r--r-- | tests/rustdoc/alias-reexport2.rs | 1 | ||||
| -rw-r--r-- | tests/ui/type-alias/lazy-type-alias-enum-variant.rs | 1 | ||||
| -rw-r--r-- | tests/ui/type-alias/lazy-type-alias-enum-variant.stderr | 11 |
5 files changed, 15 insertions, 1 deletions
diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index 22380a52104..bbc3d291e20 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -449,7 +449,7 @@ declare_features! ( // Allows setting the threshold for the `large_assignments` lint. (active, large_assignments, "1.52.0", Some(83518), None), /// Allow to have type alias types for inter-crate use. - (active, lazy_type_alias, "1.72.0", Some(112792), None), + (incomplete, lazy_type_alias, "1.72.0", Some(112792), None), /// Allows `if/while p && let q = r && ...` chains. (active, let_chains, "1.37.0", Some(53667), None), /// Allows using `reason` in lint attributes and the `#[expect(lint)]` lint check. diff --git a/tests/rustdoc/alias-reexport.rs b/tests/rustdoc/alias-reexport.rs index a2a8e651caf..4003ecec21c 100644 --- a/tests/rustdoc/alias-reexport.rs +++ b/tests/rustdoc/alias-reexport.rs @@ -3,6 +3,7 @@ #![crate_name = "foo"] #![feature(lazy_type_alias)] +#![allow(incomplete_features)] extern crate alias_reexport2; diff --git a/tests/rustdoc/alias-reexport2.rs b/tests/rustdoc/alias-reexport2.rs index 85d3cdad962..5f6357ad128 100644 --- a/tests/rustdoc/alias-reexport2.rs +++ b/tests/rustdoc/alias-reexport2.rs @@ -3,6 +3,7 @@ #![crate_name = "foo"] #![feature(lazy_type_alias)] +#![allow(incomplete_features)] extern crate alias_reexport; diff --git a/tests/ui/type-alias/lazy-type-alias-enum-variant.rs b/tests/ui/type-alias/lazy-type-alias-enum-variant.rs index 78c3159d1c2..6d18e9eca62 100644 --- a/tests/ui/type-alias/lazy-type-alias-enum-variant.rs +++ b/tests/ui/type-alias/lazy-type-alias-enum-variant.rs @@ -2,6 +2,7 @@ // check-pass #![feature(lazy_type_alias)] +//~^ WARN the feature `lazy_type_alias` is incomplete and may not be safe to use enum Enum { Unit, diff --git a/tests/ui/type-alias/lazy-type-alias-enum-variant.stderr b/tests/ui/type-alias/lazy-type-alias-enum-variant.stderr new file mode 100644 index 00000000000..381261b95c7 --- /dev/null +++ b/tests/ui/type-alias/lazy-type-alias-enum-variant.stderr @@ -0,0 +1,11 @@ +warning: the feature `lazy_type_alias` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/lazy-type-alias-enum-variant.rs:4:12 + | +LL | #![feature(lazy_type_alias)] + | ^^^^^^^^^^^^^^^ + | + = note: see issue #112792 <https://github.com/rust-lang/rust/issues/112792> for more information + = note: `#[warn(incomplete_features)]` on by default + +warning: 1 warning emitted + |
