Correctly flag 'lifetime definitions as definitions

This commit is contained in:
Aleksey Kladov 2020-02-28 16:49:46 +01:00
parent 5ebfcb9cb7
commit 56ce34c6a7
6 changed files with 47 additions and 40 deletions

View file

@ -17,9 +17,8 @@ struct Foo {
pub y: i32,
}
fn foo<T>() -> T {
unimplemented!();
foo::<i32>();
fn foo<'a, T>() -> T {
foo::<'a, i32>()
}
macro_rules! def_fn {
@ -59,7 +58,7 @@ use Option::*;
impl<T> Option<T> {
fn and<U>(self, other: Option<U>) -> Option<(T, U)> {
match other {
None => todo!(),
None => unimplemented!(),
Nope => Nope,
}
}
@ -130,5 +129,5 @@ fn test_ranges() {
.highlight_range(FileRange { file_id, range: TextRange::offset_len(82.into(), 1.into()) })
.unwrap();
assert_eq!(&highlights[0].highlight.to_string(), "field");
assert_eq!(&highlights[0].highlight.to_string(), "field.declaration");
}