rust/compiler/rustc_trait_selection/src
Matthias Krüger b5955e74e8
Rollup merge of #138126 - compiler-errors:rtn-for-sugg, r=oli-obk
Add an opt-out in pretty printing for RTN rendering

Today, we render RPITIT types like `impl Sized { T::method(..) }` when RTN is enabled. This is very useful for diagnostics, since it's often not clear what the `impl Sized` type means by itself, and it makes it clear that that's an RPITIT that can be bounded using RTN syntax. See #115624.

However, since we don't distinguish types that are rendered for the purposes of printing messages vs suggestions, this representation leaks into suggestions and turns into code that can't be parsed. This PR adds a new `with_types_for_suggestion! {}` and `with_types_for_signature! {}` options to the pretty printing architecture to make it clear that we're rendering a type for code suggestions.

This can be applied later as we find that we need it.
2025-03-13 17:44:04 +01:00
..
error_reporting Rollup merge of #138126 - compiler-errors:rtn-for-sugg, r=oli-obk 2025-03-13 17:44:04 +01:00
errors Teach structured errors to display short Ty 2025-02-25 16:56:03 +00:00
solve change definitely non-productive cycles to error 2025-03-05 10:06:43 +01:00
traits Auto merge of #138249 - compiler-errors:auto-self, r=lcnr 2025-03-13 05:37:55 +00:00
errors.rs Teach structured errors to display short Ty 2025-02-25 16:56:03 +00:00
infer.rs Add UseCloned trait related code 2025-03-06 17:58:32 -03:00
lib.rs Remove #![warn(unreachable_pub)] from all compiler/ crates. 2025-03-11 13:14:21 +11:00
regions.rs Only use implied bounds hack if bevy, and use deeply normalize in implied bounds hack 2025-03-04 18:18:48 +00:00
solve.rs impossible obligations check fast path 2024-10-10 06:09:50 -04:00