mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 01:17:27 +00:00
Add two more tests
This commit is contained in:
parent
29f01cd9d2
commit
f410fdf6e3
1 changed files with 37 additions and 0 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue