mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
b5ffbd32d4
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. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |