about summary refs log tree commit diff
path: root/tests/ui/typeck/issue-13853-5.rs
blob: 47596aa49279851f4e03d7ebddf20599fb91edf2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
trait Deserializer<'a> {}

trait Deserializable {
    fn deserialize_token<'a, D: Deserializer<'a>>(_: D, _: &'a str) -> Self;
}

impl<'a, T: Deserializable> Deserializable for &'a str {
    //~^ ERROR type parameter `T` is not constrained
    fn deserialize_token<D: Deserializer<'a>>(_x: D, _y: &'a str) -> &'a str {
        //~^ ERROR mismatched types
        //~| ERROR do not match the trait declaration
    }
}

fn main() {}