rust/compiler/rustc_trait_selection
Dylan DPC b5ffbd32d4
Rollup merge of #101424 - compiler-errors:operator-err-sugg, r=TaKO8Ki
Adjust and slightly generalize operator error suggestion

(in no particular order)
* Stop passing around a whole extra `ProjectionPredicate`
* Add spaces around `=` in `Trait<..., Output = Ty>` suggestion
* Some code clean-ups, including
    * add `lang_item_for_op` to turn a `Op` into a `DefId`
    * avoid `SourceMap` because we don't really need to render an expr
    * Remove `TypeParamVisitor` in favor of just checking `ty.has_param_types_or_consts` -- this acts a bit differently, but shouldn't cause erroneous suggestions (actually might generalize them a bit)
* We now suggest `Output = Ty` in the `where` clause suggestion when we fail to add `Struct<T>` and `T`.

I can split this out into more PRs if needed, but they're all just miscellaneous generalizations, changes, and nitpicks I saw when messing with this operator code.
2022-09-08 20:48:34 +05:30
..
src Rollup merge of #101424 - compiler-errors:operator-err-sugg, r=TaKO8Ki 2022-09-08 20:48:34 +05:30
Cargo.toml Initial (incomplete) implementation of transmutability trait. 2022-07-27 17:33:56 +00:00