diff options
Diffstat (limited to 'tests/ui/typeck/issue-84160.rs')
-rw-r--r-- | tests/ui/typeck/issue-84160.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/typeck/issue-84160.rs b/tests/ui/typeck/issue-84160.rs new file mode 100644 index 000000000..7b444df85 --- /dev/null +++ b/tests/ui/typeck/issue-84160.rs @@ -0,0 +1,9 @@ +fn mismatched_types_with_reference(x: &u32) -> &u32 { + if false { + return x; + } + return "test"; + //~^ERROR mismatched types +} + +fn main() {} |