Skip to content

Commit

Permalink
yet another ui test
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Markeffsky committed Feb 5, 2023
1 parent 9d11084 commit e2a1a2a
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions tests/ui/mir/issue-107691.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// build-pass
// compile-flags: -C opt-level=3

#![crate_type = "lib"]

pub trait Archive {
type Archived;
type Resolver;

fn resolve(resolver: Self::Resolver, out: *mut Self::Archived);
}

pub type Archived<T> = <T as Archive>::Archived;
pub type Resolver<T> = <T as Archive>::Resolver;

pub struct Record<'a> {
_payload: &'a [u8],
}

pub struct ArchivedRecord<'a>
where
&'a [u8]: Archive,
{
_payload: Archived<&'a [u8]>,
}

pub struct RecordResolver<'a>
where
&'a [u8]: Archive,
{
_payload: Resolver<&'a [u8]>,
}

impl<'a> Archive for Record<'a>
where
&'a [u8]: Archive,
{
type Archived = ArchivedRecord<'a>;
type Resolver = RecordResolver<'a>;

fn resolve(_resolver: Self::Resolver, _out: *mut Self::Archived) {}
}

0 comments on commit e2a1a2a

Please sign in to comment.