|
1 |
| -//@ run-pass |
2 | 1 | #![feature(
|
3 |
| - const_trait_impl, const_default, ptr_alignment_type, ascii_char, f16, f128, sync_unsafe_cell, |
| 2 | + const_trait_impl, const_default, const_clone, ptr_alignment_type, |
| 3 | + ascii_char, f16, f128, sync_unsafe_cell, |
4 | 4 | )]
|
5 | 5 | #![allow(dead_code)]
|
6 | 6 | // core::default
|
@@ -43,4 +43,27 @@ const REF_CELL: std::cell::RefCell<()> = Default::default();
|
43 | 43 | const UNSAFE_CELL: std::cell::UnsafeCell<()> = Default::default();
|
44 | 44 | const SYNC_UNSAFE_CELL: std::cell::SyncUnsafeCell<()> = Default::default();
|
45 | 45 |
|
| 46 | +// core::clone |
| 47 | +const UNIT_CLONE: () = UNIT.clone(); |
| 48 | +//~^ ERROR: the trait bound `(): const Clone` is not satisfied |
| 49 | +const BOOL_CLONE: bool = BOOL.clone(); |
| 50 | +const CHAR_CLONE: char = CHAR.clone(); |
| 51 | +const ASCII_CHAR_CLONE: std::ascii::Char = ASCII_CHAR.clone(); |
| 52 | +//~^ ERROR: the trait bound `Char: const Clone` is not satisfied |
| 53 | +const USIZE_CLONE: usize = USIZE.clone(); |
| 54 | +const U8_CLONE: u8 = U8.clone(); |
| 55 | +const U16_CLONE: u16 = U16.clone(); |
| 56 | +const U32_CLONE: u32 = U32.clone(); |
| 57 | +const U64_CLONE: u64 = U64.clone(); |
| 58 | +const U128_CLONE: u128 = U128.clone(); |
| 59 | +const I8_CLONE: i8 = I8.clone(); |
| 60 | +const I16_CLONE: i16 = I16.clone(); |
| 61 | +const I32_CLONE: i32 = I32.clone(); |
| 62 | +const I64_CLONE: i64 = I64.clone(); |
| 63 | +const I128_CLONE: i128 = I128.clone(); |
| 64 | +const F16_CLONE: f16 = F16.clone(); |
| 65 | +const F32_CLONE: f32 = F32.clone(); |
| 66 | +const F64_CLONE: f64 = F64.clone(); |
| 67 | +const F128_CLONE: f128 = F128.clone(); |
| 68 | + |
46 | 69 | fn main() {}
|
0 commit comments