rust/compiler
Matthias Krüger b23945c9b2
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.
2024-02-04 19:42:10 +01:00
..
rustc
rustc_abi Fix rustc_abi build on stable 2024-01-16 21:15:31 +01:00
rustc_arena Fix Stable trait and its impls to work with the new with_tables 2024-01-19 09:42:51 +00:00
rustc_ast Rollup merge of #120329 - nnethercote:3349-precursors, r=fee1-dead 2024-01-26 14:43:31 +01:00
rustc_ast_lowering Rollup merge of #120428 - petrochenkov:somehir2, r=compiler-errors 2024-01-29 12:56:54 +00:00
rustc_ast_passes Stop using String for error codes. 2024-01-29 07:41:41 +11:00
rustc_ast_pretty Auto merge of #120227 - nnethercote:further-improve-space_between, r=petrochenkov 2024-01-31 02:01:43 +00:00
rustc_attr Stop using String for error codes. 2024-01-29 07:41:41 +11:00
rustc_baked_icu_data
rustc_borrowck Auto merge of #119101 - compiler-errors:outlives, r=lcnr 2024-01-30 19:22:04 +00:00
rustc_builtin_macros Rollup merge of #120342 - oli-obk:track_errors6, r=nnethercote 2024-01-30 16:57:49 +01:00
rustc_codegen_cranelift Remove the abi_amdgpu_kernel feature 2024-01-30 15:46:40 +00:00
rustc_codegen_gcc Remove the lifetime from DiagnosticArgValue. 2024-01-30 18:46:06 +11:00
rustc_codegen_llvm Rollup merge of #120495 - clubby789:remove-amdgpu-kernel, r=oli-obk 2024-01-31 12:10:53 +01:00
rustc_codegen_ssa Rollup merge of #120485 - chenyukang:yukang-add-query-instability-check, r=michaelwoerister 2024-01-30 16:57:51 +01:00
rustc_const_eval Rollup merge of #120488 - nnethercote:diag-lifetimes, r=oli-obk 2024-01-30 11:19:20 +01:00
rustc_data_structures Remove unused features 2024-01-25 14:01:33 +00:00
rustc_driver
rustc_driver_impl Stop using String for error codes. 2024-01-29 07:41:41 +11:00
rustc_error_codes Stop using String for error codes. 2024-01-29 07:41:41 +11:00
rustc_error_messages Remove unused features 2024-01-25 14:01:33 +00:00
rustc_errors Don't hash lints differently to non-lints. 2024-01-31 08:25:29 +11:00
rustc_expand Rollup merge of #120342 - oli-obk:track_errors6, r=nnethercote 2024-01-30 16:57:49 +01:00
rustc_feature Remove the abi_amdgpu_kernel feature 2024-01-30 15:46:40 +00:00
rustc_fluent_macro annotate-snippets: update to 0.10 2024-01-07 16:53:32 +03:00
rustc_fs_util
rustc_graphviz
rustc_hir hir: Use InferArg in ArrayLen::Infer 2024-01-28 02:04:39 +03:00
rustc_hir_analysis On E0277 be clearer about implicit Sized bounds on type params and assoc types 2024-02-01 03:30:26 +00:00
rustc_hir_pretty hir: Use InferArg in ArrayLen::Infer 2024-01-28 02:04:39 +03:00
rustc_hir_typeck Rollup merge of #120473 - estebank:issue-114329, r=TaKO8Ki 2024-02-04 19:42:10 +01:00
rustc_incremental hir: Simplify hir_owner_nodes query 2024-01-30 15:00:52 +03:00
rustc_index Auto merge of #120024 - Mark-Simulacrum:fast-union-merge, r=cjgillot 2024-01-27 22:26:37 +00:00
rustc_index_macros Restrict access to the private field of newtype indexes 2024-01-19 15:38:47 +00:00
rustc_infer Auto merge of #120346 - petrochenkov:ownodes, r=oli-obk 2024-01-31 05:37:49 +00:00
rustc_interface Remove unused features 2024-01-25 14:01:33 +00:00
rustc_lexer Use unescape_unicode for raw C string literals. 2024-01-25 12:28:11 +11:00
rustc_lint Auto merge of #120346 - petrochenkov:ownodes, r=oli-obk 2024-01-31 05:37:49 +00:00
rustc_lint_defs Rollup merge of #119948 - asquared31415:unsafe_op_in_unsafe_fn_fix, r=TaKO8Ki 2024-01-22 16:13:28 +01:00
rustc_llvm Revert "Auto merge of #113923 - DianQK:restore-no-builtins-lto, r=pnkfelix" 2024-01-12 18:23:04 +08:00
rustc_log
rustc_macros Rollup merge of #120475 - Nilstrieb:cargo-build-my-a-, r=michaelwoerister 2024-01-30 16:57:50 +01:00
rustc_metadata Remove the lifetime from DiagnosticArgValue. 2024-01-30 18:46:06 +11:00
rustc_middle Rollup merge of #120495 - clubby789:remove-amdgpu-kernel, r=oli-obk 2024-01-31 12:10:53 +01:00
rustc_mir_build Auto merge of #120346 - petrochenkov:ownodes, r=oli-obk 2024-01-31 05:37:49 +00:00
rustc_mir_dataflow Remove unused features 2024-01-25 14:01:33 +00:00
rustc_mir_transform Rollup merge of #120495 - clubby789:remove-amdgpu-kernel, r=oli-obk 2024-01-31 12:10:53 +01:00
rustc_monomorphize Remove unused features 2024-01-25 14:01:33 +00:00
rustc_next_trait_solver Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
rustc_parse Rollup merge of #120460 - nnethercote:fix-120397, r=compiler-errors 2024-01-30 11:19:19 +01:00
rustc_parse_format Rename the unescaping functions. 2024-01-25 12:28:11 +11:00
rustc_passes Rollup merge of #120472 - Nilstrieb:die, r=compiler-errors 2024-01-31 12:10:52 +01:00
rustc_pattern_analysis Separate PlaceCtxt from UsefulnessCtxt 2024-01-30 17:07:06 +01:00
rustc_privacy Stop using String for error codes. 2024-01-29 07:41:41 +11:00
rustc_query_impl Remove unused features 2024-01-25 14:01:33 +00:00
rustc_query_system Stop using String for error codes. 2024-01-29 07:41:41 +11:00
rustc_resolve Rollup merge of #118533 - chenyukang:yukang-fix-118455, r=petrochenkov 2024-01-30 16:57:46 +01:00
rustc_serialize Remove unused features 2024-01-25 14:01:33 +00:00
rustc_session Remove the lifetime from DiagnosticArgValue. 2024-01-30 18:46:06 +11:00
rustc_smir Remove the abi_amdgpu_kernel feature 2024-01-30 15:46:40 +00:00
rustc_span Rollup merge of #120434 - fmease:revert-speeder, r=petrochenkov 2024-01-30 16:57:49 +01:00
rustc_symbol_mangling Auto merge of #118636 - h1467792822:dev, r=michaelwoerister 2024-01-27 02:32:30 +00:00
rustc_target Rollup merge of #120495 - clubby789:remove-amdgpu-kernel, r=oli-obk 2024-01-31 12:10:53 +01:00
rustc_trait_selection review comment: change wording 2024-02-01 03:31:03 +00:00
rustc_traits Remove unused features 2024-01-25 14:01:33 +00:00
rustc_transmute Remove unused features 2024-01-25 14:01:33 +00:00
rustc_ty_utils Remove the abi_amdgpu_kernel feature 2024-01-30 15:46:40 +00:00
rustc_type_ir Restrict access to the private field of newtype indexes 2024-01-19 15:38:47 +00:00
stable_mir Remove the abi_amdgpu_kernel feature 2024-01-30 15:46:40 +00:00