Skip to content

Commit 1f7df19

Browse files
committed
Replace type_alias_impl_trait by min_type_alias_impl_trait with no actual changes in behaviour
This makes `type_alias_impl_trait` not actually do anything anymore
1 parent 19dce73 commit 1f7df19

File tree

332 files changed

+4814
-576
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

332 files changed

+4814
-576
lines changed

compiler/rustc_ast_passes/src/feature_gate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ impl<'a> PostExpansionVisitor<'a> {
279279
if let ast::TyKind::ImplTrait(..) = ty.kind {
280280
gate_feature_post!(
281281
&self.vis,
282-
type_alias_impl_trait,
282+
min_type_alias_impl_trait,
283283
ty.span,
284284
"`impl Trait` in type aliases is unstable"
285285
);

compiler/rustc_feature/src/active.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,9 @@ declare_features! (
638638
/// Allows `pub` on `macro_rules` items.
639639
(active, pub_macro_rules, "1.52.0", Some(78855), None),
640640

641+
/// Allows the use of type alias impl trait in function return positions
642+
(active, min_type_alias_impl_trait, "1.52.0", Some(63063), None),
643+
641644
/// Allows associated types in inherent impls.
642645
(active, inherent_associated_types, "1.52.0", Some(8995), None),
643646

@@ -670,6 +673,7 @@ pub const INCOMPLETE_FEATURES: &[Symbol] = &[
670673
sym::capture_disjoint_fields,
671674
sym::const_generics_defaults,
672675
sym::inherent_associated_types,
676+
sym::type_alias_impl_trait,
673677
];
674678

675679
/// Some features are not allowed to be used together at the same time, if

compiler/rustc_feature/src/removed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ declare_features! (
106106
Some("subsumed by `.await` syntax")),
107107
/// Allows defining `existential type`s.
108108
(removed, existential_type, "1.38.0", Some(63063), None,
109-
Some("removed in favor of `#![feature(type_alias_impl_trait)]`")),
109+
Some("removed in favor of `#![feature(min_type_alias_impl_trait)]`")),
110110
/// Allows using the macros:
111111
/// + `__diagnostic_used`
112112
/// + `__register_diagnostic`

compiler/rustc_span/src/symbol.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,7 @@ symbols! {
736736
min_const_generics,
737737
min_const_unsafe_fn,
738738
min_specialization,
739+
min_type_alias_impl_trait,
739740
minnumf32,
740741
minnumf64,
741742
mips_target_feature,

library/alloc/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@
142142
#![feature(alloc_layout_extra)]
143143
#![feature(trusted_random_access)]
144144
#![feature(try_trait)]
145-
#![feature(type_alias_impl_trait)]
145+
#![cfg_attr(bootstrap, feature(type_alias_impl_trait))]
146+
#![cfg_attr(not(bootstrap), feature(min_type_alias_impl_trait))]
146147
#![feature(associated_type_bounds)]
147148
#![feature(slice_group_by)]
148149
#![feature(decl_macro)]

src/test/rustdoc-ui/error-in-impl-trait/trait-alias-closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// check-pass
2-
#![feature(type_alias_impl_trait)]
2+
#![feature(min_type_alias_impl_trait)]
33

44
pub trait ValidTrait {}
55
type ImplTrait = impl ValidTrait;

src/test/rustdoc-ui/error-in-impl-trait/trait-alias.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// check-pass
2-
#![feature(type_alias_impl_trait)]
2+
#![feature(min_type_alias_impl_trait)]
33

44
pub trait ValidTrait {}
55
type ImplTrait = impl ValidTrait;

src/test/rustdoc/auxiliary/issue-73061.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//edition:2018
22

3-
#![feature(type_alias_impl_trait)]
3+
#![feature(min_type_alias_impl_trait)]
44

55
pub trait Foo {
66
type X: std::future::Future<Output = ()>;

src/test/rustdoc/impl-trait-alias.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(type_alias_impl_trait)]
1+
#![feature(min_type_alias_impl_trait)]
22

33
trait MyTrait {}
44
impl MyTrait for i32 {}

src/test/rustdoc/return-impl-trait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(type_alias_impl_trait)]
1+
#![feature(min_type_alias_impl_trait)]
22

33
pub trait Backend {}
44

0 commit comments

Comments
 (0)