Rustup to rustc 1.37.0-nightly (de02101e6
2019-06-22)
This commit is contained in:
parent
2b61f90c71
commit
dd15051f5a
@ -1,6 +1,6 @@
|
||||
From 0c7406a33e3a40427760e6955188be193fd568a8 Mon Sep 17 00:00:00 2001
|
||||
From 9e8b8114de61ecdbf39f7582d7a3280ef2bfd339 Mon Sep 17 00:00:00 2001
|
||||
From: bjorn3 <bjorn3@users.noreply.github.com>
|
||||
Date: Fri, 1 Mar 2019 18:36:22 +0100
|
||||
Date: Sun, 23 Jun 2019 10:37:53 +0200
|
||||
Subject: [PATCH] Don't use OS TLS
|
||||
|
||||
---
|
||||
@ -9,13 +9,13 @@ Subject: [PATCH] Don't use OS TLS
|
||||
2 files changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs
|
||||
index d1f5373..ce83b3b 100644
|
||||
index 9b355aa..a074aa5 100644
|
||||
--- a/src/libstd/thread/local.rs
|
||||
+++ b/src/libstd/thread/local.rs
|
||||
@@ -164,10 +164,10 @@ macro_rules! __thread_local_inner {
|
||||
&'static $crate::cell::UnsafeCell<
|
||||
$crate::option::Option<$t>>>
|
||||
{
|
||||
@@ -154,10 +154,10 @@ macro_rules! __thread_local_inner {
|
||||
fn __init() -> $t { $init }
|
||||
|
||||
unsafe fn __getit() -> $crate::option::Option<&'static $t> {
|
||||
- #[cfg(all(target_arch = "wasm32", not(target_feature = "atomics")))]
|
||||
static __KEY: $crate::thread::__StaticLocalKeyInner<$t> =
|
||||
$crate::thread::__StaticLocalKeyInner::new();
|
||||
@ -24,24 +24,24 @@ index d1f5373..ce83b3b 100644
|
||||
#[thread_local]
|
||||
#[cfg(all(
|
||||
target_thread_local,
|
||||
@@ -182,6 +182,7 @@ macro_rules! __thread_local_inner {
|
||||
@@ -172,6 +172,7 @@ macro_rules! __thread_local_inner {
|
||||
))]
|
||||
static __KEY: $crate::thread::__OsLocalKeyInner<$t> =
|
||||
$crate::thread::__OsLocalKeyInner::new();
|
||||
+ */
|
||||
|
||||
__KEY.get()
|
||||
__KEY.get(__init)
|
||||
}
|
||||
@@ -308,7 +309,6 @@ impl<T: 'static> LocalKey<T> {
|
||||
@@ -320,7 +321,6 @@ mod lazy {
|
||||
/// On some platforms like wasm32 there's no threads, so no need to generate
|
||||
/// thread locals and we can instead just use plain statics!
|
||||
#[doc(hidden)]
|
||||
-#[cfg(all(target_arch = "wasm32", not(target_feature = "atomics")))]
|
||||
pub mod statik {
|
||||
use crate::cell::UnsafeCell;
|
||||
use super::lazy::LazyKeyInner;
|
||||
use crate::fmt;
|
||||
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
|
||||
index 08f0aa2..eff3126 100644
|
||||
index 35de4f4..f142646 100644
|
||||
--- a/src/libstd/thread/mod.rs
|
||||
+++ b/src/libstd/thread/mod.rs
|
||||
@@ -195,7 +195,6 @@ pub use self::local::{LocalKey, AccessError};
|
||||
@ -53,4 +53,5 @@ index 08f0aa2..eff3126 100644
|
||||
#[unstable(feature = "libstd_thread_internals", issue = "0")]
|
||||
#[cfg(target_thread_local)]
|
||||
--
|
||||
2.17.2 (Apple Git-113)
|
||||
2.20.1 (Apple Git-117)
|
||||
|
||||
|
@ -267,7 +267,7 @@ fn define_all_allocs(
|
||||
let const_ = tcx.const_eval(ParamEnv::reveal_all().and(cid)).unwrap();
|
||||
|
||||
let alloc = match const_.val {
|
||||
ConstValue::ByRef(ptr, alloc) if ptr.offset.bytes() == 0 => alloc,
|
||||
ConstValue::ByRef { align: _, offset, alloc } if offset.bytes() == 0 => alloc,
|
||||
_ => bug!("static const eval returned {:#?}", const_),
|
||||
};
|
||||
|
||||
@ -396,12 +396,12 @@ fn tag_allocation<'b>(
|
||||
_: AllocId,
|
||||
alloc: Cow<'b, Allocation>,
|
||||
_: Option<MemoryKind<!>>,
|
||||
_: &(),
|
||||
_: &Memory<'mir, 'tcx, Self>,
|
||||
) -> (Cow<'b, Allocation<(), ()>>, ()) {
|
||||
(alloc, ())
|
||||
}
|
||||
|
||||
fn tag_static_base_pointer(_: AllocId, _: &()) -> Self::PointerTag {
|
||||
fn tag_static_base_pointer(_: AllocId, _: &Memory<'mir, 'tcx, Self>) -> Self::PointerTag {
|
||||
()
|
||||
}
|
||||
|
||||
|
@ -194,6 +194,7 @@ pub fn codegen_intrinsic_call<'a, 'tcx: 'a>(
|
||||
_ if intrinsic.starts_with("unchecked_") || intrinsic == "exact_div", (c x, c y) {
|
||||
// FIXME trap on overflow
|
||||
let bin_op = match intrinsic {
|
||||
"unchecked_sub" => BinOp::Sub,
|
||||
"unchecked_div" | "exact_div" => BinOp::Div,
|
||||
"unchecked_rem" => BinOp::Rem,
|
||||
"unchecked_shl" => BinOp::Shl,
|
||||
|
Loading…
Reference in New Issue
Block a user