Preserve order of generic args
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user