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:
commit
65f6d33b77
133 changed files with 530 additions and 510 deletions
|
@ -921,12 +921,18 @@ fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> {
|
|||
tcx.ensure().check_mod_const_bodies(module);
|
||||
});
|
||||
},
|
||||
{
|
||||
sess.time("unused_lib_feature_checking", || {
|
||||
rustc_passes::stability::check_unused_or_stable_features(tcx)
|
||||
});
|
||||
},
|
||||
{
|
||||
// We force these querie to run,
|
||||
// since they might not otherwise get called.
|
||||
// This marks the corresponding crate-level attributes
|
||||
// as used, and ensures that their values are valid.
|
||||
tcx.ensure().limits(());
|
||||
tcx.ensure().stability_index(());
|
||||
}
|
||||
);
|
||||
});
|
||||
|
@ -998,11 +1004,6 @@ fn analysis(tcx: TyCtxt<'_>, (): ()) -> Result<()> {
|
|||
tcx.hir()
|
||||
.par_for_each_module(|module| tcx.ensure().check_mod_deathness(module));
|
||||
},
|
||||
{
|
||||
sess.time("unused_lib_feature_checking", || {
|
||||
rustc_passes::stability::check_unused_or_stable_features(tcx)
|
||||
});
|
||||
},
|
||||
{
|
||||
sess.time("lint_checking", || {
|
||||
rustc_lint::check_crate(tcx, || {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue