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