Skip to content

Commit dd409da

Browse files
authored
Rollup merge of rust-lang#97953 - JohnTitor:issue-54378, r=compiler-errors
Add regression test for rust-lang#54378 Closes rust-lang#54378 r? `@compiler-errors` Signed-off-by: Yuki Okushi <[email protected]>
2 parents 4ea862f + 60ccd11 commit dd409da

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

src/test/ui/lifetimes/issue-54378.rs

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// check-pass
2+
3+
// Regression test for #54378.
4+
5+
#![feature(never_type)]
6+
7+
use std::marker::PhantomData;
8+
9+
pub trait Machine<'a, 'mir, 'tcx>: Sized {
10+
type MemoryKinds: ::std::fmt::Debug + Copy + Eq;
11+
const MUT_STATIC_KIND: Option<Self::MemoryKinds>;
12+
}
13+
14+
pub struct CompileTimeEvaluator<'a, 'mir, 'tcx: 'a+'mir> {
15+
pub _data: PhantomData<(&'a (), &'mir (), &'tcx ())>,
16+
}
17+
18+
impl<'a, 'mir, 'tcx: 'a + 'mir> Machine<'a, 'mir, 'tcx>
19+
for CompileTimeEvaluator<'a, 'mir, 'tcx>
20+
{
21+
type MemoryKinds = !;
22+
23+
const MUT_STATIC_KIND: Option<!> = None;
24+
}
25+
26+
fn main() {}

0 commit comments

Comments
 (0)