mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 04:04:06 +00:00
19 lines
373 B
Rust
19 lines
373 B
Rust
// Regression test for #80468.
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
pub trait Trait {}
|
|
|
|
#[repr(transparent)]
|
|
pub struct Wrapper<T: Trait>(T);
|
|
|
|
#[repr(transparent)]
|
|
pub struct Ref<'a>(&'a u8);
|
|
|
|
impl Trait for Ref {} //~ ERROR: implicit elided lifetime not allowed here
|
|
|
|
extern "C" {
|
|
pub fn repro(_: Wrapper<Ref>);
|
|
//~^ ERROR the trait bound `Ref<'_>: Trait` is not satisfied
|
|
}
|