blob: 010a47aef6250372e5d0a4509518f1e2eeb8e938 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  | 
pub trait Argument {}
impl Argument for u8 {}
impl Argument for i8 {}
impl Argument for String {}
impl Argument for &str {}
pub trait TupleArgs {}
impl<A: Argument> TupleArgs for (A,) {}
impl<A: Argument, B: Argument> TupleArgs for (A, B) {}
impl<A: Argument, B: Argument, C: Argument> TupleArgs for (A, B, C) {}
fn convert_into_tuple(_x: impl TupleArgs) {}
fn main() {
    convert_into_tuple(42_u8);
    //~^ ERROR E0277
    //~| HELP the following other types implement trait `TupleArgs`
    //~| HELP use a unary tuple instead
}
 
  |