Skip to content

Commit

Permalink
Add regression test for #54378
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
  • Loading branch information
JohnTitor committed Jun 10, 2022
1 parent ec55c61 commit 60ccd11
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/test/ui/lifetimes/issue-54378.rs
Original file line number Diff line number Diff line change
@@ -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() {}

0 comments on commit 60ccd11

Please sign in to comment.