diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/suggestions/as-ref.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/ui/suggestions/as-ref.rs b/tests/ui/suggestions/as-ref.rs index a05353441..0d9790ac2 100644 --- a/tests/ui/suggestions/as-ref.rs +++ b/tests/ui/suggestions/as-ref.rs @@ -24,4 +24,6 @@ fn main() { let multiple_ref_result = &&Ok(Foo); multiple_ref_result.map(|arg| takes_ref(arg)); //~ ERROR mismatched types [E0308] multiple_ref_result.and_then(|arg| Ok(takes_ref(arg))); //~ ERROR mismatched types [E0308] + + let _: Result<&usize, _> = &Ok(42); //~ ERROR mismatched types [E0308] } |