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:
bors 2018-06-22 19:55:30 +00:00
commit cbc4c8380f
3 changed files with 17 additions and 2 deletions

View file

@ -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));
}
}
}