Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark lazy_type_alias as incomplete #114222

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_feature/src/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions tests/rustdoc/alias-reexport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#![crate_name = "foo"]
#![feature(lazy_type_alias)]
#![allow(incomplete_features)]

extern crate alias_reexport2;

Expand Down
1 change: 1 addition & 0 deletions tests/rustdoc/alias-reexport2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#![crate_name = "foo"]
#![feature(lazy_type_alias)]
#![allow(incomplete_features)]

extern crate alias_reexport;

Expand Down
1 change: 1 addition & 0 deletions tests/ui/type-alias/lazy-type-alias-enum-variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
11 changes: 11 additions & 0 deletions tests/ui/type-alias/lazy-type-alias-enum-variant.stderr
Original file line number Diff line number Diff line change
@@ -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

Loading