From f32447d54138e9f42ba5a729550603573913397f Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sun, 16 Feb 2020 02:54:16 +0900 Subject: [PATCH] Add test for issue-51798 --- src/test/ui/issues/auxiliary/issue-51798.rs | 3 +++ src/test/ui/issues/issue-51798.rs | 14 ++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 src/test/ui/issues/auxiliary/issue-51798.rs create mode 100644 src/test/ui/issues/issue-51798.rs diff --git a/src/test/ui/issues/auxiliary/issue-51798.rs b/src/test/ui/issues/auxiliary/issue-51798.rs new file mode 100644 index 00000000000..fef5213db9f --- /dev/null +++ b/src/test/ui/issues/auxiliary/issue-51798.rs @@ -0,0 +1,3 @@ +#![crate_type = "lib"] + +pub fn vec() -> Vec { vec![] } diff --git a/src/test/ui/issues/issue-51798.rs b/src/test/ui/issues/issue-51798.rs new file mode 100644 index 00000000000..b075809e93a --- /dev/null +++ b/src/test/ui/issues/issue-51798.rs @@ -0,0 +1,14 @@ +// edition:2018 +// aux-build:issue-51798.rs +// check-pass + +extern crate issue_51798; + +mod server { + fn f() { + let mut v = issue_51798::vec(); + v.clear(); + } +} + +fn main() {}