diff options
| author | Michael Goulet <michael@errs.io> | 2025-01-08 17:31:40 +0000 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2025-01-09 13:55:40 +0100 |
| commit | 39daadc76ebdb97e0acf242791be129ae1003e16 (patch) | |
| tree | 1418e9ef2251a2f9c09dc3c25851cacf099f1d6b /tests/coverage/generic-unused-impl.rs | |
| parent | b6b8361bce8561fb8786ad33ca1abfdf4bc487b6 (diff) | |
| download | rust-39daadc76ebdb97e0acf242791be129ae1003e16.tar.gz rust-39daadc76ebdb97e0acf242791be129ae1003e16.zip | |
Account for identity substituted items in symbol mangling
Diffstat (limited to 'tests/coverage/generic-unused-impl.rs')
| -rw-r--r-- | tests/coverage/generic-unused-impl.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/coverage/generic-unused-impl.rs b/tests/coverage/generic-unused-impl.rs new file mode 100644 index 00000000000..e44b1ca8a1d --- /dev/null +++ b/tests/coverage/generic-unused-impl.rs @@ -0,0 +1,16 @@ +trait Foo { + type Assoc; + + fn from(s: Self::Assoc) -> Self; +} + +struct W<T>(T); + +impl<T: Foo> From<[T::Assoc; 1]> for W<T> { + fn from(from: [T::Assoc; 1]) -> Self { + let [item] = from; + W(Foo::from(item)) + } +} + +fn main() {} |
