diff options
| author | varkor <github@varkor.com> | 2019-02-20 01:11:10 +0000 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2019-03-05 22:07:37 +0000 |
| commit | 2ce19ae3d196043281c7572290ee09f502d8384c (patch) | |
| tree | 73bb79fcb6647218abf250175577d3d1eb13cbc5 /src/librustc_codegen_ssa | |
| parent | 386e9fbda225bd04039a47caad9138983faff18c (diff) | |
| download | rust-2ce19ae3d196043281c7572290ee09f502d8384c.tar.gz rust-2ce19ae3d196043281c7572290ee09f502d8384c.zip | |
Use non_erasable_generics for codegen
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
Diffstat (limited to 'src/librustc_codegen_ssa')
| -rw-r--r-- | src/librustc_codegen_ssa/back/symbol_export.rs | 2 | ||||
| -rw-r--r-- | src/librustc_codegen_ssa/mir/operand.rs | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/librustc_codegen_ssa/back/symbol_export.rs b/src/librustc_codegen_ssa/back/symbol_export.rs index 7da28c19d24..336f41b784a 100644 --- a/src/librustc_codegen_ssa/back/symbol_export.rs +++ b/src/librustc_codegen_ssa/back/symbol_export.rs @@ -263,7 +263,7 @@ fn exported_symbols_provider_local<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def: InstanceDef::Item(def_id), substs, }) = mono_item { - if substs.types().next().is_some() { + if substs.non_erasable_generics().next().is_some() { symbols.push((ExportedSymbol::Generic(def_id, substs), SymbolExportLevel::Rust)); } diff --git a/src/librustc_codegen_ssa/mir/operand.rs b/src/librustc_codegen_ssa/mir/operand.rs index 0a6549851f4..55a1eb016e0 100644 --- a/src/librustc_codegen_ssa/mir/operand.rs +++ b/src/librustc_codegen_ssa/mir/operand.rs @@ -76,6 +76,8 @@ impl<'a, 'tcx: 'a, V: CodegenObject> OperandRef<'tcx, V> { } let val = match val.val { + ConstValue::Param(_) => bug!("encountered a ConstValue::Param in codegen"), + ConstValue::Infer(_) => bug!("encountered a ConstValue::Infer in codegen"), ConstValue::Scalar(x) => { let scalar = match layout.abi { layout::Abi::Scalar(ref x) => x, |
