forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#86205 - JohnTitor:full-test-for-72293, r=ol…
…i-obk Run full const-generics test for issue-72293 Closes rust-lang#72293 r? `@oli-obk`
- Loading branch information
Showing
3 changed files
with
17 additions
and
11 deletions.
There are no files selected for viewing
10 changes: 0 additions & 10 deletions
10
src/test/ui/const-generics/min_const_generics/transmute-const-param-static-reference.rs
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...smute-const-param-static-reference.stderr → ...e-const-param-static-reference.min.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/test/ui/const-generics/transmute-const-param-static-reference.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// revisions: full min | ||
//[full] check-pass | ||
|
||
#![cfg_attr(full, feature(const_generics))] | ||
#![cfg_attr(full, allow(incomplete_features))] | ||
|
||
struct Const<const P: &'static ()>; | ||
//[min]~^ ERROR `&'static ()` is forbidden as the type of a const generic parameter | ||
|
||
fn main() { | ||
const A: &'static () = unsafe { | ||
std::mem::transmute(10 as *const ()) | ||
}; | ||
|
||
let _ = Const::<{A}>; | ||
} |