about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-04-22 12:18:31 +0200
committerGitHub <noreply@github.com>2020-04-22 12:18:31 +0200
commit707004c55228d155646014f705f6f77d3887fb29 (patch)
tree0d39681d120bba1c723ac593ae9771edf0ee8ecc /src/librustc_codegen_llvm
parent2dc5b602eee35d70e8e6e506a7ea07b6c7e0197d (diff)
parent289f46a7f5d02e27b2948eee6879f83427d0199f (diff)
Rollup merge of #70970 - eddyb:trait-vs-impl-mismatch, r=oli-obk
Detect mistyped associated consts in `Instance::resolve`.

*Based on #71049 to prevent redundant/misleading downstream errors.*

Fixes #70942 by refusing to resolve an associated `const` if it doesn't have the same type in the `impl` that it does in the `trait` (which we assume had errored, and `delay_span_bug` guards against bugs).
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/context.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustc_codegen_llvm/context.rs b/src/librustc_codegen_llvm/context.rs
index daa723495f6..d385c073074 100644
--- a/src/librustc_codegen_llvm/context.rs
+++ b/src/librustc_codegen_llvm/context.rs
@@ -376,6 +376,7 @@ impl MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> {
                     def_id,
                     tcx.intern_substs(&[]),
                 )
+                .unwrap()
                 .unwrap(),
             ),
             _ => {