diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-18819.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-18819.rs b/src/test/ui/issues/issue-18819.rs new file mode 100644 index 000000000..e634c55f8 --- /dev/null +++ b/src/test/ui/issues/issue-18819.rs @@ -0,0 +1,18 @@ +trait Foo { + type Item; +} + +struct X; + +impl Foo for X { + type Item = bool; +} + +fn print_x(_: &dyn Foo<Item=bool>, extra: &str) { + println!("{}", extra); +} + +fn main() { + print_x(X); + //~^ ERROR E0061 +} |