From 7b6e527f440cd7e6f8be2b07cee320ee6ca18786 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 29 Apr 2024 06:41:38 +0200 Subject: Adding upstream version 1.0.1. Signed-off-by: Daniel Baumann --- test cases/rust/7 private crate collision/meson.build | 5 +++++ test cases/rust/7 private crate collision/prog.rs | 3 +++ test cases/rust/7 private crate collision/rand.rs | 4 ++++ test cases/rust/7 private crate collision/test.json | 7 +++++++ 4 files changed, 19 insertions(+) create mode 100644 test cases/rust/7 private crate collision/meson.build create mode 100644 test cases/rust/7 private crate collision/prog.rs create mode 100644 test cases/rust/7 private crate collision/rand.rs create mode 100644 test cases/rust/7 private crate collision/test.json (limited to 'test cases/rust/7 private crate collision') diff --git a/test cases/rust/7 private crate collision/meson.build b/test cases/rust/7 private crate collision/meson.build new file mode 100644 index 0000000..81b6aab --- /dev/null +++ b/test cases/rust/7 private crate collision/meson.build @@ -0,0 +1,5 @@ +project('rust private crate collision', 'rust') + +l = static_library('rand', 'rand.rs', install : true) +e = executable('prog', 'prog.rs', link_with : l, install : true) +test('linktest', e) diff --git a/test cases/rust/7 private crate collision/prog.rs b/test cases/rust/7 private crate collision/prog.rs new file mode 100644 index 0000000..b9a30f1 --- /dev/null +++ b/test cases/rust/7 private crate collision/prog.rs @@ -0,0 +1,3 @@ +extern crate rand; + +fn main() { println!("printing: {}", rand::explore()); } diff --git a/test cases/rust/7 private crate collision/rand.rs b/test cases/rust/7 private crate collision/rand.rs new file mode 100644 index 0000000..8a3d427 --- /dev/null +++ b/test cases/rust/7 private crate collision/rand.rs @@ -0,0 +1,4 @@ +// use a name that collides with one of the rustc_private libraries +#![crate_name = "rand"] + +pub fn explore() -> &'static str { "librarystring" } diff --git a/test cases/rust/7 private crate collision/test.json b/test cases/rust/7 private crate collision/test.json new file mode 100644 index 0000000..e35f6ff --- /dev/null +++ b/test cases/rust/7 private crate collision/test.json @@ -0,0 +1,7 @@ +{ + "installed": [ + {"type": "exe", "file": "usr/bin/prog"}, + {"type": "pdb", "file": "usr/bin/prog"}, + {"type": "file", "file": "usr/lib/librand.rlib"} + ] +} -- cgit v1.2.3