diff options
Diffstat (limited to 'tests/ui/error-codes/E0038.rs')
-rw-r--r-- | tests/ui/error-codes/E0038.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0038.rs b/tests/ui/error-codes/E0038.rs new file mode 100644 index 000000000..9757e2ab1 --- /dev/null +++ b/tests/ui/error-codes/E0038.rs @@ -0,0 +1,11 @@ +trait Trait { + fn foo(&self) -> Self; +} + +fn call_foo(x: Box<dyn Trait>) { + //~^ ERROR E0038 + let y = x.foo(); +} + +fn main() { +} |