Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/hover/tests.rs')
| -rw-r--r-- | crates/ide/src/hover/tests.rs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs index ab73590734..e08a95659e 100644 --- a/crates/ide/src/hover/tests.rs +++ b/crates/ide/src/hover/tests.rs @@ -10762,3 +10762,35 @@ fn bar(v: &Foo<i32>) { "#]], ); } + +#[test] +fn extra_lifetime_param_on_trait_method_subst() { + check( + r#" +struct AudioFormat; + +trait ValueEnum { + fn to_possible_value(&self); +} + +impl ValueEnum for AudioFormat { + fn to_possible_value<'a>(&'a self) {} +} + +fn main() { + ValueEnum::to_possible_value$0(&AudioFormat); +} + "#, + expect![[r#" + *to_possible_value* + + ```rust + ra_test_fixture::AudioFormat + ``` + + ```rust + fn to_possible_value<'a>(&'a self) + ``` + "#]], + ); +} |