Esteban Küber
8895fb945d
Account for &String + String
2019-05-17 10:45:54 -07:00
Esteban Küber
ee0bf5e6aa
review comments
2019-05-16 21:09:39 -07:00
Esteban Küber
2cb91816f2
Fix binop span
2019-05-16 19:56:11 -07:00
Esteban Küber
234adf84bd
Handle more string addition cases with appropriate suggestions
2019-05-16 19:29:02 -07:00
hgallagher1993
4644c3a6aa
Add check for when left and right overlap and change span for explanation to point at operator
2019-03-28 13:54:29 -04:00
hgallagher1993
4d648ce1b9
Better diagnostic for binary operation on BoxedValues
2019-03-27 13:13:09 -04:00
Mark Rousskov
2a663555dd
Remove licenses
2018-12-25 21:08:33 -07:00
Esteban Küber
9369b52b0f
Do not suggest using to_owned()
on &str += &str
2018-07-21 22:33:32 -07:00
Guillaume Gomez
2e104a77cf
update tests
2018-03-14 00:53:24 +01:00
Vadim Petrochenkov
9f9183d34d
Fix rebase
2018-02-26 21:20:31 +03:00
Vadim Petrochenkov
7ba5fd168a
Update UI tests
2018-02-26 20:24:42 +03:00
Vadim Petrochenkov
fa2d9fc4b9
Update UI tests
2018-02-26 20:24:02 +03:00
Guillaume Gomez
5747fd6611
Update ui tests
2018-02-25 12:15:05 +01:00
Esteban Küber
20bc72e693
Handle custom diagnostic for &str + String
2018-02-20 22:46:51 -08:00
Oliver Schneider
8937d6a6cf
Merge cfail and ui tests into ui tests
2017-11-24 11:32:35 +01:00
Oliver Schneider
47c7e430d3
Remove left over dead code from suggestion diagnostic refactoring
2017-11-16 16:36:49 +01:00
Eduard-Mihai Burtescu
1a7fb7dc78
rustc_typeck: use subtyping on the LHS of binops.
2017-10-31 17:34:46 +02:00
Oliver Schneider
a9d9a4aab4
Change some helps to suggestions
2017-07-17 10:03:37 +02:00
Esteban Küber
eb478e2381
Add extra whitespace for suggestions
2017-07-06 14:36:48 -07:00
Esteban Küber
7c84914635
Make suggestion include the line number
...
When there're more than one suggestions in the same diagnostic, they are
displayed in their own block, instead of inline. In order to reduce
confusion, those blocks now display the line number.
2017-07-06 14:36:48 -07:00
Ariel Ben-Yehuda
77f4022303
Revert "Change error count messages"
...
This reverts commit 5558c64f33
.
2017-07-02 13:49:30 +03:00
Michael Kohl
5558c64f33
Change error count messages
...
See #33525 for details.
2017-05-24 16:14:38 +07:00
Oliver Schneider
3a5567bad4
Address PR comments
2017-04-25 11:07:42 +02:00
Oliver Schneider
ca701d7aeb
Simplify a suggestion for str addition
2017-04-25 11:07:42 +02:00
Oliver Schneider
b857a1a39f
Update affected tests
2017-04-25 11:04:35 +02:00
Alex Burka
9fffd14171
change span_notes to notes in E0368/E0369
2017-02-09 22:45:42 +00:00
Michael Gattozzi
b54f593cff
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.
2017-01-28 17:26:27 -05:00