|
| 1 | +error[E0283]: type annotations needed |
| 2 | + --> $DIR/appropriate-type-param-turbofish.rs:3:35 |
| 3 | + | |
| 4 | +LL | vec![1, 2, 3].into_iter().collect(); |
| 5 | + | ^^^^^^^ cannot infer type for type parameter `B` declared on the associated function `collect` |
| 6 | + | |
| 7 | + = note: cannot satisfy `_: std::iter::FromIterator<i32>` |
| 8 | +help: consider specifying the type argument in the method call |
| 9 | + | |
| 10 | +LL | vec![1, 2, 3].into_iter().collect::<B>(); |
| 11 | + | ^^^^^ |
| 12 | + |
| 13 | +error[E0283]: type annotations needed |
| 14 | + --> $DIR/appropriate-type-param-turbofish.rs:6:41 |
| 15 | + | |
| 16 | +LL | vec!["a", "b", "c"].into_iter().collect(); |
| 17 | + | ^^^^^^^ cannot infer type for type parameter `B` declared on the associated function `collect` |
| 18 | + | |
| 19 | + = note: cannot satisfy `_: std::iter::FromIterator<&str>` |
| 20 | +help: consider specifying the type argument in the method call |
| 21 | + | |
| 22 | +LL | vec!["a", "b", "c"].into_iter().collect::<B>(); |
| 23 | + | ^^^^^ |
| 24 | + |
| 25 | +error[E0283]: type annotations needed |
| 26 | + --> $DIR/appropriate-type-param-turbofish.rs:9:41 |
| 27 | + | |
| 28 | +LL | vec!['a', 'b', 'c'].into_iter().collect(); |
| 29 | + | ^^^^^^^ cannot infer type for type parameter `B` declared on the associated function `collect` |
| 30 | + | |
| 31 | + = note: cannot satisfy `_: std::iter::FromIterator<char>` |
| 32 | +help: consider specifying the type argument in the method call |
| 33 | + | |
| 34 | +LL | vec!['a', 'b', 'c'].into_iter().collect::<B>(); |
| 35 | + | ^^^^^ |
| 36 | + |
| 37 | +error[E0283]: type annotations needed |
| 38 | + --> $DIR/appropriate-type-param-turbofish.rs:14:43 |
| 39 | + | |
| 40 | +LL | let _ = vec![1, 2, 3].into_iter().collect(); |
| 41 | + | - ^^^^^^^ cannot infer type for type parameter `B` declared on the associated function `collect` |
| 42 | + | | |
| 43 | + | consider giving this pattern a type |
| 44 | + | |
| 45 | + = note: cannot satisfy `_: std::iter::FromIterator<i32>` |
| 46 | + |
| 47 | +error[E0283]: type annotations needed |
| 48 | + --> $DIR/appropriate-type-param-turbofish.rs:17:49 |
| 49 | + | |
| 50 | +LL | let _ = vec!["a", "b", "c"].into_iter().collect(); |
| 51 | + | - ^^^^^^^ cannot infer type for type parameter `B` declared on the associated function `collect` |
| 52 | + | | |
| 53 | + | consider giving this pattern a type |
| 54 | + | |
| 55 | + = note: cannot satisfy `_: std::iter::FromIterator<&str>` |
| 56 | + |
| 57 | +error[E0283]: type annotations needed |
| 58 | + --> $DIR/appropriate-type-param-turbofish.rs:20:49 |
| 59 | + | |
| 60 | +LL | let _ = vec!['a', 'b', 'c'].into_iter().collect(); |
| 61 | + | - ^^^^^^^ cannot infer type for type parameter `B` declared on the associated function `collect` |
| 62 | + | | |
| 63 | + | consider giving this pattern a type |
| 64 | + | |
| 65 | + = note: cannot satisfy `_: std::iter::FromIterator<char>` |
| 66 | + |
| 67 | +error[E0283]: type annotations needed |
| 68 | + --> $DIR/appropriate-type-param-turbofish.rs:38:5 |
| 69 | + | |
| 70 | +LL | fn x<X: T>() -> X { |
| 71 | + | - required by this bound in `x` |
| 72 | +... |
| 73 | +LL | x(); |
| 74 | + | ^ cannot infer type for type parameter `X` declared on the function `x` |
| 75 | + | |
| 76 | + = note: cannot satisfy `_: T` |
| 77 | +help: consider specifying the type argument in the function call |
| 78 | + | |
| 79 | +LL | x::<X>(); |
| 80 | + | ^^^^^ |
| 81 | + |
| 82 | +error[E0283]: type annotations needed |
| 83 | + --> $DIR/appropriate-type-param-turbofish.rs:42:13 |
| 84 | + | |
| 85 | +LL | fn x<X: T>() -> X { |
| 86 | + | - required by this bound in `x` |
| 87 | +... |
| 88 | +LL | let _ = x(); |
| 89 | + | - ^ cannot infer type for type parameter `X` declared on the function `x` |
| 90 | + | | |
| 91 | + | consider giving this pattern a type |
| 92 | + | |
| 93 | + = note: cannot satisfy `_: T` |
| 94 | +help: consider specifying the type argument in the function call |
| 95 | + | |
| 96 | +LL | let _ = x::<X>(); |
| 97 | + | ^^^^^ |
| 98 | + |
| 99 | +error: aborting due to 8 previous errors |
| 100 | + |
| 101 | +For more information about this error, try `rustc --explain E0283`. |
0 commit comments