mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Support $crate
in item and expr place.
This commit is contained in:
parent
8cd23a4fb8
commit
2ecb126f5c
14 changed files with 268 additions and 37 deletions
|
@ -132,6 +132,7 @@ impl GenericParams {
|
|||
fn fill_params(&mut self, params: ast::TypeParamList, start: u32) {
|
||||
for (idx, type_param) in params.type_params().enumerate() {
|
||||
let name = type_param.name().map_or_else(Name::missing, |it| it.as_name());
|
||||
// FIXME: Use `Path::from_src`
|
||||
let default = type_param.default_type().and_then(|t| t.path()).and_then(Path::from_ast);
|
||||
|
||||
let param = GenericParam { idx: idx as u32 + start, name: name.clone(), default };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue