]> git.lizzy.rs Git - rust.git/blob - tests/ui/array-slice-vec/vec-res-add.rs
Rollup merge of #106715 - BoxyUwU:new_solver_triagebot, r=lcnr
[rust.git] / tests / ui / array-slice-vec / vec-res-add.rs
1 #[derive(Debug)]
2 struct R {
3   i:isize
4 }
5
6 fn r(i:isize) -> R { R { i: i } }
7
8 impl Drop for R {
9     fn drop(&mut self) {}
10 }
11
12 fn main() {
13     // This can't make sense as it would copy the classes
14     let i = vec![r(0)];
15     let j = vec![r(1)];
16     let k = i + j;
17     //~^ ERROR cannot add `Vec<R>` to `Vec<R>`
18     println!("{:?}", j);
19 }