2018-08-20 10:13:45 -05:00
|
|
|
// compile-flags: -O
|
|
|
|
|
2018-08-19 05:07:04 -05:00
|
|
|
// A drop([...].clone()) sequence on an Rc should be a no-op
|
|
|
|
// In particular, no call to __rust_dealloc should be emitted
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
use std::rc::Rc;
|
|
|
|
|
|
|
|
pub fn foo(t: &Rc<Vec<usize>>) {
|
|
|
|
// CHECK-NOT: __rust_dealloc
|
|
|
|
drop(t.clone());
|
|
|
|
}
|