diff options
| author | bors <bors@rust-lang.org> | 2021-05-25 03:07:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-05-25 03:07:03 +0000 |
| commit | d568d63b1f9f5fc47e4202e2a2a84142ff6202d8 (patch) | |
| tree | b5e1b4ef2806451f5234cb61e6b3b2c15db3aace /src/test/ui/consts | |
| parent | 126561cb31e8ebe1e2dd9dfd0d3ca621308dc56f (diff) | |
| parent | af3d9a3aa307a1a1d2badb2be580a624a18b2858 (diff) | |
| download | rust-d568d63b1f9f5fc47e4202e2a2a84142ff6202d8.tar.gz rust-d568d63b1f9f5fc47e4202e2a2a84142ff6202d8.zip | |
Auto merge of #85273 - LeSeulArtichaut:thir-query, r=nikomatsakis
Make building THIR a stealable query This PR creates a stealable `thir_body` query so that we can build the THIR only once for THIR unsafeck and MIR build. Blocked on #83842. r? `@nikomatsakis`
Diffstat (limited to 'src/test/ui/consts')
| -rw-r--r-- | src/test/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.thir.stderr | 10 |
2 files changed, 2 insertions, 10 deletions
diff --git a/src/test/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.rs b/src/test/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.rs index 1ce78147970..031e67a1e3c 100644 --- a/src/test/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.rs +++ b/src/test/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.rs @@ -9,5 +9,5 @@ fn main() { let a: [u8; foo()]; //~^ ERROR call to unsafe function is unsafe and requires unsafe function or block foo(); - //~^ ERROR call to unsafe function is unsafe and requires unsafe function or block + //[mir]~^ ERROR call to unsafe function is unsafe and requires unsafe function or block } diff --git a/src/test/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.thir.stderr b/src/test/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.thir.stderr index b643ecc0ce8..c6077da768b 100644 --- a/src/test/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.thir.stderr +++ b/src/test/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.thir.stderr @@ -1,12 +1,4 @@ error[E0133]: call to unsafe function is unsafe and requires unsafe function or block - --> $DIR/const-extern-fn-requires-unsafe.rs:11:5 - | -LL | foo(); - | ^^^^^ call to unsafe function - | - = note: consult the function's documentation for information on how to avoid undefined behavior - -error[E0133]: call to unsafe function is unsafe and requires unsafe function or block --> $DIR/const-extern-fn-requires-unsafe.rs:9:17 | LL | let a: [u8; foo()]; @@ -14,6 +6,6 @@ LL | let a: [u8; foo()]; | = note: consult the function's documentation for information on how to avoid undefined behavior -error: aborting due to 2 previous errors +error: aborting due to previous error For more information about this error, try `rustc --explain E0133`. |
