about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-12-20 23:35:15 +0100
committerGitHub <noreply@github.com>2022-12-20 23:35:15 +0100
commita4ef47d6b398b7d4012c9494463f6865aab77557 (patch)
tree025f84899e5a8db3ef6dac70f060a58478ec7e7d /compiler/rustc_codegen_llvm/src/errors.rs
parent4726e514d70d53b38530e3608d364bf1ada6bd97 (diff)
parentc9588d5bf8db14d80249b029b07f79026956ae85 (diff)
downloadrust-a4ef47d6b398b7d4012c9494463f6865aab77557.tar.gz
rust-a4ef47d6b398b7d4012c9494463f6865aab77557.zip
Rollup merge of #105897 - oli-obk:tait_patterns, r=TaKO8Ki
Fix an opaque type ICE

fixes #104551

The issue is that if you have

```rust
type T = impl Sized;
let (_a, _b): T = ..
```

we have only the type annotation `T`, but want to use that ascription for `_a` and `_b`, so what we generate is a type ascription plus a field projection saying `_a`'s type is `T::0`. Of course `T` has no fields. Of course we could also not generate type annotations for projections into opaque types at all, but that's more fragile, as we now have to make sure that https://github.com/rust-lang/rust/blob/12bbdbdb440119a0b86d2ee742ec1460cdb2c5b9/compiler/rustc_mir_build/src/build/matches/mod.rs#L709 doesn't have any arm that introduces a user type annotation except for `PatKind::Binding`.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions