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:
Matthias Krüger 2022-03-20 09:14:59 +01:00 committed by GitHub
commit db374bd440
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View file

@ -758,8 +758,7 @@ where
if sess.is_nightly_build() {
diag.help("add `#![feature(deprecated_suggestion)]` to the crate root");
}
// FIXME(jhpratt) change this to an actual tracking issue
diag.note("see #XXX for more details").emit();
diag.note("see #94785 for more details").emit();
}
if !get(mi, &mut suggestion) {
@ -772,10 +771,10 @@ where
meta.span(),
AttrError::UnknownMetaItem(
pprust::path_to_string(&mi.path),
if attr.has_name(sym::deprecated) {
&["since", "note"]
} else {
if sess.features_untracked().deprecated_suggestion {
&["since", "note", "suggestion"]
} else {
&["since", "note"]
},
),
);

View file

@ -5,7 +5,7 @@ LL | #[deprecated(suggestion = "foo")]
| ^^^^^^^^^^^^^^^^^^
|
= 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