From 0ba2d6deb11556c4b1b054fdc5861ff8419bb0e3 Mon Sep 17 00:00:00 2001 From: Jasper Bekkers Date: Fri, 24 Jul 2020 12:30:32 +0100 Subject: [PATCH] Add Copy & int literal to test --- tests/empty.rs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/tests/empty.rs b/tests/empty.rs index 070e795e0a..7ef3479b34 100644 --- a/tests/empty.rs +++ b/tests/empty.rs @@ -10,5 +10,26 @@ pub trait Unsize {} #[lang = "coerce_unsized"] pub trait CoerceUnsized {} +#[lang = "copy"] +pub unsafe trait Copy {} -pub fn jasper() {} \ No newline at end of file +unsafe impl Copy for bool {} +unsafe impl Copy for u8 {} +unsafe impl Copy for u16 {} +unsafe impl Copy for u32 {} +unsafe impl Copy for u64 {} +unsafe impl Copy for usize {} +unsafe impl Copy for i8 {} +unsafe impl Copy for i16 {} +unsafe impl Copy for i32 {} +unsafe impl Copy for isize {} +unsafe impl Copy for f32 {} +unsafe impl Copy for char {} +unsafe impl<'a, T: ?Sized> Copy for &'a T {} +unsafe impl Copy for *const T {} +unsafe impl Copy for *mut T {} + + +pub fn jasper() { + let _ktest = 23; +} \ No newline at end of file