about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libsyntax/parse/attr.rs9
-rw-r--r--src/test/ui/issue-45296.stderr3
2 files changed, 5 insertions, 7 deletions
diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs
index 48c92873e14..053746b579d 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 7bfcac974c5..1a660e4c678 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