mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
19 lines
308 B
Rust
19 lines
308 B
Rust
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
|
|
}
|