]> git.lizzy.rs Git - rust.git/blob - tests/ui/lifetimes/issue-54378.rs
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / tests / ui / lifetimes / issue-54378.rs
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() {}