]> git.lizzy.rs Git - rust.git/blob - src/test/ui/never_type/issue-2149.stderr
Rollup merge of #102118 - notriddle:notriddle/line-numbers, r=GuillaumeGomez
[rust.git] / src / test / ui / never_type / issue-2149.stderr
1 error[E0277]: cannot add `Vec<B>` to `()`
2   --> $DIR/issue-2149.rs:8:33
3    |
4 LL |         for elt in self { r = r + f(*elt); }
5    |                                 ^ no implementation for `() + Vec<B>`
6    |
7    = help: the trait `Add<Vec<B>>` is not implemented for `()`
8
9 error[E0599]: no method named `bind` found for array `[&str; 1]` in the current scope
10   --> $DIR/issue-2149.rs:13:12
11    |
12 LL |     ["hi"].bind(|x| [x] );
13    |            ^^^^ method not found in `[&str; 1]`
14    |
15    = help: items from traits can only be used if the trait is implemented and in scope
16 note: `VecMonad` defines an item `bind`, perhaps you need to implement it
17   --> $DIR/issue-2149.rs:1:1
18    |
19 LL | trait VecMonad<A> {
20    | ^^^^^^^^^^^^^^^^^
21
22 error: aborting due to 2 previous errors
23
24 Some errors have detailed explanations: E0277, E0599.
25 For more information about an error, try `rustc --explain E0277`.