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

Remove min_type_alias_impl_trait in favor of type_alias_impl_trait #87501

Merged
merged 6 commits into from
Jul 28, 2021
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion compiler/rustc_ast_passes/src/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ impl<'a> PostExpansionVisitor<'a> {
if let ast::TyKind::ImplTrait(..) = ty.kind {
gate_feature_post!(
&self.vis,
min_type_alias_impl_trait,
spastorino marked this conversation as resolved.
Show resolved Hide resolved
type_alias_impl_trait,
ty.span,
"`impl Trait` in type aliases is unstable"
);
Expand Down
3 changes: 2 additions & 1 deletion compiler/rustc_data_structures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
#![feature(iter_map_while)]
#![feature(maybe_uninit_uninit_array)]
#![feature(min_specialization)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(bootstrap, feature(min_type_alias_impl_trait))]
#![cfg_attr(not(bootstrap), feature(type_alias_impl_trait))]
#![feature(new_uninit)]
#![feature(nll)]
#![feature(once_cell)]
Expand Down
5 changes: 1 addition & 4 deletions compiler/rustc_feature/src/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ declare_features! (
(active, async_closure, "1.37.0", Some(62290), None),

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

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

/// Allows the use of type alias impl trait in function return positions
(active, min_type_alias_impl_trait, "1.52.0", Some(63063), None),

/// Allows associated types in inherent impls.
(incomplete, inherent_associated_types, "1.52.0", Some(8995), None),

Expand Down
6 changes: 5 additions & 1 deletion compiler/rustc_feature/src/removed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ declare_features! (
Some("subsumed by `.await` syntax")),
/// Allows defining `existential type`s.
(removed, existential_type, "1.38.0", Some(63063), None,
Some("removed in favor of `#![feature(min_type_alias_impl_trait)]`")),
Some("removed in favor of `#![feature(type_alias_impl_trait)]`")),
/// Allows using the macros:
/// + `__diagnostic_used`
/// + `__register_diagnostic`
Expand Down Expand Up @@ -152,6 +152,10 @@ declare_features! (
(removed, impl_trait_in_bindings, "1.55.0", Some(63065), None,
Some("the implementation was not maintainable, the feature may get reintroduced once the current refactorings are done")),

/// Allows the use of type alias impl trait in function return positions
(removed, min_type_alias_impl_trait, "1.55.0", Some(63063), None,
Some("removed in favor of full type_alias_impl_trait")),

// -------------------------------------------------------------------------
// feature-group-end: removed features
// -------------------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion library/alloc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@
#![feature(alloc_layout_extra)]
#![feature(trusted_random_access)]
#![feature(try_trait_v2)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(bootstrap, feature(min_type_alias_impl_trait))]
#![cfg_attr(not(bootstrap), feature(type_alias_impl_trait))]
#![feature(associated_type_bounds)]
#![feature(slice_group_by)]
#![feature(decl_macro)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/rustdoc-ui/coverage/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// check-pass

#![feature(trait_alias)]
#![feature(min_type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]

/// look at this trait right here
pub trait ThisTrait {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// check-pass
#![feature(min_type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]

pub trait ValidTrait {}
type ImplTrait = impl ValidTrait;
Expand Down
2 changes: 1 addition & 1 deletion src/test/rustdoc-ui/error-in-impl-trait/trait-alias.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// check-pass
#![feature(min_type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]

pub trait ValidTrait {}
type ImplTrait = impl ValidTrait;
Expand Down
2 changes: 1 addition & 1 deletion src/test/rustdoc/auxiliary/issue-73061.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//edition:2018

#![feature(min_type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]

pub trait Foo {
type X: std::future::Future<Output = ()>;
Expand Down
2 changes: 1 addition & 1 deletion src/test/rustdoc/impl-trait-alias.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(min_type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]

trait MyTrait {}
impl MyTrait for i32 {}
Expand Down
2 changes: 1 addition & 1 deletion src/test/rustdoc/return-impl-trait.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(min_type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]

pub trait Backend {}

Expand Down
Loading