diff options
| author | bors <bors@rust-lang.org> | 2017-02-02 07:39:07 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-02-02 07:39:07 +0000 |
| commit | 6abe64871e6e9c034d2541ee731fbe7b45893f7a (patch) | |
| tree | d5bfc60a3d5dceb5eeff66e85524e8f3dcf72c0c /src/rustllvm/RustWrapper.cpp | |
| parent | 1b6b20ac173eeb9ee50077a3e7614b37299cdbb7 (diff) | |
| parent | b54f593cffc40e9d07650b36629e60c48da6b11d (diff) | |
| download | rust-6abe64871e6e9c034d2541ee731fbe7b45893f7a.tar.gz rust-6abe64871e6e9c034d2541ee731fbe7b45893f7a.zip | |
Auto merge of #39116 - mgattozzi:better-string-message, r=nrc
Add clearer error message using `&str + &str` This is the first part of #39018. One of the common things for new users coming from more dynamic languages like JavaScript, Python or Ruby is to use `+` to concatenate strings. However, this doesn't work that way in Rust unless the first type is a `String`. This commit adds a check for this use case and outputs a new error as well as a suggestion to guide the user towards the desired behavior. It also adds a new test case to test the output of the error.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
