]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #63810 - oli-obk:const_offset_from, r=RalfJung,nikic
authorbors <bors@rust-lang.org>
Sat, 2 Nov 2019 22:26:54 +0000 (22:26 +0000)
committerbors <bors@rust-lang.org>
Sat, 2 Nov 2019 22:26:54 +0000 (22:26 +0000)
Make <*const/mut T>::offset_from `const fn`

This reenables offset_of cc @mjbshaw  after https://github.com/rust-lang/rust/pull/63075 broke it

1  2 
src/libcore/intrinsics.rs
src/libcore/ptr/mod.rs
src/librustc_codegen_llvm/intrinsic.rs
src/librustc_mir/interpret/intrinsics.rs
src/librustc_mir/transform/qualify_consts.rs
src/librustc_typeck/check/intrinsic.rs

Simple merge
Simple merge
index 3df8d4c26903bd43e859632e2c53a334b69689aa,6c0728d7a07a62b65a446a49965b3fdaf7d69a6e..97bd57a7ded06aa0e4abdada6f580e3ac2131fa2
@@@ -19,10 -19,11 +19,11 @@@ use rustc::mir::interpret::GlobalId
  use rustc_codegen_ssa::common::{IntPredicate, TypeKind};
  use rustc::hir;
  use syntax::ast::{self, FloatTy};
+ use rustc_target::abi::HasDataLayout;
  
 +use rustc_codegen_ssa::common::span_invalid_monomorphization_error;
  use rustc_codegen_ssa::traits::*;
  
 -use rustc::session::Session;
  use syntax_pos::Span;
  
  use std::cmp::Ordering;
index 519f4f0322228e9474d7c45f674eaec7e09c7496,e3d3ff70c4e8a86f67952795f977c28d5f9c6fc1..c08e4c896094b6f99e00cc99e4fcff33d7fc0e09
@@@ -13,10 -12,9 +13,10 @@@ use rustc::mir::BinOp
  use rustc::mir::interpret::{InterpResult, Scalar, GlobalId, ConstValue};
  
  use super::{
-     Machine, PlaceTy, OpTy, InterpCx,
+     Machine, PlaceTy, OpTy, InterpCx, ImmTy,
  };
  
 +mod caller_location;
  mod type_name;
  
  fn numeric_intrinsic<'tcx, Tag>(