diff options
| author | bors <bors@rust-lang.org> | 2023-04-20 13:03:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-04-20 13:03:31 +0000 |
| commit | 791a7f22e3360bdbbc7fb7dab9f80e19fca4dd2b (patch) | |
| tree | 3369694af592591fad925f1c39c7aec01dbd7aa7 /compiler/rustc_codegen_ssa/src | |
| parent | 7e23d180c1db42941b3bd32542a899e9eee7cbcb (diff) | |
| parent | 56d08d1bcddcba8e3fbdbb0231b992a328ee62b3 (diff) | |
| download | rust-791a7f22e3360bdbbc7fb7dab9f80e19fca4dd2b.tar.gz rust-791a7f22e3360bdbbc7fb7dab9f80e19fca4dd2b.zip | |
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
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/meth.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_ssa/src/meth.rs b/compiler/rustc_codegen_ssa/src/meth.rs index 2421acab471..81b49afb883 100644 --- a/compiler/rustc_codegen_ssa/src/meth.rs +++ b/compiler/rustc_codegen_ssa/src/meth.rs @@ -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"); } } |
