Auto merge of #110598 - matthiaskrgr:rollup-0ybd9i3, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #110240 (Add `indent_style = tab` for `Makefile`s to `.editorconfig`) - #110545 (Add `GenericArgKind::as_{type,const,region}`) - #110574 ( fix out-of-date comment about rpath in bootstrap) - #110581 (Style fix for loongarch-linux.md) - #110584 (Allow overwriting the sysroot compile flag in compile tests) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
791a7f22e3
12 changed files with 96 additions and 114 deletions
|
@ -67,10 +67,10 @@ impl<'a, 'tcx> VirtualIndex {
|
|||
/// ref of the type.
|
||||
fn expect_dyn_trait_in_self(ty: Ty<'_>) -> ty::PolyExistentialTraitRef<'_> {
|
||||
for arg in ty.peel_refs().walk() {
|
||||
if let GenericArgKind::Type(ty) = arg.unpack() {
|
||||
if let ty::Dynamic(data, _, _) = ty.kind() {
|
||||
return data.principal().expect("expected principal trait object");
|
||||
}
|
||||
if let GenericArgKind::Type(ty) = arg.unpack()
|
||||
&& let ty::Dynamic(data, _, _) = ty.kind()
|
||||
{
|
||||
return data.principal().expect("expected principal trait object");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue