diff options
| author | bors <bors@rust-lang.org> | 2019-11-14 04:54:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-11-14 04:54:51 +0000 |
| commit | 5e380b797b22e5361a43b2b82f6278df17d89f3e (patch) | |
| tree | 5e82cf482962b2daffe6bfaf7f05d7e38f458e20 /src/librustc_codegen_llvm | |
| parent | 3f07f1cd78432c9901788de2feafc0c2331edee3 (diff) | |
| parent | 552fa6479846951e242df412a08c86212beb1d0f (diff) | |
| download | rust-5e380b797b22e5361a43b2b82f6278df17d89f3e.tar.gz rust-5e380b797b22e5361a43b2b82f6278df17d89f3e.zip | |
Auto merge of #66233 - cjgillot:constkind, r=oli-obk
Split ConstValue into two enums Hello, Issue #59210 appeared abandoned, so I gave it a go. Some further cleanup and refactoring may be mandated. I did not test beyond `x.py check`, since my home computer dies compiling librustc. Fixes #59210
Diffstat (limited to 'src/librustc_codegen_llvm')
| -rw-r--r-- | src/librustc_codegen_llvm/consts.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_codegen_llvm/consts.rs b/src/librustc_codegen_llvm/consts.rs index fd7054a5a0a..bcf0154e3f8 100644 --- a/src/librustc_codegen_llvm/consts.rs +++ b/src/librustc_codegen_llvm/consts.rs @@ -88,9 +88,9 @@ pub fn codegen_static_initializer( let static_ = cx.tcx.const_eval(param_env.and(cid))?; let alloc = match static_.val { - ConstValue::ByRef { + ty::ConstKind::Value(ConstValue::ByRef { alloc, offset, - } if offset.bytes() == 0 => { + }) if offset.bytes() == 0 => { alloc }, _ => bug!("static const eval returned {:#?}", static_), |
