fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
955 B29 linesraw
1warning: skipping const checks
2  --> $DIR/abi-mismatch.rs:9:5
3   |
4LL |     my_fn();
5   |     ^^^^^^^
6
7warning: skipping const checks
8  --> $DIR/abi-mismatch.rs:13:39
9   |
10LL | const VAL: () = call_rust_fn(unsafe { std::mem::transmute(c_fn as extern "C" fn()) });
11   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12
13error: any use of this value will cause an error
14  --> $DIR/abi-mismatch.rs:9:5
15   |
16LL |     my_fn();
17   |     ^^^^^^^
18   |     |
19   |     calling a function with ABI C using caller ABI Rust
20   |     inside `call_rust_fn` at $DIR/abi-mismatch.rs:9:5
21   |     inside `VAL` at $DIR/abi-mismatch.rs:13:17
22...
23LL | const VAL: () = call_rust_fn(unsafe { std::mem::transmute(c_fn as extern "C" fn()) });
24   | --------------------------------------------------------------------------------------
25   |
26   = note: `#[deny(const_err)]` on by default
27
28error: aborting due to previous error; 2 warnings emitted
29