]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/feature-gates/feature-gate-const_in_array_repeat_expressions.rs
1 // ignore-tidy-linelength
6 // This function would compile with the feature gate, and tests that it is suggested.
8 let arr
: [Option
<String
>; 2] = [None
::<String
>; 2];
9 //~^ ERROR the trait bound `std::option::Option<std::string::String>: std::marker::Copy` is not satisfied [E0277]
12 // This function would not compile with the feature gate, and tests that it is not suggested.
14 let arr
: [Option
<String
>; 2] = [Some("foo".to_string()); 2];
15 //~^ ERROR the trait bound `std::option::Option<std::string::String>: std::marker::Copy` is not satisfied [E0277]