We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 35dddd3 + f16ae7e commit 23479f7Copy full SHA for 23479f7
compiler/rustc_ast_passes/src/feature_gate.rs
@@ -287,7 +287,7 @@ impl<'a> PostExpansionVisitor<'a> {
287
if let ast::TyKind::ImplTrait(..) = ty.kind {
288
gate_feature_post!(
289
&self.vis,
290
- min_type_alias_impl_trait,
+ type_alias_impl_trait,
291
ty.span,
292
"`impl Trait` in type aliases is unstable"
293
);
compiler/rustc_data_structures/src/lib.rs
@@ -21,7 +21,8 @@
21
#![feature(iter_map_while)]
22
#![feature(maybe_uninit_uninit_array)]
23
#![feature(min_specialization)]
24
-#![feature(min_type_alias_impl_trait)]
+#![cfg_attr(bootstrap, feature(min_type_alias_impl_trait))]
25
+#![cfg_attr(not(bootstrap), feature(type_alias_impl_trait))]
26
#![feature(new_uninit)]
27
#![feature(nll)]
28
#![feature(once_cell)]
compiler/rustc_feature/src/active.rs
@@ -486,7 +486,7 @@ declare_features! (
486
(active, async_closure, "1.37.0", Some(62290), None),
487
488
/// Allows `impl Trait` to be used inside type aliases (RFC 2515).
489
- (incomplete, type_alias_impl_trait, "1.38.0", Some(63063), None),
+ (active, type_alias_impl_trait, "1.38.0", Some(63063), None),
490
491
/// Allows the definition of `const extern fn` and `const unsafe extern fn`.
492
(active, const_extern_fn, "1.40.0", Some(64926), None),
@@ -619,9 +619,6 @@ declare_features! (
619
/// Allows macro attributes to observe output of `#[derive]`.
620
(active, macro_attributes_in_derive_output, "1.51.0", Some(81119), None),
621
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
-
625
/// Allows associated types in inherent impls.
626
(incomplete, inherent_associated_types, "1.52.0", Some(8995), None),
627
compiler/rustc_feature/src/removed.rs
@@ -111,7 +111,7 @@ declare_features! (
111
Some("subsumed by `.await` syntax")),
112
/// Allows defining `existential type`s.
113
(removed, existential_type, "1.38.0", Some(63063), None,
114
- Some("removed in favor of `#![feature(min_type_alias_impl_trait)]`")),
+ Some("removed in favor of `#![feature(type_alias_impl_trait)]`")),
115
/// Allows using the macros:
116
/// + `__diagnostic_used`
117
/// + `__register_diagnostic`
@@ -152,6 +152,10 @@ declare_features! (
152
(removed, impl_trait_in_bindings, "1.55.0", Some(63065), None,
153
Some("the implementation was not maintainable, the feature may get reintroduced once the current refactorings are done")),
154
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
+
159
// -------------------------------------------------------------------------
160
// feature-group-end: removed features
161
library/alloc/src/lib.rs
@@ -142,7 +142,8 @@
142
#![feature(alloc_layout_extra)]
143
#![feature(trusted_random_access)]
144
#![feature(try_trait_v2)]
145
146
147
#![feature(associated_type_bounds)]
148
#![feature(slice_group_by)]
149
#![feature(decl_macro)]
src/test/rustdoc-ui/coverage/traits.rs
@@ -2,7 +2,7 @@
2
// check-pass
3
4
#![feature(trait_alias)]
5
+#![feature(type_alias_impl_trait)]
6
7
/// look at this trait right here
8
pub trait ThisTrait {
src/test/rustdoc-ui/error-in-impl-trait/trait-alias-closure.rs
@@ -1,5 +1,5 @@
1
pub trait ValidTrait {}
type ImplTrait = impl ValidTrait;
src/test/rustdoc-ui/error-in-impl-trait/trait-alias.rs
src/test/rustdoc/auxiliary/issue-73061.rs
@@ -1,6 +1,6 @@
//edition:2018
pub trait Foo {
type X: std::future::Future<Output = ()>;
src/test/rustdoc/impl-trait-alias.rs
@@ -1,4 +1,4 @@
trait MyTrait {}
impl MyTrait for i32 {}
src/test/rustdoc/return-impl-trait.rs
pub trait Backend {}
0 commit comments