diff options
Diffstat (limited to 'src/test/ui/compare-method/issue-90444.rs')
-rw-r--r-- | src/test/ui/compare-method/issue-90444.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/compare-method/issue-90444.rs b/src/test/ui/compare-method/issue-90444.rs new file mode 100644 index 000000000..6c287d9a7 --- /dev/null +++ b/src/test/ui/compare-method/issue-90444.rs @@ -0,0 +1,17 @@ +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() {} |