commit | b23945c9b2f51bd4d4aecc8a4e3bfeffc7c2a896 | [log] [tgz] |
---|---|---|
author | Matthias Krüger <matthias.krueger@famsik.de> | Sun Feb 04 19:42:10 2024 +0100 |
committer | GitHub <noreply@github.com> | Sun Feb 04 19:42:10 2024 +0100 |
tree | 42ce6f66030b015b9e67397cf991d226875ac18e | |
parent | 6af04583a6ede7b70b36026ecd6ba1ad9c481724 [diff] | |
parent | 44d8ecbfb85d1649a4267e33c847f79a125b99f9 [diff] |
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.
This is the main source code repository for Rust. It contains the compiler, standard library, and documentation.
Note: this README is for users rather than contributors. If you wish to contribute to the compiler, you should read CONTRIBUTING.md instead.
Read “Installation” from The Book.
If you really want to install from source (though this is not recommended), see INSTALL.md.
See https://www.rust-lang.org/community for a list of chat platforms and forums.
See CONTRIBUTING.md.
Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.
See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.
The Rust Foundation owns and protects the Rust and Cargo trademarks and logos (the “Rust Trademarks”).
If you want to use these names or brands, please read the media guide.
Third-party logos may be subject to third-party copyrights and trademarks. See Licenses for details.