diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs index 48c92873e146d..053746b579dcb 100644 --- a/src/libsyntax/parse/attr.rs +++ b/src/libsyntax/parse/attr.rs @@ -105,11 +105,10 @@ impl<'a> Parser<'a> { let span = self.span; self.diagnostic() .struct_span_err(span, reason) - .note("inner attributes and doc comments, like `#![no_std]` or \ - `//! My crate`, annotate the item enclosing them, and are \ - usually found at the beginning of source files. Outer \ - attributes and doc comments, like `#[test]` and - `/// My function`, annotate the item following them.") + .note("inner attributes, like `#![no_std]`, annotate the item \ + enclosing them, and are usually found at the beginning of \ + source files. Outer attributes, like `#[test]`, annotate the \ + item following them.") .emit() } ast::AttrStyle::Inner diff --git a/src/test/ui/issue-45296.stderr b/src/test/ui/issue-45296.stderr index 7bfcac974c53e..1a660e4c6784e 100644 --- a/src/test/ui/issue-45296.stderr +++ b/src/test/ui/issue-45296.stderr @@ -4,8 +4,7 @@ error: an inner attribute is not permitted in this context 14 | #![allow(unused_variables)] | ^ | - = note: inner attributes and doc comments, like `#![no_std]` or `//! My crate`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes and doc comments, like `#[test]` and - `/// My function`, annotate the item following them. + = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them. error: aborting due to previous error