Skip to content

Commit 199ee32

Browse files
committed
stop requiring the feature-gate to use dyn_trait
1 parent 2a6200a commit 199ee32

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

src/libsyntax/feature_gate.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,6 @@ declare_features! (
375375
// Future-proofing enums/structs with #[non_exhaustive] attribute (RFC 2008)
376376
(active, non_exhaustive, "1.22.0", Some(44109), None),
377377

378-
// Trait object syntax with `dyn` prefix
379-
(active, dyn_trait, "1.22.0", Some(44662), Some(Edition::Edition2018)),
380-
381378
// `crate` as visibility modifier, synonymous to `pub(crate)`
382379
(active, crate_visibility_modifier, "1.23.0", Some(45388), Some(Edition::Edition2018)),
383380

@@ -592,6 +589,8 @@ declare_features! (
592589
(accepted, cfg_target_feature, "1.27.0", Some(29717), None),
593590
// Allows #[target_feature(...)]
594591
(accepted, target_feature, "1.27.0", None, None),
592+
// Trait object syntax with `dyn` prefix
593+
(accepted, dyn_trait, "1.22.0", Some(44662), None),
595594
);
596595

597596
// If you change this, please modify src/doc/unstable-book as well. You must
@@ -1657,10 +1656,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
16571656
gate_feature_post!(&self, never_type, ty.span,
16581657
"The `!` type is experimental");
16591658
}
1660-
ast::TyKind::TraitObject(_, ast::TraitObjectSyntax::Dyn) => {
1661-
gate_feature_post!(&self, dyn_trait, ty.span,
1662-
"`dyn Trait` syntax is unstable");
1663-
}
16641659
_ => {}
16651660
}
16661661
visit::walk_ty(self, ty)

src/test/ui/feature-gate-dyn-trait.stderr

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)