diff options
| author | Robin Appelman <robin@icewind.nl> | 2022-03-27 20:45:08 +0200 |
|---|---|---|
| committer | Robin Appelman <robin@icewind.nl> | 2022-04-17 00:44:36 +0200 |
| commit | decc04dbfbfe240e649cd4f891ca14d2f501c0ff (patch) | |
| tree | 8c1adf1392bf09a02ddca5c0ce7ad8df20809a4a /src/test/ui/error-codes/E0107.rs | |
| parent | 878c7833f6c1ff10e2fd89074e5bd4ef5ff15936 (diff) | |
| download | rust-decc04dbfbfe240e649cd4f891ca14d2f501c0ff.tar.gz rust-decc04dbfbfe240e649cd4f891ca14d2f501c0ff.zip | |
show suggestion to replace generic bounds with associated types in more cases
Diffstat (limited to 'src/test/ui/error-codes/E0107.rs')
| -rw-r--r-- | src/test/ui/error-codes/E0107.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/error-codes/E0107.rs b/src/test/ui/error-codes/E0107.rs index 840700c9cc6..d369fc2a565 100644 --- a/src/test/ui/error-codes/E0107.rs +++ b/src/test/ui/error-codes/E0107.rs @@ -47,4 +47,14 @@ struct Baz<'a, 'b, 'c> { //~| HELP remove this lifetime argument } +pub trait T { + type A; + type B; +} + +fn trait_bound_generic<I: T<u8, u16>>(_i: I) { + //~^ ERROR this trait takes 0 generic arguments + //~| HELP replace the generic bounds with the associated types +} + fn main() {} |
