diff options
| author | bors <bors@rust-lang.org> | 2017-04-10 21:56:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-04-10 21:56:13 +0000 |
| commit | 730e5ad04e23f30cc24e4b87dfd5da807325e243 (patch) | |
| tree | ffaa2707a389f266128ffda4b87264935ae750d6 /src/test/ui/span | |
| parent | 3b5754e5ce73d24c6684b3ed0c68a557dfdd2f52 (diff) | |
| parent | be8787dfe564cf315a9343a84724130da322e805 (diff) | |
Auto merge of #40565 - estebank:binops-help, r=arielb1
Explicit help message for binop type mismatch
When trying to do `1 + Some(2)`, or some other binary operation on two
types different types without an appropriate trait implementation, provide
an explicit help message:
```rust
help: `{integer} + std::option::Option<{integer}>` has no implementation
```
Re: #39579, #38564, #37626, #39942, #34698.
Diffstat (limited to 'src/test/ui/span')
| -rw-r--r-- | src/test/ui/span/multiline-span-simple.stderr | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/test/ui/span/multiline-span-simple.stderr b/src/test/ui/span/multiline-span-simple.stderr index 85c11c05b9f..161b6ca48b2 100644 --- a/src/test/ui/span/multiline-span-simple.stderr +++ b/src/test/ui/span/multiline-span-simple.stderr @@ -9,11 +9,7 @@ error[E0277]: the trait bound `u32: std::ops::Add<()>` is not satisfied 27 | | y), | |______________^ ...ending here: the trait `std::ops::Add<()>` is not implemented for `u32` | - = help: the following implementations were found: - <u32 as std::ops::Add> - <&'a u32 as std::ops::Add<u32>> - <u32 as std::ops::Add<&'a u32>> - <&'b u32 as std::ops::Add<&'a u32>> + = note: no implementation for `u32 + ()` error: aborting due to previous error |
