Skip to content

Commit

Permalink
Rollup merge of #87501 - spastorino:remove-min-tait, r=oli-obk
Browse files Browse the repository at this point in the history
Remove min_type_alias_impl_trait in favor of type_alias_impl_trait

r? ``@oli-obk``
  • Loading branch information
JohnTitor committed Jul 28, 2021
2 parents 35dddd3 + f16ae7e commit 23479f7
Show file tree
Hide file tree
Showing 363 changed files with 949 additions and 5,121 deletions.
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,
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 @@ -486,7 +486,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 @@ -619,9 +619,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 @@ -142,7 +142,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

0 comments on commit 23479f7

Please sign in to comment.