diff options
Diffstat (limited to 'tests/ui/dyn-compatibility/erroneous_signature.rs')
| -rw-r--r-- | tests/ui/dyn-compatibility/erroneous_signature.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/dyn-compatibility/erroneous_signature.rs b/tests/ui/dyn-compatibility/erroneous_signature.rs new file mode 100644 index 00000000000..cc1841cc4b2 --- /dev/null +++ b/tests/ui/dyn-compatibility/erroneous_signature.rs @@ -0,0 +1,17 @@ +trait Foo { + fn err(&self) -> MissingType; + //~^ ERROR cannot find type `MissingType` in this scope +} + +impl Foo for i32 { + fn err(&self) -> MissingType { + //~^ ERROR cannot find type `MissingType` in this scope + 0 + } +} + +fn coerce(x: &i32) -> &dyn Foo { + x +} + +fn main() {} |
