Skip to content

Commit d7e0f43

Browse files
committed
Run full const-generics test for issue-72293
1 parent c622840 commit d7e0f43

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

Diff for: src/test/ui/const-generics/min_const_generics/transmute-const-param-static-reference.rs

-10
This file was deleted.

Diff for: src/test/ui/const-generics/min_const_generics/transmute-const-param-static-reference.stderr renamed to src/test/ui/const-generics/transmute-const-param-static-reference.min.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: `&'static ()` is forbidden as the type of a const generic parameter
2-
--> $DIR/transmute-const-param-static-reference.rs:1:23
2+
--> $DIR/transmute-const-param-static-reference.rs:7:23
33
|
44
LL | struct Const<const P: &'static ()>;
55
| ^^^^^^^^^^^
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// revisions: full min
2+
//[full] check-pass
3+
4+
#![cfg_attr(full, feature(const_generics))]
5+
#![cfg_attr(full, allow(incomplete_features))]
6+
7+
struct Const<const P: &'static ()>;
8+
//[min]~^ ERROR `&'static ()` is forbidden as the type of a const generic parameter
9+
10+
fn main() {
11+
const A: &'static () = unsafe {
12+
std::mem::transmute(10 as *const ())
13+
};
14+
15+
let _ = Const::<{A}>;
16+
}

0 commit comments

Comments
 (0)