about summary refs log tree commit diff
path: root/tests/codegen/issues/issue-13018.rs
blob: d0a8ce159118367220833c8652fd3ecde4b4e69c (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());
}