mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Preserve order of generic args
This commit is contained in:
parent
9d473a0b9f
commit
4fa8749c44
39 changed files with 714 additions and 427 deletions
|
@ -282,7 +282,7 @@ impl SourceToDefCtx<'_, '_> {
|
|||
pub(super) fn type_param_to_def(&mut self, src: InFile<ast::TypeParam>) -> Option<TypeParamId> {
|
||||
let container: ChildContainer = self.find_generic_param_container(src.syntax())?.into();
|
||||
let dyn_map = self.cache_for(container, src.file_id);
|
||||
dyn_map[keys::TYPE_PARAM].get(&src.value).copied()
|
||||
dyn_map[keys::TYPE_PARAM].get(&src.value).copied().map(|x| x.into())
|
||||
}
|
||||
|
||||
pub(super) fn lifetime_param_to_def(
|
||||
|
@ -300,7 +300,7 @@ impl SourceToDefCtx<'_, '_> {
|
|||
) -> Option<ConstParamId> {
|
||||
let container: ChildContainer = self.find_generic_param_container(src.syntax())?.into();
|
||||
let dyn_map = self.cache_for(container, src.file_id);
|
||||
dyn_map[keys::CONST_PARAM].get(&src.value).copied()
|
||||
dyn_map[keys::CONST_PARAM].get(&src.value).copied().map(|x| x.into())
|
||||
}
|
||||
|
||||
pub(super) fn generic_param_to_def(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue