Rollup merge of #104657 - hi-rustin:rustin-patch-check-transmute, r=compiler-errors
Do not check transmute if has non region infer close https://github.com/rust-lang/rust/issues/104609 See: https://github.com/rust-lang/rust/issues/104609#issuecomment-1320956351 r? `@compiler-errors`
This commit is contained in:
commit
9cefd9dd29
3 changed files with 24 additions and 2 deletions
10
src/test/ui/consts/issue-104609.rs
Normal file
10
src/test/ui/consts/issue-104609.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
fn foo() {
|
||||
oops;
|
||||
//~^ ERROR: cannot find value `oops` in this scope
|
||||
}
|
||||
|
||||
unsafe fn bar() {
|
||||
std::mem::transmute::<_, *mut _>(1_u8);
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
9
src/test/ui/consts/issue-104609.stderr
Normal file
9
src/test/ui/consts/issue-104609.stderr
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
error[E0425]: cannot find value `oops` in this scope
|
||||
--> $DIR/issue-104609.rs:2:5
|
||||
|
|
||||
LL | oops;
|
||||
| ^^^^ not found in this scope
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0425`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue