diff options
| author | iancormac84 <wilnathan@gmail.com> | 2018-05-08 19:57:45 -0400 |
|---|---|---|
| committer | iancormac84 <wilnathan@gmail.com> | 2018-05-17 16:41:33 -0400 |
| commit | b79edf008f3191e28d96ed98c77fa25533c650d7 (patch) | |
| tree | 8c01d9af81edd3d8c99d7625058da85303d7409a /src/librustc_codegen_utils | |
| parent | 6131c0a98c8dc4739e7985940474f6ae5f0941c3 (diff) | |
| download | rust-b79edf008f3191e28d96ed98c77fa25533c650d7.tar.gz rust-b79edf008f3191e28d96ed98c77fa25533c650d7.zip | |
Added extra hashing step.
Diffstat (limited to 'src/librustc_codegen_utils')
| -rw-r--r-- | src/librustc_codegen_utils/symbol_names.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/librustc_codegen_utils/symbol_names.rs b/src/librustc_codegen_utils/symbol_names.rs index 8ddefdf474f..2063db6dc53 100644 --- a/src/librustc_codegen_utils/symbol_names.rs +++ b/src/librustc_codegen_utils/symbol_names.rs @@ -168,6 +168,13 @@ fn get_symbol_hash<'a, 'tcx>( }); }); + // If this is a function, we hash the signature as well. + // This is not *strictly* needed, but it may help in some + // situations, see the `run-make/a-b-a-linker-guard` test. + if let ty::TyFnDef(..) = item_type.sty { + item_type.fn_sig(tcx).hash_stable(&mut hcx, &mut hasher); + } + // also include any type parameters (for generic items) assert!(!substs.has_erasable_regions()); assert!(!substs.needs_subst()); |
