diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-07-10 02:28:09 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2024-07-18 00:10:48 +0000 |
| commit | be9d9618845b8edbfb110927d8deab8c636c9e59 (patch) | |
| tree | 207cdf1c20d5e822491245eef09f1e3f26f0a0cf /compiler/rustc_trait_selection/src/errors.rs | |
| parent | 032be6f7bbe091c7dfa29f115e94b9cc9bae1758 (diff) | |
| download | rust-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
