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