"-g".to_owned(),
"--debuginfo".to_owned()
];
- let new_options =
+ let mut new_options =
split_maybe_args(options).into_iter()
.filter(|x| !options_to_remove.contains(x))
- .collect::<Vec<String>>()
- .join(" ");
- Some(new_options)
+ .collect::<Vec<String>>();
+
+ let mut i = 0;
+ while i + 1 < new_options.len() {
+ if new_options[i] == "-Z" {
+ // FIXME #31005 MIR missing debuginfo currently.
+ if new_options[i + 1] == "orbit" {
+ // Remove "-Z" and "orbit".
+ new_options.remove(i);
+ new_options.remove(i);
+ continue;
+ }
+ // Always skip over -Z's argument.
+ i += 1;
+ }
+ i += 1;
+ }
+
+ Some(new_options.join(" "))
}
fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String]) {
#![feature(reflect)]
#![feature(unwind_attributes)]
#![feature(repr_simd, platform_intrinsics)]
+#![feature(rustc_attrs)]
#![feature(staged_api)]
#![feature(unboxed_closures)]
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
+ #[cfg_attr(not(stage0), rustc_no_mir)] // FIXME #29769 MIR overflow checking is TBD.
pub fn pow(self, mut exp: u32) -> Self {
let mut base = self;
let mut acc = Self::one();
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
+ #[cfg_attr(not(stage0), rustc_no_mir)] // FIXME #29769 MIR overflow checking is TBD.
pub fn abs(self) -> Self {
if self.is_negative() {
// Note that the #[inline] above means that the overflow
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
+ #[cfg_attr(not(stage0), rustc_no_mir)] // FIXME #29769 MIR overflow checking is TBD.
pub fn pow(self, mut exp: u32) -> Self {
let mut base = self;
let mut acc = Self::one();
#![feature(raw)]
#![feature(repr_simd)]
#![feature(reflect_marker)]
+#![feature(rustc_attrs)]
#![feature(shared)]
#![feature(slice_bytes)]
#![feature(slice_concat_ext)]
}
#[test]
+ #[rustc_no_mir] // FIXME #27840 MIR NAN ends up negative.
fn test_integer_decode() {
assert_eq!(3.14159265359f32.integer_decode(), (13176795, -22, 1));
assert_eq!((-8573.5918555f32).integer_decode(), (8779358, -10, -1));
}
#[test]
+ #[rustc_no_mir] // FIXME #27840 MIR NAN ends up negative.
fn test_integer_decode() {
assert_eq!(3.14159265359f64.integer_decode(), (7074237752028906, -51, 1));
assert_eq!((-8573.5918555f64).integer_decode(), (4713381968463931, -39, -1));
// compile-flags: -C no-prepopulate-passes
#![crate_type = "lib"]
+#![feature(rustc_attrs)]
// Hack to get the correct size for the length part in slices
// CHECK: @helper([[USIZE:i[0-9]+]])
// CHECK-LABEL: @no_op_slice_adjustment
#[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
pub fn no_op_slice_adjustment(x: &[u8]) -> &[u8] {
// We used to generate an extra alloca and memcpy for the block's trailing expression value, so
// check that we copy directly to the return value slot
// compile-flags: -C no-prepopulate-passes
#![crate_type = "lib"]
+#![feature(rustc_attrs)]
static X: i32 = 5;
// CHECK-LABEL: @raw_ptr_to_raw_ptr_noop
// CHECK-NOT: alloca
#[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
pub fn raw_ptr_to_raw_ptr_noop() -> *const i32{
&X as *const i32
}
// CHECK-LABEL: @reference_to_raw_ptr_noop
// CHECK-NOT: alloca
#[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
pub fn reference_to_raw_ptr_noop() -> *const i32 {
&X
}
// compile-flags: -C no-prepopulate-passes
#![crate_type = "lib"]
+#![feature(rustc_attrs)]
// Below, these constants are defined as enum variants that by itself would
// have a lower alignment than the enum type. Ensure that we mark them
// CHECK-LABEL: @static_enum_const
#[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
pub fn static_enum_const() -> E<i16, i32> {
STATIC
}
// CHECK-LABEL: @inline_enum_const
#[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
pub fn inline_enum_const() -> E<i8, i16> {
E::A(0)
}
// CHECK-LABEL: @low_align_const
#[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
pub fn low_align_const() -> E<i16, [i16; 3]> {
// Check that low_align_const and high_align_const use the same constant
// CHECK: call void @llvm.memcpy.{{.*}}(i8* %{{[0-9]+}}, i8* {{.*}} [[LOW_HIGH:@const[0-9]+]]
// CHECK-LABEL: @high_align_const
#[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
pub fn high_align_const() -> E<i16, i32> {
// Check that low_align_const and high_align_const use the same constant
// CHECK: call void @llvm.memcpy.{{.*}}(i8* %{{[0-9]}}, i8* {{.*}} [[LOW_HIGH]]
// compile-flags: -C no-prepopulate-passes
#![crate_type = "lib"]
+#![feature(rustc_attrs)]
struct SomeUniqueName;
// CHECK-LABEL: @droppy
#[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
pub fn droppy() {
// Check that there are exactly 6 drop calls. The cleanups for the unwinding should be reused, so
// that's one new drop call per call to possibly_unwinding(), and finally 3 drop calls for the
// compile-flags: -C no-prepopulate-passes
#![crate_type = "lib"]
+#![feature(rustc_attrs)]
// Hack to get the correct size for the length part in slices
// CHECK: @helper([[USIZE:i[0-9]+]])
// CHECK-LABEL: @ref_dst
#[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
pub fn ref_dst(s: &[u8]) {
// We used to generate an extra alloca and memcpy to ref the dst, so check that we copy
// directly to the alloca for "x"
// compile-flags: -C no-prepopulate-passes
#![crate_type = "lib"]
+#![feature(rustc_attrs)]
pub struct Bytes {
a: u8,
// The array is stored as i32, but its alignment is lower, go with 1 byte to avoid target
// dependent alignment
#[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
pub fn small_array_alignment(x: &mut [i8; 4], y: [i8; 4]) {
// CHECK: [[VAR:%[0-9]+]] = bitcast [4 x i8]* %y to i32*
// CHECK: store i32 %{{.*}}, i32* [[VAR]], align 1
// The struct is stored as i32, but its alignment is lower, go with 1 byte to avoid target
// dependent alignment
#[no_mangle]
+#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
pub fn small_struct_alignment(x: &mut Bytes, y: Bytes) {
// CHECK: [[VAR:%[0-9]+]] = bitcast %Bytes* %y to i32*
// CHECK: store i32 %{{.*}}, i32* [[VAR]], align 1
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#[allow(exceeding_bitshifts)]
-#[deny(const_err)]
+#![feature(rustc_attrs)]
+#![allow(exceeding_bitshifts)]
+#![deny(const_err)]
fn black_box<T>(_: T) {
unimplemented!()
const BLA: u8 = 200u8 + 200u8;
//~^ ERROR attempted to add with overflow
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
let a = -std::i8::MIN;
//~^ WARN attempted to negate with overflow
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![feature(rustc_attrs)]
#![allow(unused_imports)]
// Note: the relevant lint pass here runs before some of the constant
//~^ ERROR attempted to multiply with overflow
);
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
foo(VALS_I8);
foo(VALS_I16);
fn return_address() -> *const u8;
}
-unsafe fn f() {
- let _ = return_address();
- //~^ ERROR invalid use of `return_address` intrinsic: function does not use out pointer
-}
+unsafe fn f() { let _ = return_address(); }
+//~^ ERROR invalid use of `return_address` intrinsic: function does not use out pointer
-unsafe fn g() -> isize {
- let _ = return_address();
- //~^ ERROR invalid use of `return_address` intrinsic: function does not use out pointer
- 0
-}
+unsafe fn g() -> isize { let _ = return_address(); 0 }
+//~^ ERROR invalid use of `return_address` intrinsic: function does not use out pointer
fn main() {}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![feature(repr_simd, platform_intrinsics)]
+#![feature(repr_simd, platform_intrinsics, rustc_attrs)]
#![allow(non_camel_case_types)]
#[repr(simd)]
#[derive(Copy, Clone)]
fn simd_xor<T>(x: T, y: T) -> T;
}
+#[rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
fn main() {
let x = i32x4(0, 0, 0, 0);
let y = u32x4(0, 0, 0, 0);
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![feature(repr_simd, platform_intrinsics)]
+#![feature(repr_simd, platform_intrinsics, rustc_attrs)]
#[repr(simd)]
#[derive(Copy, Clone)]
fn simd_cast<T, U>(x: T) -> U;
}
+#[rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
fn main() {
let x = i32x4(0, 0, 0, 0);
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![feature(repr_simd, platform_intrinsics)]
+#![feature(repr_simd, platform_intrinsics, rustc_attrs)]
#[repr(simd)]
#[derive(Copy, Clone)]
fn simd_ge<T, U>(x: T, y: T) -> U;
}
+#[rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
fn main() {
let x = i32x4(0, 0, 0, 0);
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![feature(repr_simd, platform_intrinsics)]
+#![feature(repr_simd, platform_intrinsics, rustc_attrs)]
#[repr(simd)]
#[derive(Copy, Clone)]
fn simd_shuffle8<T, U>(x: T, y: T, idx: [u32; 8]) -> U;
}
+#[rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
fn main() {
let x = i32x4(0, 0, 0, 0);
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// ignore-pretty : (#23623) problems when ending with // comments
+
// error-pattern:attempted to divide by zero
+
+#![feature(rustc_attrs)]
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
let y = 0;
let _z = 1 / y;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// ignore-pretty : (#23623) problems when ending with // comments
+
// error-pattern:attempted remainder with a divisor of zero
+
+#![feature(rustc_attrs)]
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
let y = 0;
let _z = 1 % y;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// ignore-pretty : (#23623) problems when ending with // comments
+
// error-pattern:thread '<main>' panicked at 'arithmetic operation overflowed'
// compile-flags: -C debug-assertions
+#![feature(rustc_attrs)]
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
let _x = 200u8 + 200u8 + 200u8;
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// ignore-pretty : (#23623) problems when ending with // comments
+
// error-pattern:thread '<main>' panicked at 'shift operation overflowed'
// compile-flags: -C debug-assertions
#![warn(exceeding_bitshifts)]
+#![feature(rustc_attrs)]
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
let _x = 1_i32 << 32;
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// ignore-pretty : (#23623) problems when ending with // comments
+
// error-pattern:thread '<main>' panicked at 'shift operation overflowed'
// compile-flags: -C debug-assertions
#![warn(exceeding_bitshifts)]
+#![feature(rustc_attrs)]
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
let _x = 1 << -1;
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// ignore-pretty : (#23623) problems when ending with // comments
+
// error-pattern:thread '<main>' panicked at 'shift operation overflowed'
// compile-flags: -C debug-assertions
#![warn(exceeding_bitshifts)]
+#![feature(rustc_attrs)]
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
let _x = 1_u64 << 64;
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// ignore-pretty : (#23623) problems when ending with // comments
+
// error-pattern:thread '<main>' panicked at 'shift operation overflowed'
// compile-flags: -C debug-assertions
#![warn(exceeding_bitshifts)]
+#![feature(rustc_attrs)]
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
// this signals overflow when checking is on
let x = 1_i8 << 17;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// ignore-pretty : (#23623) problems when ending with // comments
+
// error-pattern:thread '<main>' panicked at 'arithmetic operation overflowed'
// compile-flags: -C debug-assertions
+#![feature(rustc_attrs)]
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
let x = 200u8 * 4;
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// ignore-pretty : (#23623) problems when ending with // comments
+
// error-pattern:thread '<main>' panicked at 'attempted to negate with overflow'
// compile-flags: -C debug-assertions
+#![feature(rustc_attrs)]
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
let _x = -std::i8::MIN;
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// ignore-pretty : (#23623) problems when ending with // comments
+
// error-pattern:thread '<main>' panicked at 'shift operation overflowed'
// compile-flags: -C debug-assertions
#![warn(exceeding_bitshifts)]
+#![feature(rustc_attrs)]
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
let _x = -1_i32 >> 32;
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// ignore-pretty : (#23623) problems when ending with // comments
+
// error-pattern:thread '<main>' panicked at 'shift operation overflowed'
// compile-flags: -C debug-assertions
#![warn(exceeding_bitshifts)]
+#![feature(rustc_attrs)]
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
let _x = -1_i32 >> -1;
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// ignore-pretty : (#23623) problems when ending with // comments
+
// error-pattern:thread '<main>' panicked at 'shift operation overflowed'
// compile-flags: -C debug-assertions
#![warn(exceeding_bitshifts)]
+#![feature(rustc_attrs)]
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
let _x = -1_i64 >> 64;
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// ignore-pretty : (#23623) problems when ending with // comments
+
// error-pattern:thread '<main>' panicked at 'shift operation overflowed'
// compile-flags: -C debug-assertions
#![warn(exceeding_bitshifts)]
+#![feature(rustc_attrs)]
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
// this signals overflow when checking is on
let x = 2_i8 >> 17;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// ignore-pretty : (#23623) problems when ending with // comments
+
// error-pattern:thread '<main>' panicked at 'shift operation overflowed'
// compile-flags: -C debug-assertions
#![warn(exceeding_bitshifts)]
+#![feature(rustc_attrs)]
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
let _n = 1i64 >> [64][0];
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// ignore-pretty : (#23623) problems when ending with // comments
+
// error-pattern:thread '<main>' panicked at 'shift operation overflowed'
// compile-flags: -C debug-assertions
#![warn(exceeding_bitshifts)]
#![feature(const_indexing)]
+#![feature(rustc_attrs)]
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
let _n = 1i64 >> [64][0];
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// ignore-pretty : (#23623) problems when ending with // comments
+
// error-pattern:thread '<main>' panicked at 'arithmetic operation overflowed'
// compile-flags: -C debug-assertions
+#![feature(rustc_attrs)]
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
let _x = 42u8 - (42u8 + 1);
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![feature(rustc_attrs)]
#![deny(warnings)]
use std::env;
}
fn overflow() {
+ #[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn add(a: u8, b: u8) -> u8 { a + b }
add(200u8, 200u8);
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// ignore-pretty : (#23623) problems when ending with // comments
+
// no-prefer-dynamic
#![allow(dead_code)]
-#![feature(const_fn)]
+#![feature(const_fn, rustc_attrs)]
// check dtor calling order when casting enums.
}
}
+#[rustc_no_mir] // FIXME #27840 MIR miscompiles this.
fn main() {
assert_eq!(FLAG.load(Ordering::SeqCst), 0);
{
// ignore-test: not a test, used by backtrace-debuginfo.rs to test file!()
#[inline(never)]
+#[rustc_no_mir] // FIXME #31005 MIR missing debuginfo currently.
pub fn callback<F>(f: F) where F: FnOnce((&'static str, u32)) {
f((file!(), line!()))
}
// this case.
#[cfg_attr(not(target_env = "msvc"), inline(always))]
#[cfg_attr(target_env = "msvc", inline(never))]
+#[rustc_no_mir] // FIXME #31005 MIR missing debuginfo currently.
pub fn callback_inlined<F>(f: F) where F: FnOnce((&'static str, u32)) {
f((file!(), line!()))
}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![feature(rustc_attrs)]
+
// We disable tail merging here because it can't preserve debuginfo and thus
// potentially breaks the backtraces. Also, subtle changes can decide whether
// tail merging suceeds, so the test might work today but fail tomorrow due to a
}
#[inline(never)]
+#[rustc_no_mir] // FIXME #31005 MIR missing debuginfo currently.
fn inner(counter: &mut i32, main_pos: Pos, outer_pos: Pos) {
check!(counter; main_pos, outer_pos);
check!(counter; main_pos, outer_pos);
// this case.
#[cfg_attr(not(target_env = "msvc"), inline(always))]
#[cfg_attr(target_env = "msvc", inline(never))]
+#[rustc_no_mir] // FIXME #31005 MIR missing debuginfo currently.
fn inner_inlined(counter: &mut i32, main_pos: Pos, outer_pos: Pos) {
check!(counter; main_pos, outer_pos);
check!(counter; main_pos, outer_pos);
}
#[inline(never)]
+#[rustc_no_mir] // FIXME #31005 MIR missing debuginfo currently.
fn outer(mut counter: i32, main_pos: Pos) {
inner(&mut counter, main_pos, pos!());
inner_inlined(&mut counter, main_pos, pos!());
}
#[inline(never)]
+#[rustc_no_mir] // FIXME #31005 MIR missing debuginfo currently.
fn main() {
let args: Vec<String> = env::args().collect();
if args.len() >= 2 {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![feature(rustc_attrs)]
+
+// ignore-pretty : (#23623) problems when ending with // comments
use std::{str, string};
const B: &'static [u8; 2] = &A;
const C: *const u8 = B as *const u8;
+#[rustc_no_mir] // FIXME #27840 MIR can't do rvalue promotion yet.
pub fn main() {
unsafe {
let foo = &A as *const u8;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![feature(rustc_attrs)]
+
// ignore-pretty : (#23623) problems when ending with // comments
// This test is ensuring that parameters are indeed dropped after
d::println(&format!("result {}", result));
}
+#[rustc_no_mir] // FIXME #29855 MIR doesn't handle all drops correctly.
fn foo<'a>(da0: D<'a>, de1: D<'a>) -> D<'a> {
d::println("entered foo");
let de2 = de1.incr(); // creates D(de_2, 2)
// except according to those terms.
// ignore-emscripten no threads support
+// ignore-pretty : (#23623) problems when ending with // comments
-#![feature(zero_one)]
+#![feature(rustc_attrs, stmt_expr_attributes, zero_one)]
use std::num::Zero;
use std::thread;
+macro_rules! check {
+ ($($e:expr),*) => {
+ $(assert!(thread::spawn({
+ #[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
+ move|| { $e; }
+ }).join().is_err());)*
+ }
+}
+
+#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
fn main() {
- assert!(thread::spawn(move|| { isize::min_value() / -1; }).join().is_err());
- assert!(thread::spawn(move|| { i8::min_value() / -1; }).join().is_err());
- assert!(thread::spawn(move|| { i16::min_value() / -1; }).join().is_err());
- assert!(thread::spawn(move|| { i32::min_value() / -1; }).join().is_err());
- assert!(thread::spawn(move|| { i64::min_value() / -1; }).join().is_err());
- assert!(thread::spawn(move|| { 1isize / isize::zero(); }).join().is_err());
- assert!(thread::spawn(move|| { 1i8 / i8::zero(); }).join().is_err());
- assert!(thread::spawn(move|| { 1i16 / i16::zero(); }).join().is_err());
- assert!(thread::spawn(move|| { 1i32 / i32::zero(); }).join().is_err());
- assert!(thread::spawn(move|| { 1i64 / i64::zero(); }).join().is_err());
- assert!(thread::spawn(move|| { isize::min_value() % -1; }).join().is_err());
- assert!(thread::spawn(move|| { i8::min_value() % -1; }).join().is_err());
- assert!(thread::spawn(move|| { i16::min_value() % -1; }).join().is_err());
- assert!(thread::spawn(move|| { i32::min_value() % -1; }).join().is_err());
- assert!(thread::spawn(move|| { i64::min_value() % -1; }).join().is_err());
- assert!(thread::spawn(move|| { 1isize % isize::zero(); }).join().is_err());
- assert!(thread::spawn(move|| { 1i8 % i8::zero(); }).join().is_err());
- assert!(thread::spawn(move|| { 1i16 % i16::zero(); }).join().is_err());
- assert!(thread::spawn(move|| { 1i32 % i32::zero(); }).join().is_err());
- assert!(thread::spawn(move|| { 1i64 % i64::zero(); }).join().is_err());
+ check![
+ isize::min_value() / -1,
+ i8::min_value() / -1,
+ i16::min_value() / -1,
+ i32::min_value() / -1,
+ i64::min_value() / -1,
+ 1isize / isize::zero(),
+ 1i8 / i8::zero(),
+ 1i16 / i16::zero(),
+ 1i32 / i32::zero(),
+ 1i64 / i64::zero(),
+ isize::min_value() % -1,
+ i8::min_value() % -1,
+ i16::min_value() % -1,
+ i32::min_value() % -1,
+ i64::min_value() % -1,
+ 1isize % isize::zero(),
+ 1i8 % i8::zero(),
+ 1i16 % i16::zero(),
+ 1i32 % i32::zero(),
+ 1i64 % i64::zero()
+ ];
}
#![feature(rustc_attrs)]
+// ignore-pretty : (#23623) problems when ending with // comments
+
// check raw fat pointer ops in mir
// FIXME: please improve this when we get monomorphization support
struct S<T:?Sized>(u32, T);
+#[rustc_no_mir] // FIXME #27840 MIR can't do rvalue promotion yet.
fn main() {
let array = [0,1,2,3,4];
let array2 = [5,6,7,8,9];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![feature(repr_simd, platform_intrinsics)]
+#![feature(repr_simd, rustc_attrs, platform_intrinsics)]
+
+// ignore-pretty : (#23623) problems when ending with // comments
#[repr(simd)]
#[derive(Copy, Clone, Debug, PartialEq)]
}}
}
+#[rustc_no_mir] // FIXME #27840 MIR doesn't handle shuffle constants.
fn main() {
let x2 = i32x2(20, 21);
let x3 = i32x3(30, 31, 32);
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+#![feature(rustc_attrs, unsafe_no_drop_flag)]
-#![feature(unsafe_no_drop_flag)]
+// ignore-pretty : (#23623) problems when ending with // comments
static mut destructions : isize = 3;
+#[rustc_no_mir] // FIXME #29855 MIR doesn't handle all drops correctly.
pub fn foo() {
#[unsafe_no_drop_flag]
struct Foo;