about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2024-04-23 17:25:14 +0200
committerGitHub <noreply@github.com>2024-04-23 17:25:14 +0200
commit68939f78267f0d0d3dcb614d760b6638a33573a5 (patch)
treef03764e91caa1661f54d8e3c5a7f64796bc426bb /compiler/rustc_middle/src
parent80f2b91b20a445b553b3dd3958624fc6ed1b08a1 (diff)
parentf7ebad494ca7238047d3e64b59da356c5b268985 (diff)
downloadrust-68939f78267f0d0d3dcb614d760b6638a33573a5.tar.gz
rust-68939f78267f0d0d3dcb614d760b6638a33573a5.zip
Rollup merge of #122591 - gurry:122162-impl-type-binding-suggestion, r=fmease
Suggest using type args directly instead of equality constraint

When type arguments are written erroneously using an equality constraint we suggest specifying them directly without the equality constraint.

Fixes #122162

Changes the diagnostic in the issue from:
```rust
error[E0229]: associated type bindings are not allowed here
9 | impl std::cmp::PartialEq<Rhs = T> for S {
  |                          ^^^^^^^ associated type not allowed here
  |
```
to
```rust
error[E0229]: associated type bindings are not allowed here
9 | impl std::cmp::PartialEq<Rhs = T> for S {
  |                          ^^^^^^^ associated type not allowed here
  |
help: to use `T` as a generic argument specify it directly
  |
  |      impl std::cmp::PartialEq<T> for S {
  |                               ~
```
Diffstat (limited to 'compiler/rustc_middle/src')
0 files changed, 0 insertions, 0 deletions