mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
13 lines
225 B
Rust
13 lines
225 B
Rust
// 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 {
|
|
()
|
|
};
|
|
}
|