diff options
Diffstat (limited to 'compiler/rustc_passes/src/stability.rs')
| -rw-r--r-- | compiler/rustc_passes/src/stability.rs | 10 | 
1 files changed, 2 insertions, 8 deletions
diff --git a/compiler/rustc_passes/src/stability.rs b/compiler/rustc_passes/src/stability.rs index 6ef160f3b39..6a2498f3f99 100644 --- a/compiler/rustc_passes/src/stability.rs +++ b/compiler/rustc_passes/src/stability.rs @@ -196,14 +196,8 @@ impl<'a, 'tcx> Annotator<'a, 'tcx> { } } - if let Some(( - rustc_attr::Deprecation { since: DeprecatedSince::RustcVersion(_), .. }, - span, - )) = &depr - { - if stab.is_none() { - self.tcx.sess.emit_err(errors::DeprecatedAttribute { span: *span }); - } + if let Some((depr, span)) = &depr && depr.is_since_rustc_version() && stab.is_none() { + self.tcx.sess.emit_err(errors::DeprecatedAttribute { span: *span }); } if let Some((body_stab, _span)) = body_stab {  | 
