diff options
Diffstat (limited to 'src/test/ui/rfcs/rfc-2528-type-changing-struct-update/issue-96878.rs')
-rw-r--r-- | src/test/ui/rfcs/rfc-2528-type-changing-struct-update/issue-96878.rs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/test/ui/rfcs/rfc-2528-type-changing-struct-update/issue-96878.rs b/src/test/ui/rfcs/rfc-2528-type-changing-struct-update/issue-96878.rs deleted file mode 100644 index 3dfbef0ee..000000000 --- a/src/test/ui/rfcs/rfc-2528-type-changing-struct-update/issue-96878.rs +++ /dev/null @@ -1,31 +0,0 @@ -// check-pass - -#![feature(type_changing_struct_update)] -#![allow(incomplete_features)] - -use std::borrow::Cow; -use std::marker::PhantomData; - -#[derive(Default)] -struct NonGeneric { - field1: usize, -} - -#[derive(Default)] -struct Generic<T, U> { - field1: T, - field2: U, -} - -#[derive(Default)] -struct MoreGeneric<'a, const N: usize> { - // If only `for<const N: usize> [u32; N]: Default`... - field1: PhantomData<[u32; N]>, - field2: Cow<'a, str>, -} - -fn main() { - let default1 = NonGeneric { ..Default::default() }; - let default2: Generic<i32, f32> = Generic { ..Default::default() }; - let default3: MoreGeneric<'static, 12> = MoreGeneric { ..Default::default() }; -} |