summaryrefslogtreecommitdiff
path: root/tests/ui-stable/late_compile_pass.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui-stable/late_compile_pass.rs')
-rw-r--r--tests/ui-stable/late_compile_pass.rs25
1 files changed, 6 insertions, 19 deletions
diff --git a/tests/ui-stable/late_compile_pass.rs b/tests/ui-stable/late_compile_pass.rs
index 1b4c603..3a99c76 100644
--- a/tests/ui-stable/late_compile_pass.rs
+++ b/tests/ui-stable/late_compile_pass.rs
@@ -5,11 +5,6 @@
#[macro_use]
extern crate zerocopy;
-#[path = "../util.rs"]
-mod util;
-
-use self::util::{NotZerocopy, AU16};
-
fn main() {}
// These tests cause errors which are generated by a later compilation pass than
@@ -17,21 +12,12 @@ fn main() {}
// the compiler will never get to that pass, and so we won't get the errors.
//
-// FromZeroes errors
-//
-
-#[derive(FromZeroes)]
-struct FromZeroes1 {
- value: NotZerocopy,
-}
-
-//
// FromBytes errors
//
#[derive(FromBytes)]
struct FromBytes1 {
- value: NotZerocopy,
+ not_from_bytes: &'static str,
}
//
@@ -41,7 +27,8 @@ struct FromBytes1 {
#[derive(AsBytes)]
#[repr(C)]
struct AsBytes1 {
- value: NotZerocopy,
+ a: u8,
+ b: u16,
}
//
@@ -51,7 +38,7 @@ struct AsBytes1 {
#[derive(Unaligned)]
#[repr(C)]
struct Unaligned1 {
- aligned: AU16,
+ aligned: u16,
}
// This specifically tests a bug we had in an old version of the code in which
@@ -60,11 +47,11 @@ struct Unaligned1 {
#[repr(C)]
struct Unaligned2 {
unaligned: u8,
- aligned: AU16,
+ aligned: u16,
}
#[derive(Unaligned)]
#[repr(transparent)]
struct Unaligned3 {
- aligned: AU16,
+ aligned: u16,
}