rust/tests/ui/issues/issue-60989.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
308 B
Rust
Raw Normal View History

struct A {}
struct B {}
impl From<A> for B {
fn from(a: A) -> B {
B{}
}
}
fn main() {
let c1 = ();
c1::<()>;
2022-06-01 23:55:30 +00:00
//~^ ERROR type arguments are not allowed on local variable
let c1 = A {};
2019-05-28 18:46:13 +00:00
c1::<dyn Into<B>>;
2022-06-01 23:55:30 +00:00
//~^ ERROR type arguments are not allowed on local variable
}