summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-1871.rs
blob: f7a2bdd565989fa2f33eed20f13f0f5eaebbdff1 (plain)
1
2
3
4
5
6
7
8
9
10
11
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 {
      ()
  };
}