Skip to content

Commit 6faa6a2

Browse files
committed
Rustup to rustc 1.61.0-nightly (d53246f 2022-03-25)
1 parent db59177 commit 6faa6a2

File tree

6 files changed

+32
-28
lines changed

6 files changed

+32
-28
lines changed

example/mini_core.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ unsafe extern "C" fn _Unwind_Resume() {
1414
#[lang = "sized"]
1515
pub trait Sized {}
1616

17+
#[lang = "destruct"]
18+
pub trait Destruct {}
19+
1720
#[lang = "unsize"]
1821
pub trait Unsize<T: ?Sized> {}
1922

@@ -59,6 +62,7 @@ unsafe impl Copy for i16 {}
5962
unsafe impl Copy for i32 {}
6063
unsafe impl Copy for isize {}
6164
unsafe impl Copy for f32 {}
65+
unsafe impl Copy for f64 {}
6266
unsafe impl Copy for char {}
6367
unsafe impl<'a, T: ?Sized> Copy for &'a T {}
6468
unsafe impl<T: ?Sized> Copy for *const T {}

patches/0024-core-Disable-portable-simd-test.patch

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs
1111
index aa1ad93..95fbf55 100644
1212
--- a/library/core/src/lib.rs
1313
+++ b/library/core/src/lib.rs
14-
@@ -398,25 +398,4 @@ pub mod arch {
14+
@@ -398,23 +398,4 @@ pub mod arch {
1515
}
1616
}
1717

@@ -25,12 +25,10 @@ index aa1ad93..95fbf55 100644
2525
-#[allow(missing_debug_implementations, dead_code, unsafe_op_in_unsafe_fn, unused_unsafe)]
2626
-#[allow(rustdoc::bare_urls)]
2727
-#[unstable(feature = "portable_simd", issue = "86656")]
28-
-#[cfg(not(all(miri, doctest)))] // Miri does not support all SIMD intrinsics
2928
-mod core_simd;
3029
-
3130
-#[doc = include_str!("../../portable-simd/crates/core_simd/src/core_simd_docs.md")]
3231
-#[unstable(feature = "portable_simd", issue = "86656")]
33-
-#[cfg(not(all(miri, doctest)))] // Miri does not support all SIMD intrinsics
3432
-pub mod simd {
3533
- #[unstable(feature = "portable_simd", issue = "86656")]
3634
- pub use crate::core_simd::simd::*;
@@ -41,15 +39,14 @@ diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs
4139
index cd38c3a..ad632dc 100644
4240
--- a/library/core/src/slice/mod.rs
4341
+++ b/library/core/src/slice/mod.rs
44-
@@ -17,7 +17,6 @@ use crate::ptr;
42+
@@ -17,6 +17,5 @@ use crate::ptr;
4543
use crate::result::Result;
4644
use crate::result::Result::{Err, Ok};
47-
#[cfg(not(miri))] // Miri does not support all SIMD intrinsics
4845
-use crate::simd::{self, Simd};
4946
use crate::slice;
5047

5148
#[unstable(
52-
@@ -3475,123 +3474,6 @@ impl<T> [T] {
49+
@@ -3475,121 +3474,6 @@ impl<T> [T] {
5350
}
5451
}
5552

@@ -102,14 +99,13 @@ index cd38c3a..ad632dc 100644
10299
- /// suffix.iter().copied().sum(),
103100
- /// ]);
104101
- /// let sums = middle.iter().copied().fold(sums, f32x4::add);
105-
- /// sums.horizontal_sum()
102+
- /// sums.reduce_sum()
106103
- /// }
107104
- ///
108105
- /// let numbers: Vec<f32> = (1..101).map(|x| x as _).collect();
109106
- /// assert_eq!(basic_simd_sum(&numbers[1..99]), 4949.0);
110107
- /// ```
111108
- #[unstable(feature = "portable_simd", issue = "86656")]
112-
- #[cfg(not(miri))] // Miri does not support all SIMD intrinsics
113109
- pub fn as_simd<const LANES: usize>(&self) -> (&[T], &[Simd<T, LANES>], &[T])
114110
- where
115111
- Simd<T, LANES>: AsRef<[T; LANES]>,
@@ -153,7 +149,6 @@ index cd38c3a..ad632dc 100644
153149
- /// be lifted in a way that would make it possible to see panics from this
154150
- /// method for something like `LANES == 3`.
155151
- #[unstable(feature = "portable_simd", issue = "86656")]
156-
- #[cfg(not(miri))] // Miri does not support all SIMD intrinsics
157152
- pub fn as_simd_mut<const LANES: usize>(&mut self) -> (&mut [T], &mut [Simd<T, LANES>], &mut [T])
158153
- where
159154
- Simd<T, LANES>: AsMut<[T; LANES]>,
@@ -197,15 +192,14 @@ diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs
197192
index 5dc586d..b6fc48f 100644
198193
--- a/library/std/src/lib.rs
199194
+++ b/library/std/src/lib.rs
200-
@@ -312,7 +312,6 @@
195+
@@ -312,6 +312,5 @@
201196
#![feature(panic_can_unwind)]
202197
#![feature(panic_unwind)]
203198
#![feature(platform_intrinsics)]
204199
-#![feature(portable_simd)]
205200
#![feature(prelude_import)]
206201
#![feature(ptr_as_uninit)]
207-
#![feature(ptr_internals)]
208-
@@ -508,25 +508,6 @@ pub mod time;
202+
@@ -508,23 +508,6 @@ pub mod time;
209203
#[unstable(feature = "once_cell", issue = "74465")]
210204
pub mod lazy;
211205

@@ -215,10 +209,8 @@ index 5dc586d..b6fc48f 100644
215209
-#[allow(missing_debug_implementations, dead_code, unsafe_op_in_unsafe_fn, unused_unsafe)]
216210
-#[allow(rustdoc::bare_urls)]
217211
-#[unstable(feature = "portable_simd", issue = "86656")]
218-
-#[cfg(not(all(miri, doctest)))] // Miri does not support all SIMD intrinsics
219212
-mod std_float;
220213
-
221-
-#[cfg(not(all(miri, doctest)))] // Miri does not support all SIMD intrinsics
222214
-#[doc = include_str!("../../portable-simd/crates/core_simd/src/core_simd_docs.md")]
223215
-#[unstable(feature = "portable_simd", issue = "86656")]
224216
-pub mod simd {
Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
1-
From 0ffdd8eda8df364391c8ac6e1ce92c73ba9254d4 Mon Sep 17 00:00:00 2001
1+
From eb703e627e7a84f1cd8d0d87f0f69da1f0acf765 Mon Sep 17 00:00:00 2001
22
From: bjorn3 <bjorn3@users.noreply.github.com>
33
Date: Fri, 3 Dec 2021 12:16:30 +0100
44
Subject: [PATCH] Disable long running tests
55

66
---
7-
library/core/tests/slice.rs | 3 +++
8-
1 file changed, 3 insertions(+)
7+
library/core/tests/slice.rs | 2 ++
8+
1 file changed, 2 insertions(+)
99

1010
diff --git a/library/core/tests/slice.rs b/library/core/tests/slice.rs
11-
index 2c8f00a..44847ee 100644
11+
index 8402833..84592e0 100644
1212
--- a/library/core/tests/slice.rs
1313
+++ b/library/core/tests/slice.rs
14-
@@ -2332,7 +2332,8 @@ macro_rules! empty_max_mut {
15-
};
16-
}
14+
@@ -2462,6 +2462,7 @@ take_tests! {
15+
#[cfg(not(miri))] // unused in Miri
16+
const EMPTY_MAX: &'static [()] = &[(); usize::MAX];
1717

1818
+/*
19-
#[cfg(not(miri))] // Comparing usize::MAX many elements takes forever in Miri (and in rustc without optimizations)
20-
take_tests! {
21-
slice: &[(); usize::MAX], method: take,
22-
(take_in_bounds_max_range_to, (..usize::MAX), Some(EMPTY_MAX), &[(); 0]),
23-
@@ -2345,3 +2347,4 @@ take_tests! {
19+
// can't be a constant due to const mutability rules
20+
#[cfg(not(miri))] // unused in Miri
21+
macro_rules! empty_max_mut {
22+
@@ -2485,6 +2486,7 @@ take_tests! {
2423
(take_mut_oob_max_range_to_inclusive, (..=usize::MAX), None, empty_max_mut!()),
2524
(take_mut_in_bounds_max_range_from, (usize::MAX..), Some(&mut [] as _), empty_max_mut!()),
2625
}
2726
+*/
27+
28+
#[test]
29+
fn test_slice_from_ptr_range() {
2830
--
2931
2.26.2.7.g19db9cfb68
3032

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2022-02-25"
2+
channel = "nightly-2022-03-26"
33
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]

src/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
12521252
}
12531253

12541254
fn do_not_inline(&mut self, _llret: RValue<'gcc>) {
1255-
unimplemented!();
1255+
// FIMXE(bjorn3): implement
12561256
}
12571257

12581258
fn set_span(&mut self, _span: Span) {}

src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ use rustc_errors::{ErrorGuaranteed, Handler};
6464
use rustc_metadata::EncodedMetadata;
6565
use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
6666
use rustc_middle::ty::TyCtxt;
67+
use rustc_middle::ty::query::Providers;
6768
use rustc_session::config::{Lto, OptLevel, OutputFilenames};
6869
use rustc_session::Session;
6970
use rustc_span::Symbol;
@@ -101,6 +102,11 @@ impl CodegenBackend for GccCodegenBackend {
101102
*self.supports_128bit_integers.lock().expect("lock") = check_context.get_last_error() == Ok(None);
102103
}
103104

105+
fn provide(&self, providers: &mut Providers) {
106+
// FIXME compute list of enabled features from cli flags
107+
providers.global_backend_features = |_tcx, ()| vec![];
108+
}
109+
104110
fn codegen_crate<'tcx>(&self, tcx: TyCtxt<'tcx>, metadata: EncodedMetadata, need_metadata_module: bool) -> Box<dyn Any> {
105111
let target_cpu = target_cpu(tcx.sess);
106112
let res = codegen_crate(self.clone(), tcx, target_cpu.to_string(), metadata, need_metadata_module);

0 commit comments

Comments
 (0)