blob: b194e073a911173142618eef45812bd48d204143 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#[lang = "sized"]
pub trait Sized {}
trait A<T> {
type Output;
fn test(self, a: &T) -> &Self::Output;
}
struct Foo<T> {
start: T,
end: T,
}
impl<T> A for Foo<usize> {
// { dg-error "generic item takes at least 2 type arguments but 1 were supplied" "" { target *-*-* } .-1 }
// { dg-error "unconstrained type parameter" "" { target *-*-* } .-2 }
type Output = T;
fn test(self, a: &T) -> &Self::Output {
a
}
}
|