|
| 1 | +error[E0277]: the trait bound `(): FooArgs` is not satisfied |
| 2 | + --> splat-overload-diagnostics/src/bin/diag-functions.rs:15:5 |
| 3 | + | |
| 4 | +15 | foo(); |
| 5 | + | ^^^ the trait `FooArgs` is not implemented for `()` |
| 6 | + | |
| 7 | +help: the following other types implement trait `FooArgs` |
| 8 | + --> splat-overload-diagnostics/src/bin/diag-functions.rs:7:1 |
| 9 | + | |
| 10 | + 7 | / overload! { |
| 11 | + 8 | | fn foo(_x: i32, _y: f64) {} |
| 12 | + 9 | | fn foo(_x: bool, _y: i32, _z: f64) {} |
| 13 | +10 | | fn foo(_a: i32, _b: f64, _c: bool, _d: u8) {} |
| 14 | +11 | | } |
| 15 | + | | ^ |
| 16 | + | | | |
| 17 | + | | `(bool, i32, f64)` |
| 18 | + | |_`(i32, f64)` |
| 19 | + | `(i32, f64, bool, u8)` |
| 20 | +note: required by a bound in `foo` |
| 21 | + --> splat-overload-diagnostics/src/bin/diag-functions.rs:7:1 |
| 22 | + | |
| 23 | + 7 | / overload! { |
| 24 | + 8 | | fn foo(_x: i32, _y: f64) {} |
| 25 | + 9 | | fn foo(_x: bool, _y: i32, _z: f64) {} |
| 26 | +10 | | fn foo(_a: i32, _b: f64, _c: bool, _d: u8) {} |
| 27 | +11 | | } |
| 28 | + | |_^ required by this bound in `foo` |
| 29 | + = note: this error originates in the macro `overload` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 30 | + |
| 31 | +error[E0308]: mismatched types |
| 32 | + --> splat-overload-diagnostics/src/bin/diag-functions.rs:16:9 |
| 33 | + | |
| 34 | +16 | foo("one wrong type", 2.0_f64); |
| 35 | + | --- ^^^^^^^^^^^^^^^^ expected `i32`, found `&str` |
| 36 | + | | |
| 37 | + | arguments to this function are incorrect |
| 38 | + | |
| 39 | +help: the return type of this call is `&'static str` due to the type of the argument passed |
| 40 | + --> splat-overload-diagnostics/src/bin/diag-functions.rs:16:5 |
| 41 | + | |
| 42 | +16 | foo("one wrong type", 2.0_f64); |
| 43 | + | ^^^^----------------^^^^^^^^^^ |
| 44 | + | | |
| 45 | + | this argument influences the return type of `foo` |
| 46 | +note: function defined here |
| 47 | + --> splat-overload-diagnostics/src/bin/diag-functions.rs:8:8 |
| 48 | + | |
| 49 | + 7 | / overload! { |
| 50 | + 8 | | fn foo(_x: i32, _y: f64) {} |
| 51 | + | | ^^^ |
| 52 | + 9 | | fn foo(_x: bool, _y: i32, _z: f64) {} |
| 53 | +10 | | fn foo(_a: i32, _b: f64, _c: bool, _d: u8) {} |
| 54 | +11 | | } |
| 55 | + | |_- |
| 56 | + |
| 57 | +error[E0277]: the trait bound `(_, _, _, _, _): FooArgs` is not satisfied |
| 58 | + --> splat-overload-diagnostics/src/bin/diag-functions.rs:18:9 |
| 59 | + | |
| 60 | +18 | foo(1_i32, 2_f64, true, 4_u8, 5); |
| 61 | + | --- ^^^^^ the trait `FooArgs` is not implemented for `(_, _, _, _, _)` |
| 62 | + | | |
| 63 | + | required by a bound introduced by this call |
| 64 | + | |
| 65 | +help: the following other types implement trait `FooArgs` |
| 66 | + --> splat-overload-diagnostics/src/bin/diag-functions.rs:7:1 |
| 67 | + | |
| 68 | + 7 | / overload! { |
| 69 | + 8 | | fn foo(_x: i32, _y: f64) {} |
| 70 | + 9 | | fn foo(_x: bool, _y: i32, _z: f64) {} |
| 71 | +10 | | fn foo(_a: i32, _b: f64, _c: bool, _d: u8) {} |
| 72 | +11 | | } |
| 73 | + | | ^ |
| 74 | + | | | |
| 75 | + | | `(bool, i32, f64)` |
| 76 | + | |_`(i32, f64)` |
| 77 | + | `(i32, f64, bool, u8)` |
| 78 | +note: required by a bound in `foo` |
| 79 | + --> splat-overload-diagnostics/src/bin/diag-functions.rs:7:1 |
| 80 | + | |
| 81 | + 7 | / overload! { |
| 82 | + 8 | | fn foo(_x: i32, _y: f64) {} |
| 83 | + 9 | | fn foo(_x: bool, _y: i32, _z: f64) {} |
| 84 | +10 | | fn foo(_a: i32, _b: f64, _c: bool, _d: u8) {} |
| 85 | +11 | | } |
| 86 | + | |_^ required by this bound in `foo` |
| 87 | + = note: this error originates in the macro `overload` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 88 | + |
| 89 | +error[E0277]: the trait bound `(): FooArgs` is not satisfied |
| 90 | + --> splat-overload-diagnostics/src/bin/diag-functions.rs:15:5 |
| 91 | + | |
| 92 | +15 | foo(); |
| 93 | + | ^^^^^ the trait `FooArgs` is not implemented for `()` |
| 94 | + | |
| 95 | +help: the following other types implement trait `FooArgs` |
| 96 | + --> splat-overload-diagnostics/src/bin/diag-functions.rs:7:1 |
| 97 | + | |
| 98 | + 7 | / overload! { |
| 99 | + 8 | | fn foo(_x: i32, _y: f64) {} |
| 100 | + 9 | | fn foo(_x: bool, _y: i32, _z: f64) {} |
| 101 | +10 | | fn foo(_a: i32, _b: f64, _c: bool, _d: u8) {} |
| 102 | +11 | | } |
| 103 | + | | ^ |
| 104 | + | | | |
| 105 | + | | `(bool, i32, f64)` |
| 106 | + | |_`(i32, f64)` |
| 107 | + | `(i32, f64, bool, u8)` |
| 108 | + = note: this error originates in the macro `overload` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 109 | + |
| 110 | +error[E0277]: the trait bound `(i32, f64, bool, u8, {integer}): FooArgs` is not satisfied |
| 111 | + --> splat-overload-diagnostics/src/bin/diag-functions.rs:18:5 |
| 112 | + | |
| 113 | +18 | foo(1_i32, 2_f64, true, 4_u8, 5); |
| 114 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `FooArgs` is not implemented for `(i32, f64, bool, u8, {integer})` |
| 115 | + | |
| 116 | +help: the following other types implement trait `FooArgs` |
| 117 | + --> splat-overload-diagnostics/src/bin/diag-functions.rs:7:1 |
| 118 | + | |
| 119 | + 7 | / overload! { |
| 120 | + 8 | | fn foo(_x: i32, _y: f64) {} |
| 121 | + 9 | | fn foo(_x: bool, _y: i32, _z: f64) {} |
| 122 | +10 | | fn foo(_a: i32, _b: f64, _c: bool, _d: u8) {} |
| 123 | +11 | | } |
| 124 | + | | ^ |
| 125 | + | | | |
| 126 | + | | `(bool, i32, f64)` |
| 127 | + | |_`(i32, f64)` |
| 128 | + | `(i32, f64, bool, u8)` |
| 129 | + = note: this error originates in the macro `overload` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 130 | + |
| 131 | +Some errors have detailed explanations: E0277, E0308. |
| 132 | +For more information about an error, try `rustc --explain E0277`. |
| 133 | +error: could not compile `splat-overload-diagnostics` (bin "diag-functions") due to 5 previous errors |
0 commit comments