about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-11 15:29:47 +0000
committerbors <bors@rust-lang.org>2023-07-11 15:29:47 +0000
commit0a2681cc493f929a0fe66eae1c2c5e862205072c (patch)
treeb411bb6f0903ad1db26e5801792f1f8b1f91e82d /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parentb3ab80c1190d8be65aa3727e0a1f77cfd2e6a1dd (diff)
parent846d54f16c1048c794235fc84b05c23e72083ef6 (diff)
downloadrust-0a2681cc493f929a0fe66eae1c2c5e862205072c.tar.gz
rust-0a2681cc493f929a0fe66eae1c2c5e862205072c.zip
Auto merge of #113470 - compiler-errors:new-solver-structurally-resolve-pat, r=lcnr
Structurally resolve in pattern matching when peeling refs in new solver

Let me know if you want me to commit the minimized test:
```rust
fn test() {}

fn test2() {}

fn main() {
    let tests: &[(_, fn())] = &[
        ("test", test),
        ("test2", test2),
    ];

    for (a, b) in tests {
        todo!();
    }
}
```

In that test above, the match scrutinee is `<std::vec::Iter<(&'static str, fn())> as Iterator>::Item`, which we cannot peel the refs from.

We also need to structurally resolve in the loop, since structural resolve is inherently shallow. I haven't come up with a test where this matters, but I can if you care.

Also,  I removed two other calls to `resolve_vars_with_obligations` in diagnostics code that I'm pretty convinced are not useful.

r? `@lcnr`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions