diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2018-12-19 05:01:06 +0200 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-03-15 13:25:10 +0200 |
| commit | 3e1cef700753ef4802c244f7e48d59de5d4324dd (patch) | |
| tree | da8667def53ff876841db86a204823bb732bc134 /src/librustc_codegen_utils | |
| parent | ed2be6fa89428b6c0a43e41a8906d29bc78f62d0 (diff) | |
| download | rust-3e1cef700753ef4802c244f7e48d59de5d4324dd.tar.gz rust-3e1cef700753ef4802c244f7e48d59de5d4324dd.zip | |
rustc: pass Option<&Substs> and Namespace around in ty::item_path.
Diffstat (limited to 'src/librustc_codegen_utils')
| -rw-r--r-- | src/librustc_codegen_utils/symbol_names.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/librustc_codegen_utils/symbol_names.rs b/src/librustc_codegen_utils/symbol_names.rs index 6bd9b159775..a7771f3da18 100644 --- a/src/librustc_codegen_utils/symbol_names.rs +++ b/src/librustc_codegen_utils/symbol_names.rs @@ -87,6 +87,7 @@ //! virtually impossible. Thus, symbol hash generation exclusively relies on //! DefPaths which are much more robust in the face of changes to the code base. +use rustc::hir::def::Namespace; use rustc::hir::def_id::{CrateNum, DefId, LOCAL_CRATE}; use rustc::hir::Node; use rustc::hir::CodegenFnAttrFlags; @@ -225,7 +226,9 @@ fn get_symbol_hash<'a, 'tcx>( fn def_symbol_name<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> ty::SymbolName { item_path::with_forced_absolute_paths(|| { - PrintCx::new(tcx, SymbolPathPrinter).print_item_path(def_id).into_interned() + PrintCx::new(tcx, SymbolPathPrinter) + .print_item_path(def_id, None, Namespace::ValueNS) + .into_interned() }) } |
