Rustup to rustc 1.46.0-nightly (7750c3d46 2020-06-26)

This commit is contained in:
bjorn3 2020-06-27 11:29:39 +02:00
parent 58ffc47bbf
commit 48d4bc2fb6
7 changed files with 17 additions and 7 deletions

View File

@ -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"

View File

@ -388,6 +388,7 @@ pub enum Option<T> {
#[lang = "fn_once"]
#[rustc_paren_sugar]
pub trait FnOnce<Args> {
#[lang = "fn_once_output"]
type Output;
extern "rust-call" fn call_once(self, args: Args) -> Self::Output;

View File

@ -1 +1 @@
nightly-2020-06-23
nightly-2020-06-27

View File

@ -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

View File

@ -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;

View File

@ -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))

View File

@ -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);