diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-60989.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-60989.rs b/src/test/ui/issues/issue-60989.rs new file mode 100644 index 000000000..29db3fdb4 --- /dev/null +++ b/src/test/ui/issues/issue-60989.rs @@ -0,0 +1,18 @@ +struct A {} +struct B {} + +impl From<A> for B { + fn from(a: A) -> B { + B{} + } +} + +fn main() { + let c1 = (); + c1::<()>; + //~^ ERROR type arguments are not allowed on local variable + + let c1 = A {}; + c1::<dyn Into<B>>; + //~^ ERROR type arguments are not allowed on local variable +} |