]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-blocks/migrate-fail.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / consts / const-blocks / migrate-fail.rs
CommitLineData
416331ca
XL
1#![allow(warnings)]
2
3// Some type that is not copyable.
4struct Bar;
5
6mod non_constants {
7 use Bar;
8
9 fn no_impl_copy_empty_value_multiple_elements() {
10 let x = None;
11 let arr: [Option<Bar>; 2] = [x; 2];
04454e1e 12 //~^ ERROR the trait bound `Bar: Copy` is not satisfied [E0277]
416331ca
XL
13 }
14
15 fn no_impl_copy_value_multiple_elements() {
16 let x = Some(Bar);
17 let arr: [Option<Bar>; 2] = [x; 2];
04454e1e 18 //~^ ERROR the trait bound `Bar: Copy` is not satisfied [E0277]
416331ca
XL
19 }
20}
21
22fn main() {}