Rustup to rustc 1.46.0-nightly (5c9e5df3a 2020-07-16)

This commit is contained in:
bjorn3 2020-07-17 19:15:33 +02:00
parent 9e76c3e886
commit 34823a7e4c
9 changed files with 23 additions and 23 deletions

View File

@ -1,22 +1,22 @@
From 7496bb94a2fb2bc34629c9781c3bc3a470becaee Mon Sep 17 00:00:00 2001
From: bjorn3 <bjorn3@users.noreply.github.com>
Date: Fri, 10 Apr 2020 13:47:42 +0200
Subject: [PATCH] Remove usage of extern_weak in fast_thread_local
Subject: [PATCH] Remove usage of extern_weak in thread_local_dtor
---
src/libstd/sys/unix/fast_thread_local.rs | 20 --------------------
src/libstd/sys/unix/thread_local_dtor.rs | 20 --------------------
1 files changed, 0 insertions(+), 20 deletions(-)
diff --git a/src/libstd/sys/unix/fast_thread_local.rs b/src/libstd/sys/unix/fast_thread_local.rs
diff --git a/src/libstd/sys/unix/thread_local_dtor.rs b/src/libstd/sys/unix/thread_local_dtor.rs
index 8730b4d..8d6e3d5 100644
--- a/src/libstd/sys/unix/fast_thread_local.rs
+++ b/src/libstd/sys/unix/fast_thread_local.rs
--- a/src/libstd/sys/unix/thread_local_dtor.rs
+++ b/src/libstd/sys/unix/thread_local_dtor.rs
@@ -15,28 +15,8 @@
target_os = "emscripten"
))]
pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) {
- use crate::mem;
use crate::sys_common::thread_local::register_dtor_fallback;
use crate::sys_common::thread_local_dtor::register_dtor_fallback;
- extern "C" {
- #[linkage = "extern_weak"]

View File

@ -1 +1 @@
nightly-2020-07-13
nightly-2020-07-17

View File

@ -195,7 +195,7 @@ pub(crate) fn get_function_name_and_sig<'tcx>(
tcx.sess.span_fatal(tcx.def_span(inst.def_id()), "Variadic function definitions are not yet supported");
}
let sig = clif_sig_from_fn_sig(tcx, triple, fn_sig, tcx.def_span(inst.def_id()), false, inst.def.requires_caller_location(tcx));
(tcx.symbol_name(inst).name.as_str().to_string(), sig)
(tcx.symbol_name(inst).name.to_string(), sig)
}
/// Instance must be monomorphized
@ -465,10 +465,10 @@ pub(crate) fn codegen_terminator_call<'tcx>(
.unwrap()
.unwrap();
if fx.tcx.symbol_name(instance).name.as_str().starts_with("llvm.") {
if fx.tcx.symbol_name(instance).name.starts_with("llvm.") {
crate::intrinsics::codegen_llvm_intrinsic_call(
fx,
&fx.tcx.symbol_name(instance).name.as_str(),
&fx.tcx.symbol_name(instance).name,
substs,
args,
destination,

View File

@ -266,7 +266,7 @@ fn codegen_fn_content(fx: &mut FunctionCx<'_, '_, impl Backend>) {
});
let instance = Instance::mono(fx.tcx, def_id);
let symbol_name = fx.tcx.symbol_name(instance).name.as_str();
let symbol_name = fx.tcx.symbol_name(instance).name;
fx.lib_call(&*symbol_name, vec![fx.pointer_type, fx.pointer_type, fx.pointer_type], vec![], &args);
@ -719,10 +719,10 @@ fn trans_stmt<'tcx>(
crate::trap::trap_unimplemented(fx, "_xgetbv arch intrinsic is not supported");
}
// ___chkstk, ___chkstk_ms and __alloca are only used on Windows
_ if fx.tcx.symbol_name(fx.instance).name.as_str().starts_with("___chkstk") => {
_ if fx.tcx.symbol_name(fx.instance).name.starts_with("___chkstk") => {
crate::trap::trap_unimplemented(fx, "Stack probes are not supported");
}
_ if fx.tcx.symbol_name(fx.instance).name.as_str() == "__alloca" => {
_ if fx.tcx.symbol_name(fx.instance).name == "__alloca" => {
crate::trap::trap_unimplemented(fx, "Alloca is not supported");
}
// Used in sys::windows::abort_internal

View File

@ -75,18 +75,18 @@ pub(crate) fn trans_constant<'tcx>(
let const_ = fx.monomorphize(&constant.literal);
let const_val = match const_.val {
ConstKind::Value(const_val) => const_val,
ConstKind::Unevaluated(def_id, ref substs, promoted) if fx.tcx.is_static(def_id) => {
ConstKind::Unevaluated(def, ref substs, promoted) if fx.tcx.is_static(def.did) => {
assert!(substs.is_empty());
assert!(promoted.is_none());
return codegen_static_ref(
fx,
def_id,
def.did,
fx.layout_of(fx.monomorphize(&constant.literal.ty)),
).to_cvalue(fx);
}
ConstKind::Unevaluated(def_id, ref substs, promoted) => {
match fx.tcx.const_eval_resolve(ParamEnv::reveal_all(), def_id, substs, promoted, None) {
ConstKind::Unevaluated(def, ref substs, promoted) => {
match fx.tcx.const_eval_resolve(ParamEnv::reveal_all(), def, substs, promoted, None) {
Ok(const_val) => const_val,
Err(_) => {
if promoted.is_none() {
@ -229,7 +229,7 @@ fn data_id_for_static(
linkage: Linkage,
) -> DataId {
let instance = Instance::mono(tcx, def_id);
let symbol_name = tcx.symbol_name(instance).name.as_str();
let symbol_name = tcx.symbol_name(instance).name;
let ty = instance.monomorphic_ty(tcx);
let is_mutable = if tcx.is_mutable_static(def_id) {
true

View File

@ -122,7 +122,7 @@ fn module_codegen(tcx: TyCtxt<'_>, cgu_name: rustc_span::Symbol) -> ModuleCodege
if mono_items.iter().any(|(mono_item, _)| {
match mono_item {
rustc_middle::mir::mono::MonoItem::Static(def_id) => {
tcx.symbol_name(Instance::mono(tcx, *def_id)).name.as_str().contains("__rustc_proc_macro_decls_")
tcx.symbol_name(Instance::mono(tcx, *def_id)).name.contains("__rustc_proc_macro_decls_")
}
_ => false,
}

View File

@ -62,7 +62,7 @@ fn trans_mono_item<'tcx, B: Backend + 'static>(
match mono_item {
MonoItem::Fn(inst) => {
let _inst_guard =
crate::PrintOnPanic(|| format!("{:?} {}", inst, tcx.symbol_name(inst).name.as_str()));
crate::PrintOnPanic(|| format!("{:?} {}", inst, tcx.symbol_name(inst).name));
debug_assert!(!inst.substs.needs_infer());
let _mir_guard = crate::PrintOnPanic(|| {
match inst.def {

View File

@ -22,7 +22,7 @@ pub(crate) fn maybe_create_entry_wrapper(
};
let instance = Instance::mono(tcx, main_def_id);
if module.get_name(&*tcx.symbol_name(instance).name.as_str()).is_none() {
if module.get_name(&*tcx.symbol_name(instance).name).is_none() {
return;
}

View File

@ -74,7 +74,7 @@ impl CommentWriter {
pub(crate) fn new<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) -> Self {
let global_comments = if cfg!(debug_assertions) {
vec![
format!("symbol {}", tcx.symbol_name(instance).name.as_str()),
format!("symbol {}", tcx.symbol_name(instance).name),
format!("instance {:?}", instance),
format!(
"sig {:?}",
@ -220,7 +220,7 @@ pub(crate) fn write_clif_file<'tcx>(
.expect("value location ranges")
});
let symbol_name = tcx.symbol_name(instance).name.as_str();
let symbol_name = tcx.symbol_name(instance).name;
let clif_file_name = format!(
"{}/{}__{}.{}.clif",
concat!(env!("CARGO_MANIFEST_DIR"), "/target/out/clif"),