Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0c96061

Browse files
committedJun 11, 2024
Auto merge of #126274 - jieyouxu:rollup-uj93sfm, r=jieyouxu
Rollup of 5 pull requests Successful merges: - #126186 (Migrate `run-make/multiple-emits` to `rmake.rs`) - #126236 (Delegation: fix ICE on recursive delegation) - #126254 (Remove ignore-cross-compile directive from ui/macros/proc_macro) - #126258 (Do not define opaque types when selecting impls) - #126265 (interpret: ensure we check bool/char for validity when they are used in a cast) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 20ba13c + cfd48bd commit 0c96061

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+377
-120
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const fn bool_cast(ptr: *const bool) { unsafe {
2+
let _val = *ptr as u32; //~ERROR: evaluation of constant value failed
3+
//~^ interpreting an invalid 8-bit value as a bool
4+
}}
5+
6+
const _: () = {
7+
let v = 3_u8;
8+
bool_cast(&v as *const u8 as *const bool);
9+
};
10+
11+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
error[E0080]: evaluation of constant value failed
2+
--> $DIR/ub-invalid-values.rs:2:16
3+
|
4+
LL | let _val = *ptr as u32;
5+
| ^^^^^^^^^^^ interpreting an invalid 8-bit value as a bool: 0x03
6+
|
7+
note: inside `bool_cast`
8+
--> $DIR/ub-invalid-values.rs:2:16
9+
|
10+
LL | let _val = *ptr as u32;
11+
| ^^^^^^^^^^^
12+
note: inside `_`
13+
--> $DIR/ub-invalid-values.rs:8:5
14+
|
15+
LL | bool_cast(&v as *const u8 as *const bool);
16+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17+
18+
error: aborting due to 1 previous error
19+
20+
For more information about this error, try `rustc --explain E0080`.
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#![feature(fn_delegation)]
2+
#![allow(incomplete_features)]
3+
4+
trait Trait {
5+
reuse Trait::foo { &self.0 }
6+
//~^ ERROR recursive delegation is not supported yet
7+
}
8+
9+
reuse foo;
10+
//~^ ERROR recursive delegation is not supported yet
11+
12+
fn main() {}
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.