diff --git a/src/librustc_passes/ast_validation.rs b/src/librustc_passes/ast_validation.rs index 1866122454c..6708640379a 100644 --- a/src/librustc_passes/ast_validation.rs +++ b/src/librustc_passes/ast_validation.rs @@ -273,7 +273,9 @@ impl<'a> Visitor<'a> for AstValidator<'a> { self.err_handler().span_err(item.span, "inherent impls cannot be negative"); } if defaultness == Defaultness::Default { - self.err_handler().span_err(item.span, "inherent impls cannot be default"); + self.err_handler() + .struct_span_err(item.span, "inherent impls cannot be default") + .note("only trait implementations may be annotated with default").emit(); } } ItemKind::ForeignMod(..) => {