Rollup merge of #97953 - JohnTitor:issue-54378, r=compiler-errors

Add regression test for #54378

Closes #54378
r? `@compiler-errors`

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
This commit is contained in:
Matthias Krüger 2022-06-10 22:32:33 +02:00 committed by GitHub
commit dd409dad85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,26 @@
// check-pass
// Regression test for #54378.
#![feature(never_type)]
use std::marker::PhantomData;
pub trait Machine<'a, 'mir, 'tcx>: Sized {
type MemoryKinds: ::std::fmt::Debug + Copy + Eq;
const MUT_STATIC_KIND: Option<Self::MemoryKinds>;
}
pub struct CompileTimeEvaluator<'a, 'mir, 'tcx: 'a+'mir> {
pub _data: PhantomData<(&'a (), &'mir (), &'tcx ())>,
}
impl<'a, 'mir, 'tcx: 'a + 'mir> Machine<'a, 'mir, 'tcx>
for CompileTimeEvaluator<'a, 'mir, 'tcx>
{
type MemoryKinds = !;
const MUT_STATIC_KIND: Option<!> = None;
}
fn main() {}