blob: 4785178fb2575e825093fe77cd6644d174d1bca4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#[derive(Debug)]
struct R {
i:isize
}
fn r(i:isize) -> R { R { i: i } }
impl Drop for R {
fn drop(&mut self) {}
}
fn main() {
// This can't make sense as it would copy the classes
let i = vec![r(0)];
let j = vec![r(1)];
let k = i + j;
//~^ ERROR cannot add `std::vec::Vec<R>` to `std::vec::Vec<R>`
println!("{:?}", j);
}
|