Skip to content

Commit e5e1397

Browse files
author
Samy Kacimi
committed
normalize use of backticks in compiler messages for librustc/lint
#60532
1 parent 96234d5 commit e5e1397

File tree

149 files changed

+177
-177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+177
-177
lines changed

src/librustc/lint/builtin.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,19 @@ declare_lint! {
9494
declare_lint! {
9595
pub UNUSED_FEATURES,
9696
Warn,
97-
"unused features found in crate-level #[feature] directives"
97+
"unused features found in crate-level `#[feature]` directives"
9898
}
9999

100100
declare_lint! {
101101
pub STABLE_FEATURES,
102102
Warn,
103-
"stable features found in #[feature] directive"
103+
"stable features found in `#[feature]` directive"
104104
}
105105

106106
declare_lint! {
107107
pub UNKNOWN_CRATE_TYPES,
108108
Deny,
109-
"unknown crate type found in #[crate_type] directive"
109+
"unknown crate type found in `#[crate_type]` directive"
110110
}
111111

112112
declare_lint! {

src/librustc/lint/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ pub fn struct_lint_level<'a>(sess: &'a Session,
671671
sess.diag_note_once(
672672
&mut err,
673673
DiagnosticMessageId::from(lint),
674-
&format!("#[{}({})] on by default", level.as_str(), name));
674+
&format!("`#[{}({})]` on by default", level.as_str(), name));
675675
}
676676
LintSource::CommandLine(lint_flag_val) => {
677677
let flag = match level {
@@ -706,7 +706,7 @@ pub fn struct_lint_level<'a>(sess: &'a Session,
706706
if lint_attr_name.as_str() != name {
707707
let level_str = level.as_str();
708708
sess.diag_note_once(&mut err, DiagnosticMessageId::from(lint),
709-
&format!("#[{}({})] implied by #[{}({})]",
709+
&format!("`#[{}({})]` implied by `#[{}({})]`",
710710
level_str, name, level_str, lint_attr_name));
711711
}
712712
}

src/test/run-pass/extern/extern-prelude-core.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ warning: the feature `extern_prelude` has been stable since 1.30.0 and no longer
44
LL | #![feature(extern_prelude, lang_items, start)]
55
| ^^^^^^^^^^^^^^
66
|
7-
= note: #[warn(stable_features)] on by default
7+
= note: `#[warn(stable_features)]` on by default
88

src/test/run-pass/extern/extern-prelude-std.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ warning: the feature `extern_prelude` has been stable since 1.30.0 and no longer
44
LL | #![feature(extern_prelude)]
55
| ^^^^^^^^^^^^^^
66
|
7-
= note: #[warn(stable_features)] on by default
7+
= note: `#[warn(stable_features)]` on by default
88

src/test/run-pass/if-ret.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ warning: unreachable block in `if` expression
44
LL | fn foo() { if (return) { } }
55
| ^^^
66
|
7-
= note: #[warn(unreachable_code)] on by default
7+
= note: `#[warn(unreachable_code)]` on by default
88

src/test/run-pass/macros/macro-use-all-and-none.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ warning: unused attribute
44
LL | #[macro_use()]
55
| ^^^^^^^^^^^^^^
66
|
7-
= note: #[warn(unused_attributes)] on by default
7+
= note: `#[warn(unused_attributes)]` on by default
88

src/test/run-pass/rfcs/rfc-2126-crate-paths/crate-path-absolute.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ warning: the feature `crate_in_paths` has been stable since 1.30.0 and no longer
44
LL | #![feature(crate_in_paths)]
55
| ^^^^^^^^^^^^^^
66
|
7-
= note: #[warn(stable_features)] on by default
7+
= note: `#[warn(stable_features)]` on by default
88

src/test/run-pass/rfcs/rfc-2126-crate-paths/crate-path-visibility-ambiguity.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ warning: the feature `crate_in_paths` has been stable since 1.30.0 and no longer
44
LL | #![feature(crate_in_paths)]
55
| ^^^^^^^^^^^^^^
66
|
7-
= note: #[warn(stable_features)] on by default
7+
= note: `#[warn(stable_features)]` on by default
88

src/test/rustdoc-ui/intra-links-warning-crlf.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: `[error]` cannot be resolved, ignoring it...
44
LL | /// [error]
55
| ^^^^^ cannot be resolved, ignoring
66
|
7-
= note: #[warn(intra_doc_link_resolution_failure)] on by default
7+
= note: `#[warn(intra_doc_link_resolution_failure)]` on by default
88
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
99

1010
warning: `[error1]` cannot be resolved, ignoring it...

src/test/rustdoc-ui/intra-links-warning.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ warning: `[Foo::baz]` cannot be resolved, ignoring it...
44
LL | //! Test with [Foo::baz], [Bar::foo], ...
55
| ^^^^^^^^ cannot be resolved, ignoring
66
|
7-
= note: #[warn(intra_doc_link_resolution_failure)] on by default
7+
= note: `#[warn(intra_doc_link_resolution_failure)]` on by default
88
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
99

1010
warning: `[Bar::foo]` cannot be resolved, ignoring it...

0 commit comments

Comments
 (0)