diff options
Diffstat (limited to 'tests/ui/issues/issue-1871.rs')
-rw-r--r-- | tests/ui/issues/issue-1871.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-1871.rs b/tests/ui/issues/issue-1871.rs new file mode 100644 index 000000000..f7a2bdd56 --- /dev/null +++ b/tests/ui/issues/issue-1871.rs @@ -0,0 +1,12 @@ +// Tests that we don't generate a spurious error about f.honk's type +// being undeterminable +fn main() { + let f = 42; + + let _g = if f < 5 { + f.honk() //~ ERROR no method named `honk` found + } + else { + () + }; +} |