1
Fork 0

Represent absence of 'since' attribute as a variant of DeprecatedSince

This commit is contained in:
David Tolnay 2023-10-30 15:51:26 -07:00
parent c52367276d
commit e8868af75b
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82
5 changed files with 32 additions and 30 deletions

View file

@ -197,7 +197,7 @@ impl<'a, 'tcx> Annotator<'a, 'tcx> {
}
if let Some((
rustc_attr::Deprecation { since: Some(DeprecatedSince::RustcVersion(_)), .. },
rustc_attr::Deprecation { since: DeprecatedSince::RustcVersion(_), .. },
span,
)) = &depr
{
@ -228,7 +228,7 @@ impl<'a, 'tcx> Annotator<'a, 'tcx> {
if let (
&Some(DeprecatedSince::RustcVersion(dep_since)),
&attr::Stable { since: stab_since, .. },
) = (&depr.as_ref().and_then(|(d, _)| d.since), &stab.level)
) = (&depr.as_ref().map(|(d, _)| d.since), &stab.level)
{
match stab_since {
StableSince::Current => {