Rollup merge of #94948 - jhpratt:rustc_deprecated, r=Dylan-DPC
Fix diagnostics for `#![feature(deprecated_suggestion)]` Follow up from #94635, where I missed a couple things.
This commit is contained in:
commit
db374bd440
2 changed files with 5 additions and 6 deletions
|
@ -758,8 +758,7 @@ where
|
||||||
if sess.is_nightly_build() {
|
if sess.is_nightly_build() {
|
||||||
diag.help("add `#![feature(deprecated_suggestion)]` to the crate root");
|
diag.help("add `#![feature(deprecated_suggestion)]` to the crate root");
|
||||||
}
|
}
|
||||||
// FIXME(jhpratt) change this to an actual tracking issue
|
diag.note("see #94785 for more details").emit();
|
||||||
diag.note("see #XXX for more details").emit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if !get(mi, &mut suggestion) {
|
if !get(mi, &mut suggestion) {
|
||||||
|
@ -772,10 +771,10 @@ where
|
||||||
meta.span(),
|
meta.span(),
|
||||||
AttrError::UnknownMetaItem(
|
AttrError::UnknownMetaItem(
|
||||||
pprust::path_to_string(&mi.path),
|
pprust::path_to_string(&mi.path),
|
||||||
if attr.has_name(sym::deprecated) {
|
if sess.features_untracked().deprecated_suggestion {
|
||||||
&["since", "note"]
|
|
||||||
} else {
|
|
||||||
&["since", "note", "suggestion"]
|
&["since", "note", "suggestion"]
|
||||||
|
} else {
|
||||||
|
&["since", "note"]
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -5,7 +5,7 @@ LL | #[deprecated(suggestion = "foo")]
|
||||||
| ^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= help: add `#![feature(deprecated_suggestion)]` to the crate root
|
= help: add `#![feature(deprecated_suggestion)]` to the crate root
|
||||||
= note: see #XXX for more details
|
= note: see #94785 for more details
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue