Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ac47dba

Browse files
committedJun 22, 2024
Auto merge of #126824 - GuillaumeGomez:rollup-sybv8o7, r=GuillaumeGomez
Rollup of 5 pull requests Successful merges: - #126555 (Add `f16` inline ASM support for 32-bit ARM) - #126686 (Add `#[rustc_dump_{predicates,item_bounds}]`) - #126723 (Fix `...` in multline code-skips in suggestions) - #126731 (Bootstrap command refactoring: refactor `BootstrapCommand` (step 1)) - #126823 (Migrate `run-make/inline-always-many-cgu` to `rmake.rs`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents d03d6c0 + d265538 commit ac47dba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+723
-424
lines changed
 

‎compiler/rustc_hir_analysis/src/outlives/test.rs

-31
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
use rustc_hir::def::DefKind;
2+
use rustc_hir::def_id::CRATE_DEF_ID;
3+
use rustc_middle::ty::TyCtxt;
4+
use rustc_span::symbol::sym;
5+
6+
pub(crate) fn variances(tcx: TyCtxt<'_>) {
7+
if tcx.has_attr(CRATE_DEF_ID, sym::rustc_variance_of_opaques) {
8+
for id in tcx.hir().items() {
9+
let DefKind::OpaqueTy = tcx.def_kind(id.owner_id) else { continue };
10+
11+
let variances = tcx.variances_of(id.owner_id);
12+
13+
tcx.dcx().emit_err(crate::errors::VariancesOf {
14+
span: tcx.def_span(id.owner_id),
15+
variances: format!("{variances:?}"),
16+
});
17+
}
18+
}
19+
20+
for id in tcx.hir().items() {
21+
if !tcx.has_attr(id.owner_id, sym::rustc_variance) {
22+
continue;
23+
}
24+
25+
let variances = tcx.variances_of(id.owner_id);
26+
27+
tcx.dcx().emit_err(crate::errors::VariancesOf {
28+
span: tcx.def_span(id.owner_id),
29+
variances: format!("{variances:?}"),
30+
});
31+
}
32+
}

‎compiler/rustc_hir_analysis/src/variance/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ mod constraints;
2222
/// Code to solve constraints and write out the results.
2323
mod solve;
2424

25-
/// Code to write unit tests of variance.
26-
pub mod test;
25+
pub(crate) mod dump;
2726

2827
/// Code for transforming variances.
2928
mod xform;
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.