// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![allow(dead_code)]
-
use std::mem;
enum Tag<A> {
Tag2(A)
}
+#[allow(dead_code)]
struct Rec {
c8: u8,
t: Tag<u64>
-#![allow(dead_code)]
-
+#[allow(dead_code)]
struct Foo<T: ?Sized> {
a: u16,
b: T
a: T
}
+#[allow(dead_code)]
struct HasDrop<T: ?Sized> {
ptr: Box<usize>,
data: T
//ignore-windows: Uses POSIX APIs
-
#![feature(rustc_private)]
-#![allow(unused_extern_crates)] // rustc bug https://github.com/rust-lang/rust/issues/56098
extern crate libc;
-#![allow(dead_code)]
-
+#[allow(dead_code)]
enum Two { A, B }
impl Drop for Two {
fn drop(&mut self) {
-#![allow(dead_code)]
-
use std::mem;
+#[allow(dead_code)]
struct Foo<T: ?Sized> {
a: i64,
b: bool,
-#![allow(dead_code)]
-
#[repr(u16)]
+#[allow(dead_code)]
enum DeviceKind {
Nil = 0,
}
+
#[repr(packed)]
+#[allow(dead_code)]
struct DeviceInfo {
endianness: u8,
device_kind: DeviceKind,
}
+
fn main() {
let _x = None::<(DeviceInfo, u8)>;
let _y = None::<(DeviceInfo, u16)>;
// compile-flags: -Zmiri-disable-isolation
#![feature(rustc_private)]
-#![allow(unused)] // necessary on macos due to conditional compilation
-
-use std::path::PathBuf;
extern crate libc;
-fn tmp() -> PathBuf {
- std::env::var("MIRI_TEMP").map(PathBuf::from).unwrap_or_else(|_| std::env::temp_dir())
+#[cfg(target_os = "linux")]
+fn tmp() -> std::path::PathBuf {
+ std::env::var("MIRI_TEMP").map(std::path::PathBuf::from).unwrap_or_else(|_| std::env::temp_dir())
}
#[cfg(target_os = "linux")]
-#![allow(dead_code)]
#![feature(unsize, coerce_unsized)]
#[repr(packed)]
}
#[repr(packed)]
+#[allow(dead_code)]
struct Test1<'a> {
x: u8,
other: &'a u32,
}
#[repr(packed)]
+#[allow(dead_code)]
struct Test2<'a> {
x: u8,
other: &'a Test1<'a>,
fn test_unsizing() {
#[repr(packed)]
+ #[allow(dead_code)]
struct UnalignedPtr<'a, T: ?Sized>
where T: 'a,
{
#![feature(rustc_private)]
-#![allow(dead_code)]
-
extern crate libc;
use std::mem;
fcx: &'a Fcx<'a>
}
+#[allow(dead_code)]
struct Fcx<'a> {
arena: &'a Arena,
ccx: &'a Ccx
}
+#[allow(dead_code)]
struct Ccx {
x: isize
}
-#![allow(dead_code)]
+#![allow(dead_code)] // tons of unused statics here...
// very simple test for a 'static static with default lifetime
static STATIC_STR: &str = "&'static str";
-#![allow(dead_code)]
-
+#[allow(dead_code)]
enum E {
A = 1,
B = 2,
-#![allow(dead_code)]
-
static mut FOO: i32 = 42;
static BAR: Foo = Foo(unsafe { &FOO as *const _} );
+#[allow(dead_code)]
struct Foo(*const i32);
unsafe impl Sync for Foo {}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![allow(dead_code)]
-
use std::mem;
enum Tag<A> {
Tag2(A)
}
+#[allow(dead_code)]
struct Rec {
c8: u8,
t: Tag<u64>
#![feature(untagged_unions)]
-#![allow(dead_code, unused_variables)]
fn main() {
a();
}
fn a() {
+ #[allow(dead_code)]
union U {
f1: u32,
f2: f32,
y: u32,
}
+ #[allow(dead_code)]
union U {
s: S,
both: u64,
unsafe {
match u {
MyUnion { f1: 10 } => { }
- MyUnion { f2 } => { panic!("foo"); }
+ MyUnion { f2: _f2 } => { panic!("foo"); }
}
}
}