Use path.def_id()
in Type::inner_def_id()
This commit is contained in:
parent
47266bacf1
commit
db4a06e9bd
1 changed files with 1 additions and 1 deletions
|
@ -1522,7 +1522,7 @@ impl Type {
|
||||||
|
|
||||||
fn inner_def_id(&self, cache: Option<&Cache>) -> Option<DefId> {
|
fn inner_def_id(&self, cache: Option<&Cache>) -> Option<DefId> {
|
||||||
let t: PrimitiveType = match *self {
|
let t: PrimitiveType = match *self {
|
||||||
ResolvedPath { did, .. } => return Some(did),
|
ResolvedPath { ref path, did: _ } => return Some(path.def_id()),
|
||||||
DynTrait(ref bounds, _) => return Some(bounds[0].trait_.def_id()),
|
DynTrait(ref bounds, _) => return Some(bounds[0].trait_.def_id()),
|
||||||
Primitive(p) => return cache.and_then(|c| c.primitive_locations.get(&p).cloned()),
|
Primitive(p) => return cache.and_then(|c| c.primitive_locations.get(&p).cloned()),
|
||||||
BorrowedRef { type_: box Generic(..), .. } => PrimitiveType::Reference,
|
BorrowedRef { type_: box Generic(..), .. } => PrimitiveType::Reference,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue