use opt_item_name to pattern match items with names
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
This commit is contained in:
parent
959636d531
commit
f77658b470
2 changed files with 3 additions and 3 deletions
|
@ -1995,7 +1995,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
}
|
||||
|
||||
/// Look up the name of a definition across crates. This does not look at HIR.
|
||||
fn opt_item_name(self, def_id: DefId) -> Option<Symbol> {
|
||||
pub fn opt_item_name(self, def_id: DefId) -> Option<Symbol> {
|
||||
if let Some(cnum) = def_id.as_crate_root() {
|
||||
Some(self.crate_name(cnum))
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue