rust/compiler/rustc_typeck
Oli Scherer 64c5b9a3d6 Add backcompat hack to support
```rust
fn foo() -> impl MyTrait {
    panic!();
    MyStruct
}

struct MyStruct;
trait MyTrait {}

impl MyTrait for MyStruct {}
```
2022-02-02 15:40:11 +00:00
..
2022-02-02 15:40:11 +00:00

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.