]> git.lizzy.rs Git - rust.git/commitdiff
Merge #4412
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>
Sun, 10 May 2020 14:48:04 +0000 (14:48 +0000)
committerGitHub <noreply@github.com>
Sun, 10 May 2020 14:48:04 +0000 (14:48 +0000)
4412: infer: Make expected rhs type for plain assign the lhs type r=flodiebold a=kiljacken

This fixes an issue where the following code sample would fail to infer
the type contained in the option:
```rust
fn main() {
    let mut end = None; // Was Option<{unknown}>, is now Option<bool>
    loop {
        end = Some(true);
    }
}
```

Co-authored-by: Emil Lauridsen <mine809@gmail.com>

Trivial merge