mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Move more stuff to SourceBinder
This commit is contained in:
parent
a3d6ddbe69
commit
7aa627fe58
3 changed files with 70 additions and 66 deletions
|
@ -22,7 +22,7 @@ pub(crate) fn classify_name(
|
|||
match parent {
|
||||
ast::BindPat(it) => {
|
||||
let src = name.with_value(it);
|
||||
let local = hir::Local::from_source(sb.db, src)?;
|
||||
let local = sb.to_def(src)?;
|
||||
Some(NameDefinition {
|
||||
visibility: None,
|
||||
container: local.module(sb.db),
|
||||
|
@ -114,7 +114,7 @@ pub(crate) fn classify_name(
|
|||
},
|
||||
ast::TypeParam(it) => {
|
||||
let src = name.with_value(it);
|
||||
let def = hir::TypeParam::from_source(sb.db, src)?;
|
||||
let def = sb.to_def(src)?;
|
||||
Some(NameDefinition {
|
||||
visibility: None,
|
||||
container: def.module(sb.db),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue