about summary refs log tree commit diff
path: root/tests/ui/repr/16-bit-repr-c-enum.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/repr/16-bit-repr-c-enum.rs')
-rw-r--r--tests/ui/repr/16-bit-repr-c-enum.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/ui/repr/16-bit-repr-c-enum.rs b/tests/ui/repr/16-bit-repr-c-enum.rs
index 8c2d2fafce0..d4d5a086dcc 100644
--- a/tests/ui/repr/16-bit-repr-c-enum.rs
+++ b/tests/ui/repr/16-bit-repr-c-enum.rs
@@ -1,3 +1,4 @@
+//@ add-core-stubs
 //@ build-pass
 //@ revisions: avr msp430
 //
@@ -11,6 +12,9 @@
 #![stable(feature = "intrinsics_for_test", since = "3.3.3")]
 #![allow(dead_code)]
 
+extern crate minicore;
+use minicore::*;
+
 // Test that the repr(C) attribute doesn't break compilation
 // Previous bad assumption was that 32-bit enum default width is fine on msp430, avr
 // But the width of the C int on these platforms is 16 bits, and C enums <= C int range
@@ -26,11 +30,6 @@ enum Foo {
 #[rustc_intrinsic]
 const fn size_of<T>() -> usize;
 
-#[lang="sized"]
-trait Sized {}
-#[lang="copy"]
-trait Copy {}
-
 const EXPECTED: usize = 2;
 const ACTUAL: usize = size_of::<Foo>();
 // Validate that the size is indeed 16 bits, to match this C static_assert: