summaryrefslogtreecommitdiffstats
path: root/tests/codegen/issues/issue-13018.rs
blob: b70ea1f48c8ceae013c7f4154de2861e15459e78 (plain)
1
2
3
4
5
6
7
8
9
10
11
// compile-flags: -O

// 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());
}