diff options
| author | lcnr <rust@lcnr.de> | 2025-05-09 02:35:18 +0000 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2025-05-09 02:35:18 +0000 |
| commit | 9eac7a3e04a727bcbdb14826c6520210b3ca1d2e (patch) | |
| tree | 6fc8ff2cc2731cdb8cd9ed4a22a8ecb5ac3fbc23 /tests/ui/impl-trait/issues/issue-55872.rs | |
| parent | 667247db71ea18c4130dd018d060e7f09d589490 (diff) | |
| download | rust-9eac7a3e04a727bcbdb14826c6520210b3ca1d2e.tar.gz rust-9eac7a3e04a727bcbdb14826c6520210b3ca1d2e.zip | |
move (and remove) impl Trait tests
Diffstat (limited to 'tests/ui/impl-trait/issues/issue-55872.rs')
| -rw-r--r-- | tests/ui/impl-trait/issues/issue-55872.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/issues/issue-55872.rs b/tests/ui/impl-trait/issues/issue-55872.rs new file mode 100644 index 00000000000..b76f8182b20 --- /dev/null +++ b/tests/ui/impl-trait/issues/issue-55872.rs @@ -0,0 +1,18 @@ +#![feature(impl_trait_in_assoc_type)] + +pub trait Bar { + type E: Copy; + + fn foo<T>() -> Self::E; +} + +impl<S> Bar for S { + type E = impl Copy; + + fn foo<T>() -> Self::E { + //~^ ERROR type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias + || () + } +} + +fn main() {} |
