about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDmytro Shynkevych <dm.shynk@gmail.com>2018-08-19 06:07:04 -0400
committerDmytro Shynkevych <dm.shynk@gmail.com>2018-08-19 09:14:06 -0400
commit85b92c1df1b8c1003ea6f6544b21b028e50881f7 (patch)
tree04668a1f3e98c8bf38bc33bb5d68b57e34497461
parent4e17fbde0b02b0b818b9a6c6fcf2d18eb02622d8 (diff)
downloadrust-85b92c1df1b8c1003ea6f6544b21b028e50881f7.tar.gz
rust-85b92c1df1b8c1003ea6f6544b21b028e50881f7.zip
Added test
-rw-r--r--src/test/codegen/issue-53080.rs19
m---------src/tools/lld0
2 files changed, 19 insertions, 0 deletions
diff --git a/src/test/codegen/issue-53080.rs b/src/test/codegen/issue-53080.rs
new file mode 100644
index 00000000000..9289fb3b295
--- /dev/null
+++ b/src/test/codegen/issue-53080.rs
@@ -0,0 +1,19 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// 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());
+}
diff --git a/src/tools/lld b/src/tools/lld
-Subproject 8214ccf861d538671b0a1436dbf4538dc4a64d0
+Subproject f76ea3ca16ed22dde8ef929db74a4b4df6f2f89