about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/constructor.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-07-18 08:09:02 +0200
committerGitHub <noreply@github.com>2024-07-18 08:09:02 +0200
commitd78be31a2ae54027439dc638d7d781011ac6f0ab (patch)
treead6de06929d855e3fce1af4ddd073a7a680af605 /compiler/rustc_pattern_analysis/src/constructor.rs
parentb52883decfbaf8f63d4c7664cb8550d482fd54dc (diff)
parentbe9d9618845b8edbfb110927d8deab8c636c9e59 (diff)
downloadrust-d78be31a2ae54027439dc638d7d781011ac6f0ab.tar.gz
rust-d78be31a2ae54027439dc638d7d781011ac6f0ab.zip
Rollup merge of #127888 - estebank:type-param-sugg, r=compiler-errors
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_pattern_analysis/src/constructor.rs')
0 files changed, 0 insertions, 0 deletions