Add two more tests

This commit is contained in:
Florian Diebold 2022-06-23 14:49:05 +02:00
parent 29f01cd9d2
commit f410fdf6e3

View file

@ -1429,6 +1429,43 @@ fn f() {
"#,
);
}
#[test]
fn method_call_defaulted() {
check(
r#"
trait Twait {
fn a(&self) {}
//^
}
struct Stwuct;
impl Twait for Stwuct {
}
fn f() {
let s = Stwuct;
s.a$0();
}
"#,
);
}
#[test]
fn method_call_on_generic() {
check(
r#"
trait Twait {
fn a(&self) {}
//^
}
fn f<T: Twait>(s: T) {
s.a$0();
}
"#,
);
}
}
#[test]