diff options
| author | Michael Goulet <michael@errs.io> | 2023-03-14 00:35:34 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-03-14 16:33:12 +0000 |
| commit | ee2d42882f9d76b8fb54d749c35fec265026db47 (patch) | |
| tree | b117273d26f91c0a56e227d025df507340c82fd2 /tests/codegen-units/polymorphization | |
| parent | f1b1ed7e18f1fbe5226a96626827c625985f8285 (diff) | |
| download | rust-ee2d42882f9d76b8fb54d749c35fec265026db47.tar.gz rust-ee2d42882f9d76b8fb54d749c35fec265026db47.zip | |
Use `unused_generic_params` from crate metadata
Diffstat (limited to 'tests/codegen-units/polymorphization')
| -rw-r--r-- | tests/codegen-units/polymorphization/auxiliary/poly-dep.rs | 4 | ||||
| -rw-r--r-- | tests/codegen-units/polymorphization/poly-foreign.rs | 11 |
2 files changed, 15 insertions, 0 deletions
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 00000000000..fdbfa1b096d --- /dev/null +++ b/tests/codegen-units/polymorphization/auxiliary/poly-dep.rs @@ -0,0 +1,4 @@ +// compile-flags: -Zpolymorphize=on + +#[inline(never)] +pub fn foo<T>() {} diff --git a/tests/codegen-units/polymorphization/poly-foreign.rs b/tests/codegen-units/polymorphization/poly-foreign.rs new file mode 100644 index 00000000000..9da082daf11 --- /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::<i32>; +pub static FN2: fn() = poly_dep::foo::<u32>; + +//~ MONO_ITEM static FN1 +//~ MONO_ITEM static FN2 +//~ MONO_ITEM fn poly_dep::foo::<T> |
