Skip to content

Commit dd15051

Browse files
committed
Rustup to rustc 1.37.0-nightly (de02101e6 2019-06-22)
1 parent 2b61f90 commit dd15051

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

patches/0014-Don-t-use-OS-TLS.patch

+14-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
From 0c7406a33e3a40427760e6955188be193fd568a8 Mon Sep 17 00:00:00 2001
1+
From 9e8b8114de61ecdbf39f7582d7a3280ef2bfd339 Mon Sep 17 00:00:00 2001
22
From: bjorn3 <[email protected]>
3-
Date: Fri, 1 Mar 2019 18:36:22 +0100
3+
Date: Sun, 23 Jun 2019 10:37:53 +0200
44
Subject: [PATCH] Don't use OS TLS
55

66
---
@@ -9,13 +9,13 @@ Subject: [PATCH] Don't use OS TLS
99
2 files changed, 2 insertions(+), 3 deletions(-)
1010

1111
diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs
12-
index d1f5373..ce83b3b 100644
12+
index 9b355aa..a074aa5 100644
1313
--- a/src/libstd/thread/local.rs
1414
+++ b/src/libstd/thread/local.rs
15-
@@ -164,10 +164,10 @@ macro_rules! __thread_local_inner {
16-
&'static $crate::cell::UnsafeCell<
17-
$crate::option::Option<$t>>>
18-
{
15+
@@ -154,10 +154,10 @@ macro_rules! __thread_local_inner {
16+
fn __init() -> $t { $init }
17+
18+
unsafe fn __getit() -> $crate::option::Option<&'static $t> {
1919
- #[cfg(all(target_arch = "wasm32", not(target_feature = "atomics")))]
2020
static __KEY: $crate::thread::__StaticLocalKeyInner<$t> =
2121
$crate::thread::__StaticLocalKeyInner::new();
@@ -24,24 +24,24 @@ index d1f5373..ce83b3b 100644
2424
#[thread_local]
2525
#[cfg(all(
2626
target_thread_local,
27-
@@ -182,6 +182,7 @@ macro_rules! __thread_local_inner {
27+
@@ -172,6 +172,7 @@ macro_rules! __thread_local_inner {
2828
))]
2929
static __KEY: $crate::thread::__OsLocalKeyInner<$t> =
3030
$crate::thread::__OsLocalKeyInner::new();
3131
+ */
3232

33-
__KEY.get()
33+
__KEY.get(__init)
3434
}
35-
@@ -308,7 +309,6 @@ impl<T: 'static> LocalKey<T> {
35+
@@ -320,7 +321,6 @@ mod lazy {
3636
/// On some platforms like wasm32 there's no threads, so no need to generate
3737
/// thread locals and we can instead just use plain statics!
3838
#[doc(hidden)]
3939
-#[cfg(all(target_arch = "wasm32", not(target_feature = "atomics")))]
4040
pub mod statik {
41-
use crate::cell::UnsafeCell;
41+
use super::lazy::LazyKeyInner;
4242
use crate::fmt;
4343
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
44-
index 08f0aa2..eff3126 100644
44+
index 35de4f4..f142646 100644
4545
--- a/src/libstd/thread/mod.rs
4646
+++ b/src/libstd/thread/mod.rs
4747
@@ -195,7 +195,6 @@ pub use self::local::{LocalKey, AccessError};
@@ -53,4 +53,5 @@ index 08f0aa2..eff3126 100644
5353
#[unstable(feature = "libstd_thread_internals", issue = "0")]
5454
#[cfg(target_thread_local)]
5555
--
56-
2.17.2 (Apple Git-113)
56+
2.20.1 (Apple Git-117)
57+

src/constant.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ fn define_all_allocs(
267267
let const_ = tcx.const_eval(ParamEnv::reveal_all().and(cid)).unwrap();
268268

269269
let alloc = match const_.val {
270-
ConstValue::ByRef(ptr, alloc) if ptr.offset.bytes() == 0 => alloc,
270+
ConstValue::ByRef { align: _, offset, alloc } if offset.bytes() == 0 => alloc,
271271
_ => bug!("static const eval returned {:#?}", const_),
272272
};
273273

@@ -396,12 +396,12 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for TransPlaceInterpreter {
396396
_: AllocId,
397397
alloc: Cow<'b, Allocation>,
398398
_: Option<MemoryKind<!>>,
399-
_: &(),
399+
_: &Memory<'mir, 'tcx, Self>,
400400
) -> (Cow<'b, Allocation<(), ()>>, ()) {
401401
(alloc, ())
402402
}
403403

404-
fn tag_static_base_pointer(_: AllocId, _: &()) -> Self::PointerTag {
404+
fn tag_static_base_pointer(_: AllocId, _: &Memory<'mir, 'tcx, Self>) -> Self::PointerTag {
405405
()
406406
}
407407

src/intrinsics.rs

+1
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ pub fn codegen_intrinsic_call<'a, 'tcx: 'a>(
194194
_ if intrinsic.starts_with("unchecked_") || intrinsic == "exact_div", (c x, c y) {
195195
// FIXME trap on overflow
196196
let bin_op = match intrinsic {
197+
"unchecked_sub" => BinOp::Sub,
197198
"unchecked_div" | "exact_div" => BinOp::Div,
198199
"unchecked_rem" => BinOp::Rem,
199200
"unchecked_shl" => BinOp::Shl,

0 commit comments

Comments
 (0)