Rollup merge of #132544 - dianne:unstable-library-feature-backticks, r=compiler-errors
Use backticks instead of single quotes for library feature names in diagnostics This PR changes the text of library feature errors for using unstable or body-unstable items. Displaying library feature names in backticks is consistent with other diagnostics (e.g. those from `rustc_passes`) and with the `reason`s on unstable attributes in the library. Additionally, this simplifies diagnostics when supporting multiple unstable attributes on items (see #131824) since `DiagSymbolList` also displays symbols using backticks.
This commit is contained in:
commit
b9db639ea5
113 changed files with 433 additions and 431 deletions
|
@ -112,8 +112,8 @@ pub fn report_unstable(
|
|||
soft_handler: impl FnOnce(&'static Lint, Span, String),
|
||||
) {
|
||||
let msg = match reason {
|
||||
Some(r) => format!("use of unstable library feature '{feature}': {r}"),
|
||||
None => format!("use of unstable library feature '{feature}'"),
|
||||
Some(r) => format!("use of unstable library feature `{feature}`: {r}"),
|
||||
None => format!("use of unstable library feature `{feature}`"),
|
||||
};
|
||||
|
||||
if is_soft {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue