Skip to content

Commit e97324a

Browse files
authored
Rollup merge of #154548 - jeanibarz:fix/add-test-150457, r=jieyouxu
Add regression test for TransmuteFrom ICE with min_generic_const_args Regression test for #150457. The wfcheck ICE with TransmuteFrom + min_generic_const_args was fixed by #150707 but didn't get a test. Closes #150457
2 parents 116458d + 5e69866 commit e97324a

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//! Ensure `TransmuteFrom` with `min_generic_const_args` doesn't ICE
2+
//! during well-formedness checking.
3+
//!
4+
//! Regression test for <https://github.com/rust-lang/rust/issues/150457>.
5+
6+
//@ check-pass
7+
8+
#![feature(transmutability)]
9+
#![feature(min_generic_const_args)]
10+
11+
use std::mem::{Assume, TransmuteFrom};
12+
13+
struct W<'a>(&'a ());
14+
15+
fn test<'a>()
16+
where
17+
W<'a>: TransmuteFrom<
18+
(),
19+
{
20+
Assume {
21+
alignment: const { true },
22+
lifetimes: const { true },
23+
safety: const { true },
24+
validity: true,
25+
}
26+
},
27+
>,
28+
{
29+
}
30+
31+
fn main() {}

0 commit comments

Comments
 (0)