rust/tests/ui/compare-method/issue-90444.rs

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

18 lines
387 B
Rust
Raw Normal View History

2021-11-06 05:32:11 -05:00
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() {}