diff --git a/build_sysroot/Cargo.lock b/build_sysroot/Cargo.lock index 3183d7660c6..d26dfd186b9 100644 --- a/build_sysroot/Cargo.lock +++ b/build_sysroot/Cargo.lock @@ -51,9 +51,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.54" +version = "1.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bbb73db36c1246e9034e307d0fba23f9a2e251faa47ade70c1bd252220c8311" +checksum = "b1be3409f94d7bdceeb5f5fac551039d9b3f00e25da7a74fc4d33400a0d96368" [[package]] name = "cfg-if" diff --git a/example/mini_core.rs b/example/mini_core.rs index ccca19ccf8c..bc5610855ae 100644 --- a/example/mini_core.rs +++ b/example/mini_core.rs @@ -388,6 +388,7 @@ pub enum Option { #[lang = "fn_once"] #[rustc_paren_sugar] pub trait FnOnce { + #[lang = "fn_once_output"] type Output; extern "rust-call" fn call_once(self, args: Args) -> Self::Output; diff --git a/rust-toolchain b/rust-toolchain index 3996824011c..87ae49d6620 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2020-06-23 +nightly-2020-06-27 diff --git a/src/abi/mod.rs b/src/abi/mod.rs index 4bf06a7490a..a70314758d0 100644 --- a/src/abi/mod.rs +++ b/src/abi/mod.rs @@ -377,9 +377,8 @@ enum ArgKind<'tcx> { let local_decl = &fx.mir.local_decls[local]; // v this ! is important let internally_mutable = !val.layout().ty.is_freeze( - fx.tcx, + fx.tcx.at(local_decl.source_info.span), ParamEnv::reveal_all(), - local_decl.source_info.span, ); if local_decl.mutability == mir::Mutability::Not && !internally_mutable { // We wont mutate this argument, so it is fine to borrow the backing storage diff --git a/src/base.rs b/src/base.rs index a205a0525fb..8d2087b3528 100644 --- a/src/base.rs +++ b/src/base.rs @@ -219,7 +219,7 @@ fn codegen_fn_content(fx: &mut FunctionCx<'_, '_, impl Backend>) { cleanup: _, } => { if !fx.tcx.sess.overflow_checks() { - if let mir::AssertKind::OverflowNeg = *msg { + if let mir::AssertKind::OverflowNeg(_) = *msg { let target = fx.get_block(*target); fx.bcx.ins().jump(target, &[]); continue; diff --git a/src/constant.rs b/src/constant.rs index cb797b3a5fe..d4ec9b68ff3 100644 --- a/src/constant.rs +++ b/src/constant.rs @@ -219,7 +219,7 @@ fn data_id_for_static( let is_mutable = if tcx.is_mutable_static(def_id) { true } else { - !ty.is_freeze(tcx, ParamEnv::reveal_all(), DUMMY_SP) + !ty.is_freeze(tcx.at(DUMMY_SP), ParamEnv::reveal_all()) }; let align = tcx .layout_of(ParamEnv::reveal_all().and(ty)) diff --git a/src/intrinsics/mod.rs b/src/intrinsics/mod.rs index 32447b7a925..c74ed2d3061 100644 --- a/src/intrinsics/mod.rs +++ b/src/intrinsics/mod.rs @@ -816,6 +816,16 @@ fn swap(bcx: &mut FunctionBuilder<'_>, v: Value) -> Value { ret.write_cvalue(fx, val); }; + ptr_guaranteed_eq, (c a, c b) { + let val = crate::num::trans_ptr_binop(fx, BinOp::Eq, a, b); + ret.write_cvalue(fx, val); + }; + + ptr_guaranteed_ne, (c a, c b) { + let val = crate::num::trans_ptr_binop(fx, BinOp::Ne, a, b); + ret.write_cvalue(fx, val); + }; + caller_location, () { let caller_location = fx.get_caller_location(span); ret.write_cvalue(fx, caller_location);