We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
auto
1 parent 57d7cfc commit aafbf74Copy full SHA for aafbf74
src/libsyntax/parse/parser.rs
@@ -6534,8 +6534,14 @@ impl<'a> Parser<'a> {
6534
let bounds = self.parse_generic_bounds()?;
6535
tps.where_clause = self.parse_where_clause()?;
6536
self.expect(&token::Semi)?;
6537
+ if is_auto == IsAuto::Yes {
6538
+ let msg = "trait aliases cannot be `auto`";
6539
+ self.struct_span_err(self.prev_span, msg)
6540
+ .span_label(self.prev_span, msg)
6541
+ .emit();
6542
+ }
6543
if unsafety != Unsafety::Normal {
- let msg = "trait aliases cannot be unsafe";
6544
+ let msg = "trait aliases cannot be `unsafe`";
6545
self.struct_span_err(self.prev_span, msg)
6546
.span_label(self.prev_span, msg)
6547
.emit();
0 commit comments