Skip to content

Commit 3a423cc

Browse files
authored
Rollup merge of rust-lang#87501 - spastorino:remove-min-tait, r=oli-obk
Remove min_type_alias_impl_trait in favor of type_alias_impl_trait r? `@oli-obk`
2 parents ca62d19 + f16ae7e commit 3a423cc

File tree

363 files changed

+949
-5121
lines changed

Some content is hidden

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

363 files changed

+949
-5121
lines changed

compiler/rustc_ast_passes/src/feature_gate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ impl<'a> PostExpansionVisitor<'a> {
287287
if let ast::TyKind::ImplTrait(..) = ty.kind {
288288
gate_feature_post!(
289289
&self.vis,
290-
min_type_alias_impl_trait,
290+
type_alias_impl_trait,
291291
ty.span,
292292
"`impl Trait` in type aliases is unstable"
293293
);

compiler/rustc_data_structures/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
#![feature(iter_map_while)]
2222
#![feature(maybe_uninit_uninit_array)]
2323
#![feature(min_specialization)]
24-
#![feature(min_type_alias_impl_trait)]
24+
#![cfg_attr(bootstrap, feature(min_type_alias_impl_trait))]
25+
#![cfg_attr(not(bootstrap), feature(type_alias_impl_trait))]
2526
#![feature(new_uninit)]
2627
#![feature(nll)]
2728
#![feature(once_cell)]

compiler/rustc_feature/src/active.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ declare_features! (
486486
(active, async_closure, "1.37.0", Some(62290), None),
487487

488488
/// Allows `impl Trait` to be used inside type aliases (RFC 2515).
489-
(incomplete, type_alias_impl_trait, "1.38.0", Some(63063), None),
489+
(active, type_alias_impl_trait, "1.38.0", Some(63063), None),
490490

491491
/// Allows the definition of `const extern fn` and `const unsafe extern fn`.
492492
(active, const_extern_fn, "1.40.0", Some(64926), None),
@@ -619,9 +619,6 @@ declare_features! (
619619
/// Allows macro attributes to observe output of `#[derive]`.
620620
(active, macro_attributes_in_derive_output, "1.51.0", Some(81119), None),
621621

622-
/// Allows the use of type alias impl trait in function return positions
623-
(active, min_type_alias_impl_trait, "1.52.0", Some(63063), None),
624-
625622
/// Allows associated types in inherent impls.
626623
(incomplete, inherent_associated_types, "1.52.0", Some(8995), None),
627624

compiler/rustc_feature/src/removed.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ declare_features! (
111111
Some("subsumed by `.await` syntax")),
112112
/// Allows defining `existential type`s.
113113
(removed, existential_type, "1.38.0", Some(63063), None,
114-
Some("removed in favor of `#![feature(min_type_alias_impl_trait)]`")),
114+
Some("removed in favor of `#![feature(type_alias_impl_trait)]`")),
115115
/// Allows using the macros:
116116
/// + `__diagnostic_used`
117117
/// + `__register_diagnostic`
@@ -152,6 +152,10 @@ declare_features! (
152152
(removed, impl_trait_in_bindings, "1.55.0", Some(63065), None,
153153
Some("the implementation was not maintainable, the feature may get reintroduced once the current refactorings are done")),
154154

155+
/// Allows the use of type alias impl trait in function return positions
156+
(removed, min_type_alias_impl_trait, "1.55.0", Some(63063), None,
157+
Some("removed in favor of full type_alias_impl_trait")),
158+
155159
// -------------------------------------------------------------------------
156160
// feature-group-end: removed features
157161
// -------------------------------------------------------------------------

library/alloc/src/lib.rs

+2-1
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_v2)]
145-
#![feature(min_type_alias_impl_trait)]
145+
#![cfg_attr(bootstrap, feature(min_type_alias_impl_trait))]
146+
#![cfg_attr(not(bootstrap), feature(type_alias_impl_trait))]
146147
#![feature(associated_type_bounds)]
147148
#![feature(slice_group_by)]
148149
#![feature(decl_macro)]

src/test/rustdoc-ui/coverage/traits.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// check-pass
33

44
#![feature(trait_alias)]
5-
#![feature(min_type_alias_impl_trait)]
5+
#![feature(type_alias_impl_trait)]
66

77
/// look at this trait right here
88
pub trait ThisTrait {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// check-pass
2-
#![feature(min_type_alias_impl_trait)]
2+
#![feature(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

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

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

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//edition:2018
22

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

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

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(min_type_alias_impl_trait)]
1+
#![feature(type_alias_impl_trait)]
22

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

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(min_type_alias_impl_trait)]
1+
#![feature(type_alias_impl_trait)]
22

33
pub trait Backend {}
44

0 commit comments

Comments
 (0)