about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/parser-errors.js
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-02-04 19:42:10 +0100
committerGitHub <noreply@github.com>2024-02-04 19:42:10 +0100
commitb23945c9b2f51bd4d4aecc8a4e3bfeffc7c2a896 (patch)
tree42ce6f66030b015b9e67397cf991d226875ac18e /tests/rustdoc-js-std/parser-errors.js
parent6af04583a6ede7b70b36026ecd6ba1ad9c481724 (diff)
parent44d8ecbfb85d1649a4267e33c847f79a125b99f9 (diff)
downloadrust-b23945c9b2f51bd4d4aecc8a4e3bfeffc7c2a896.tar.gz
rust-b23945c9b2f51bd4d4aecc8a4e3bfeffc7c2a896.zip
Rollup merge of #120473 - estebank:issue-114329, r=TaKO8Ki
Only suggest removal of `as_*` and `to_` conversion methods on E0308

Instead of

```
error[E0308]: mismatched types
 --> tests/ui/suggestions/only-suggest-removal-of-conversion-method-calls.rs:9:5
  |
4 | fn get_name() -> String {
  |                  ------ expected `String` because of return type
...
9 |     your_name.trim()
  |     ^^^^^^^^^^^^^^^^ expected `String`, found `&str`
  |
help: try removing the method call
  |
9 -     your_name.trim()
9 +     your_name
```

output

```
error[E0308]: mismatched types
  --> $DIR/only-suggest-removal-of-conversion-method-calls.rs:9:5
   |
LL | fn get_name() -> String {
   |                  ------ expected `String` because of return type
...
LL |     your_name.trim()
   |     ^^^^^^^^^^^^^^^^- help: try using a conversion method: `.to_string()`
   |     |
   |     expected `String`, found `&str`
```

Fix #114329.
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions