Skip to content

Commit 01d2429

Browse files
committed
Feature gate defaulted traits
1 parent 9ae144f commit 01d2429

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/libsyntax/feature_gate.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,13 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
563563
}
564564
}
565565

566+
ast::ItemDefaultImpl(..) => {
567+
self.gate_feature("optin_builtin_traits",
568+
i.span,
569+
"default trait implementations are experimental \
570+
and possibly buggy");
571+
}
572+
566573
ast::ItemImpl(_, polarity, _, _, _, _) => {
567574
match polarity {
568575
ast::ImplPolarity::Negative => {

0 commit comments

Comments
 (0)