2015-01-28 08:34:18 -05:00
|
|
|
#[derive(Debug)]
|
2018-12-16 22:21:47 -05:00
|
|
|
struct R {
|
2015-01-08 21:54:35 +11:00
|
|
|
i:isize
|
2012-11-14 01:22:37 -05:00
|
|
|
}
|
|
|
|
|
2018-12-16 22:21:47 -05:00
|
|
|
fn r(i:isize) -> R { R { i: i } }
|
2012-11-15 19:01:44 -08:00
|
|
|
|
2018-12-16 22:21:47 -05:00
|
|
|
impl Drop for R {
|
2013-09-16 21:18:07 -04:00
|
|
|
fn drop(&mut self) {}
|
2012-06-01 20:21:59 -07:00
|
|
|
}
|
2011-09-28 14:37:28 -07:00
|
|
|
|
|
|
|
fn main() {
|
2012-06-01 20:21:59 -07:00
|
|
|
// This can't make sense as it would copy the classes
|
2016-10-29 22:54:04 +01:00
|
|
|
let i = vec![r(0)];
|
|
|
|
let j = vec![r(1)];
|
2011-09-28 14:37:28 -07:00
|
|
|
let k = i + j;
|
2020-09-02 10:40:56 +03:00
|
|
|
//~^ ERROR cannot add `Vec<R>` to `Vec<R>`
|
2014-12-20 00:09:35 -08:00
|
|
|
println!("{:?}", j);
|
2011-11-18 12:39:20 +01:00
|
|
|
}
|