Auto merge of #51681 - varkor:rustc_deprecated-future-deprecation, r=petrochenkov
Support future deprecation for rustc_deprecated Follow-up to #49179 to allow `since` parameters to be set to future versions of Rust and correspondingly to not be treated as deprecated until that version. This is required for #30459 to be completed (though we'll need to wait until this hits beta).
This commit is contained in:
commit
cbc4c8380f
3 changed files with 17 additions and 2 deletions
|
|
@ -614,10 +614,12 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
|
|||
debug!("stability: \
|
||||
inspecting def_id={:?} span={:?} of stability={:?}", def_id, span, stability);
|
||||
|
||||
if let Some(&Stability{rustc_depr: Some(attr::RustcDeprecation { reason, .. }), ..})
|
||||
if let Some(&Stability{rustc_depr: Some(attr::RustcDeprecation { reason, since }), ..})
|
||||
= stability {
|
||||
if let Some(id) = id {
|
||||
lint_deprecated(def_id, id, Some(reason));
|
||||
if deprecation_in_effect(&since.as_str()) {
|
||||
lint_deprecated(def_id, id, Some(reason));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue