Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f029558

Browse files
committedFeb 6, 2024
Stabilize associated type position impl Trait (ATPIT)
1 parent f3b9d47 commit f029558

File tree

135 files changed

+129
-356
lines changed

Some content is hidden

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

135 files changed

+129
-356
lines changed
 

‎compiler/rustc_ast_passes/src/feature_gate.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,7 @@ impl<'a> PostExpansionVisitor<'a> {
120120
impl Visitor<'_> for ImplTraitVisitor<'_> {
121121
fn visit_ty(&mut self, ty: &ast::Ty) {
122122
if let ast::TyKind::ImplTrait(..) = ty.kind {
123-
if self.in_associated_ty {
124-
gate!(
125-
&self.vis,
126-
impl_trait_in_assoc_type,
127-
ty.span,
128-
"`impl Trait` in associated types is unstable"
129-
);
130-
} else {
123+
if !self.in_associated_ty {
131124
gate!(
132125
&self.vis,
133126
type_alias_impl_trait,

‎compiler/rustc_codegen_llvm/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#![feature(iter_intersperse)]
1515
#![feature(let_chains)]
1616
#![feature(min_specialization)]
17-
#![feature(impl_trait_in_assoc_type)]
17+
#![cfg_attr(bootstrap, feature(impl_trait_in_assoc_type))]
1818
#![deny(rustc::untranslatable_diagnostic)]
1919
#![deny(rustc::diagnostic_outside_of_impl)]
2020

0 commit comments

Comments
 (0)
Please sign in to comment.