From 243b68def069fe886b91b57878cfd12a091bb653 Mon Sep 17 00:00:00 2001 From: winstxnhdw Date: Mon, 22 Jul 2024 22:51:09 +0100 Subject: [PATCH] feat: add arm for `use` type bound --- .../crates/parser/src/grammar/generic_params.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tools/rust-analyzer/crates/parser/src/grammar/generic_params.rs b/src/tools/rust-analyzer/crates/parser/src/grammar/generic_params.rs index 6c05abc02387..b653d8e060cd 100644 --- a/src/tools/rust-analyzer/crates/parser/src/grammar/generic_params.rs +++ b/src/tools/rust-analyzer/crates/parser/src/grammar/generic_params.rs @@ -167,6 +167,12 @@ fn type_bound(p: &mut Parser<'_>) -> bool { T![async] => { p.bump_any(); } + // test precise_capturing + // fn captures<'a: 'a, 'b: 'b, T>() -> impl Sized + use<'b, T> {} + T![use] => { + p.bump_any(); + generic_param_list(p); + } _ => (), } if paths::is_use_path_start(p) {