blob: 7b72c4eff03d518f4195ba486cde354c15fb4e04 [file]
// Regression test for https://github.com/rust-lang/rust/issues/67991
// The weird indentation is to exercise the span context that shows the enclosing items in the
// diagnostics being emitted.
trait Trait<
T = (),
K = Self,
> {
fn foo()
-> T;
fn bar()
-> K;
}
struct S;
impl Trait for S {
fn foo() -> u32 { 0 } //~ ERROR
fn bar() -> u32 { 0 } //~ ERROR
}
impl Trait<i32> for () {
fn foo() -> u32 { 0 } //~ ERROR
fn bar() -> u32 { 0 } //~ ERROR
}
fn main() {}