about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-07-16 22:30:47 +0200
committerGitHub <noreply@github.com>2022-07-16 22:30:47 +0200
commit6f8fb911ad504b77549cf3256a09465621beab9d (patch)
tree2e80aa18a788547eaea22cc1e566770daab1a81a /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent7210e46dc69a4b197a313d093fe145722c248b7d (diff)
parent57e9f7a556ae4873acc14c62bb4d6fc7ed6123ac (diff)
downloadrust-6f8fb911ad504b77549cf3256a09465621beab9d.tar.gz
rust-6f8fb911ad504b77549cf3256a09465621beab9d.zip
Rollup merge of #98582 - oli-obk:unconstrained_opaque_type, r=estebank
Allow destructuring opaque types in their defining scopes

fixes #96572

Before this PR, the following code snippet failed with an incomprehensible error, and similar code just ICEd in mir borrowck.

```rust
    type T = impl Copy;
    let foo: T = (1u32, 2u32);
    let (a, b) = foo;
```

The problem was that the last line created MIR projections of the form `foo.0` and `foo.1`, but `foo`'s type is `T`, which doesn't have fields (only its hidden type does). But the pattern supplies enough type information (a tuple of two different inference types) to bind a hidden type.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions