rust/compiler/rustc_typeck
Dylan DPC 5faf033f62
Rollup merge of #101676 - compiler-errors:rpitit-wf, r=lcnr
Check that the types in return position `impl Trait` in traits are well-formed

This effectively duplicates `check_associated_type_bounds`, but that shouldn't be for long, since we're going to remove it once we refactor RPITITs into regular associated items.

Fixes #101663

---

We don't check

```rust
trait Foo {
  fn bar() -> impl ?Sized;
}
```

currently, but that's for a different reason, which is that we don't currently check that a trait function's return type is sized (i.e. `fn bar() -> [u8]` also works in a trait).
2022-09-12 15:21:33 +05:30
..
src Rollup merge of #101676 - compiler-errors:rpitit-wf, r=lcnr 2022-09-12 15:21:33 +05:30
Cargo.toml
README.md

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