From 631cd5845e8de329d0e227aaa707d7ea228b8f8f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:20:29 +0200 Subject: Merging upstream version 1.70.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/codegen-units/polymorphization/auxiliary/poly-dep.rs | 4 ++++ tests/codegen-units/polymorphization/poly-foreign.rs | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100644 tests/codegen-units/polymorphization/auxiliary/poly-dep.rs create mode 100644 tests/codegen-units/polymorphization/poly-foreign.rs (limited to 'tests/codegen-units') diff --git a/tests/codegen-units/polymorphization/auxiliary/poly-dep.rs b/tests/codegen-units/polymorphization/auxiliary/poly-dep.rs new file mode 100644 index 000000000..fdbfa1b09 --- /dev/null +++ b/tests/codegen-units/polymorphization/auxiliary/poly-dep.rs @@ -0,0 +1,4 @@ +// compile-flags: -Zpolymorphize=on + +#[inline(never)] +pub fn foo() {} diff --git a/tests/codegen-units/polymorphization/poly-foreign.rs b/tests/codegen-units/polymorphization/poly-foreign.rs new file mode 100644 index 000000000..9da082daf --- /dev/null +++ b/tests/codegen-units/polymorphization/poly-foreign.rs @@ -0,0 +1,11 @@ +// aux-build:poly-dep.rs +// compile-flags: --crate-type=lib -Zprint-mono-items=eager -Zpolymorphize=on + +extern crate poly_dep; + +pub static FN1: fn() = poly_dep::foo::; +pub static FN2: fn() = poly_dep::foo::; + +//~ MONO_ITEM static FN1 +//~ MONO_ITEM static FN2 +//~ MONO_ITEM fn poly_dep::foo:: -- cgit v1.2.3