about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/errors.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2024-07-10 02:28:09 +0000
committerEsteban Küber <esteban@kuber.com.ar>2024-07-18 00:10:48 +0000
commitbe9d9618845b8edbfb110927d8deab8c636c9e59 (patch)
tree207cdf1c20d5e822491245eef09f1e3f26f0a0cf /compiler/rustc_trait_selection/src/errors.rs
parent032be6f7bbe091c7dfa29f115e94b9cc9bae1758 (diff)
downloadrust-be9d9618845b8edbfb110927d8deab8c636c9e59.tar.gz
rust-be9d9618845b8edbfb110927d8deab8c636c9e59.zip
More accurate span for type parameter suggestion
After:

```
error[E0229]: associated item constraints are not allowed here
  --> $DIR/impl-block-params-declared-in-wrong-spot-issue-113073.rs:3:10
   |
LL | impl Foo<T: Default> for String {}
   |          ^^^^^^^^^^ associated item constraint not allowed here
   |
help: declare the type parameter right after the `impl` keyword
   |
LL - impl Foo<T: Default> for String {}
LL + impl<T: Default> Foo<T> for String {}
   |
```

Before:

```
error[E0229]: associated item constraints are not allowed here
  --> $DIR/impl-block-params-declared-in-wrong-spot-issue-113073.rs:3:10
   |
LL | impl Foo<T: Default> for String {}
   |          ^^^^^^^^^^ associated item constraint not allowed here
   |
help: declare the type parameter right after the `impl` keyword
   |
LL | impl<T: Default> Foo<T> for String {}
   |     ++++++++++++     ~
```
Diffstat (limited to 'compiler/rustc_trait_selection/src/errors.rs')
0 files changed, 0 insertions, 0 deletions