mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
fix lifetime length are not added in count of params in highlight
This commit is contained in:
parent
4b33850c39
commit
20b12c2bac
2 changed files with 21 additions and 2 deletions
|
@ -1229,3 +1229,20 @@ fn benchmark_syntax_highlighting_parser() {
|
|||
};
|
||||
assert_eq!(hash, 1169);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn highlight_trait_with_lifetimes_regression_16958() {
|
||||
let (analysis, file_id) = fixture::file(
|
||||
r#"
|
||||
pub trait Deserialize<'de> {
|
||||
fn deserialize();
|
||||
}
|
||||
|
||||
fn f<'de, T: Deserialize<'de>>() {
|
||||
T::deserialize();
|
||||
}
|
||||
"#
|
||||
.trim(),
|
||||
);
|
||||
let _ = analysis.highlight(HL_CONFIG, file_id).unwrap();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue