mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
18 lines
387 B
Rust
18 lines
387 B
Rust
pub struct A;
|
|
impl From<fn((), (), &())> for A {
|
|
fn from(_: fn((), (), &mut ())) -> Self {
|
|
//~^ error: method `from` has an incompatible type for trait
|
|
loop {}
|
|
}
|
|
}
|
|
|
|
pub struct B;
|
|
impl From<fn((), (), u32)> for B {
|
|
fn from(_: fn((), (), u64)) -> Self {
|
|
//~^ error: method `from` has an incompatible type for trait
|
|
loop {}
|
|
}
|
|
}
|
|
|
|
fn main() {}
|