diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-02-04 19:42:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-04 19:42:10 +0100 |
| commit | b23945c9b2f51bd4d4aecc8a4e3bfeffc7c2a896 (patch) | |
| tree | 42ce6f66030b015b9e67397cf991d226875ac18e /tests/rustdoc-js-std/parser-errors.js | |
| parent | 6af04583a6ede7b70b36026ecd6ba1ad9c481724 (diff) | |
| parent | 44d8ecbfb85d1649a4267e33c847f79a125b99f9 (diff) | |
| download | rust-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
