1
Fork 0

Auto merge of #94096 - cjgillot:ensure-stability, r=lcnr

Ensure stability directives are checked in all cases

Split off  #93017

Stability and deprecation were not checked in all cases, for instance if a type error happened.
This PR moves the check earlier in the pipeline to ensure the errors are emitted in all cases.

r? `@lcnr`
This commit is contained in:
bors 2022-03-04 05:49:14 +00:00
commit 65f6d33b77
133 changed files with 530 additions and 510 deletions

View file

@ -167,6 +167,7 @@ fn get_features(
if let Some(Feature { since, .. }) = ACCEPTED_FEATURES.iter().find(|f| name == f.name) {
let since = Some(Symbol::intern(since));
features.declared_lang_features.push((name, mi.span(), since));
features.active_features.insert(name);
continue;
}
@ -187,10 +188,12 @@ fn get_features(
if let Some(f) = ACTIVE_FEATURES.iter().find(|f| name == f.name) {
f.set(&mut features, mi.span());
features.declared_lang_features.push((name, mi.span(), None));
features.active_features.insert(name);
continue;
}
features.declared_lib_features.push((name, mi.span()));
features.active_features.insert(name);
}
}