1
Fork 0
rust/compiler/rustc_typeck
bors 37a42258ff Auto merge of #97778 - compiler-errors:misc-diagnostics-tidy, r=cjgillot
Tidy up miscellaneous bounds suggestions

Just some small fixes to suggestions

- Generalizes `Ty::is_suggestable` into a `TypeVisitor`, so that it can be called on things other than `Ty`
- Makes `impl Trait` in arg position no longer suggestible (generalizing the fix in #97640)
- Fixes `impl Trait` not being replaced with fresh type param when it's deeply nested in function signature (fixes #97760)
- Fixes some poor handling of `where` clauses with no predicates (also #97760)
- Uses `InferCtxt::resolve_numeric_literals_with_default` so we suggest `i32` instead of `{integer}` (fixes #97677)

Sorry there aren't many tests the fixes. Most of them would just be duplicates of other tests with empty `where` clauses or `impl Trait` in arg position instead of generic params. Let me know if you'd want more test coverage.
2022-06-12 00:47:54 +00:00
..
src Auto merge of #97778 - compiler-errors:misc-diagnostics-tidy, r=cjgillot 2022-06-12 00:47:54 +00:00
Cargo.toml Initial fixes on top of type interner commit 2022-05-28 11:38:22 -07:00
README.md

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