about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-08-22 22:04:49 +0000
committerbors <bors@rust-lang.org>2023-08-22 22:04:49 +0000
commitc469197b19d53a6c45378568f73c00986b20a5a5 (patch)
tree136c098ba9ba7476e2e3d69ca03701009365945f /compiler/rustc_parse/src/errors.rs
parent154ae32a554a457a8e712ac85ba2199755646e79 (diff)
parentacd3542b8d4cf9b4bc1cf6c99f76bb2fb938fe20 (diff)
downloadrust-c469197b19d53a6c45378568f73c00986b20a5a5.tar.gz
rust-c469197b19d53a6c45378568f73c00986b20a5a5.zip
Auto merge of #115005 - compiler-errors:passes, r=cjgillot
Don't do intra-pass validation on MIR shims

Fixes #114375

In the test that was committed, we end up generating the drop shim for `struct Foo` that looks like:

```
fn std::ptr::drop_in_place(_1: *mut Foo) -> () {
    let mut _0: ();

    bb0: {
        goto -> bb5;
    }

    bb1: {
        return;
    }

    bb2 (cleanup): {
        resume;
    }

    bb3: {
        goto -> bb1;
    }

    bb4 (cleanup): {
        drop(((*_1).0: foo::WrapperWithDrop<()>)) -> [return: bb2, unwind terminate];
    }

    bb5: {
        drop(((*_1).0: foo::WrapperWithDrop<()>)) -> [return: bb3, unwind: bb2];
    }
}
```

In `bb4` and `bb5`, we assert that `(*_1).0` has type `WrapperWithDrop<()>`. However, In a user-facing param env, the type is actually `WrapperWithDrop<Tait>`. These types are not equal in a user-facing param-env (and can't be made equal even if we use `DefiningAnchor::Bubble`, since it's a non-local TAIT).
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
0 files changed, 0 insertions, 0 deletions