Auto merge of #139826 - matthiaskrgr:rollup-0q0qvkd, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #139745 (Avoid unused clones in `Cloned<I>` and `Copied<I>`) - #139757 (opt-dist: use executable-extension for host llvm-profdata) - #139778 (Add test for issue 34834) - #139783 (Use `compiletest-ignore-dir` for bootstrap self-tests) - #139797 (Allow (but don't require) `#[unsafe(naked)]` so that `compiler-builtins` can upgrade to it) - #139799 (Specify `--print info=file` syntax in `--help`) - #139811 (Use `newtype_index!`-generated types more idiomatically) - #139813 (Miri subtree update) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
58c2dd9a54
42 changed files with 353 additions and 173 deletions
|
@ -531,12 +531,12 @@ fn write_mir_intro<'tcx>(
|
|||
|
||||
// construct a scope tree and write it out
|
||||
let mut scope_tree: FxHashMap<SourceScope, Vec<SourceScope>> = Default::default();
|
||||
for (index, scope_data) in body.source_scopes.iter().enumerate() {
|
||||
for (index, scope_data) in body.source_scopes.iter_enumerated() {
|
||||
if let Some(parent) = scope_data.parent_scope {
|
||||
scope_tree.entry(parent).or_default().push(SourceScope::new(index));
|
||||
scope_tree.entry(parent).or_default().push(index);
|
||||
} else {
|
||||
// Only the argument scope has no parent, because it's the root.
|
||||
assert_eq!(index, OUTERMOST_SOURCE_SCOPE.index());
|
||||
assert_eq!(index, OUTERMOST_SOURCE_SCOPE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -278,7 +278,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
where
|
||||
T: TypeFoldable<TyCtxt<'tcx>>,
|
||||
{
|
||||
let shift_bv = |bv: ty::BoundVar| ty::BoundVar::from_usize(bv.as_usize() + bound_vars);
|
||||
let shift_bv = |bv: ty::BoundVar| bv + bound_vars;
|
||||
self.replace_escaping_bound_vars_uncached(
|
||||
value,
|
||||
FnMutDelegate {
|
||||
|
|
|
@ -231,9 +231,7 @@ impl MaxUniverse {
|
|||
impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for MaxUniverse {
|
||||
fn visit_ty(&mut self, t: Ty<'tcx>) {
|
||||
if let ty::Placeholder(placeholder) = t.kind() {
|
||||
self.max_universe = ty::UniverseIndex::from_u32(
|
||||
self.max_universe.as_u32().max(placeholder.universe.as_u32()),
|
||||
);
|
||||
self.max_universe = self.max_universe.max(placeholder.universe);
|
||||
}
|
||||
|
||||
t.super_visit_with(self)
|
||||
|
@ -241,9 +239,7 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for MaxUniverse {
|
|||
|
||||
fn visit_const(&mut self, c: ty::consts::Const<'tcx>) {
|
||||
if let ty::ConstKind::Placeholder(placeholder) = c.kind() {
|
||||
self.max_universe = ty::UniverseIndex::from_u32(
|
||||
self.max_universe.as_u32().max(placeholder.universe.as_u32()),
|
||||
);
|
||||
self.max_universe = self.max_universe.max(placeholder.universe);
|
||||
}
|
||||
|
||||
c.super_visit_with(self)
|
||||
|
@ -251,9 +247,7 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for MaxUniverse {
|
|||
|
||||
fn visit_region(&mut self, r: ty::Region<'tcx>) {
|
||||
if let ty::RePlaceholder(placeholder) = r.kind() {
|
||||
self.max_universe = ty::UniverseIndex::from_u32(
|
||||
self.max_universe.as_u32().max(placeholder.universe.as_u32()),
|
||||
);
|
||||
self.max_universe = self.max_universe.max(placeholder.universe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue