| -- ^^ expected `u16`, found `()`
| |
| arguments to this enum variant are incorrect
+ |
+note: tuple variant defined here
+ --> $SRC_DIR/core/src/result.rs:LL:COL
+ |
+LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
+ | ^^
error[E0308]: mismatched types
--> $DIR/issue-87461.rs:17:8
| -- ^^ expected `u16`, found `()`
| |
| arguments to this enum variant are incorrect
+ |
+note: tuple variant defined here
+ --> $SRC_DIR/core/src/result.rs:LL:COL
+ |
+LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
+ | ^^
error[E0308]: mismatched types
--> $DIR/issue-87461.rs:26:12
| -- ^^ expected `u16`, found `()`
| |
| arguments to this enum variant are incorrect
+ |
+note: tuple variant defined here
+ --> $SRC_DIR/core/src/result.rs:LL:COL
+ |
+LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
+ | ^^
error: aborting due to 3 previous errors
| ------------------------- ^^^^^^^^^^ expected an array with a fixed size of 3 elements, found one with 2 elements
| |
| arguments to this struct are incorrect
+ |
+note: tuple struct defined here
+ --> $DIR/auxiliary/const_generic_lib.rs:1:12
+ |
+LL | pub struct Struct<const N: usize>(pub [u8; N]);
+ | ^^^^^^
error[E0308]: mismatched types
--> $DIR/const-argument-cross-crate-mismatch.rs:8:65
| ------------------------- ^^^^^^^^^^^^^^^ expected an array with a fixed size of 2 elements, found one with 3 elements
| |
| arguments to this struct are incorrect
+ |
+note: tuple struct defined here
+ --> $DIR/auxiliary/const_generic_lib.rs:1:12
+ |
+LL | pub struct Struct<const N: usize>(pub [u8; N]);
+ | ^^^^^^
error: aborting due to 2 previous errors
|
= note: expected type parameter `bool` (type parameter `bool`)
found type `bool` (`bool`)
+note: tuple variant defined here
+ --> $SRC_DIR/core/src/option.rs:LL:COL
+ |
+LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+ | ^^^^
error: aborting due to previous error
error[E0023]: this pattern has 0 fields, but the corresponding tuple struct has 3 fields
--> $DIR/pat-tuple-field-count-cross.rs:24:9
|
-LL | M() => {}
- | ^^^ expected 3 fields, found 0
+LL | M() => {}
+ | ^^^ expected 3 fields, found 0
|
- ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:1
+ ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:12
|
-LL | / pub struct M(
-LL | | pub u8,
- | | ------
-LL | | pub u8,
- | | ------
-LL | | pub u8,
- | | ------ tuple struct has 3 fields
-LL | | );
- | |__- tuple struct defined here
+LL | pub struct M(
+ | - tuple struct defined here
+LL | pub u8,
+ | ------
+LL | pub u8,
+ | ------
+LL | pub u8,
+ | ------ tuple struct has 3 fields
|
help: use `_` to explicitly ignore each field
|
error[E0023]: this pattern has 1 field, but the corresponding tuple struct has 3 fields
--> $DIR/pat-tuple-field-count-cross.rs:25:11
|
-LL | M(1) => {}
- | ^ expected 3 fields, found 1
+LL | M(1) => {}
+ | ^ expected 3 fields, found 1
|
- ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:1
+ ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:12
|
-LL | / pub struct M(
-LL | | pub u8,
- | | ------
-LL | | pub u8,
- | | ------
-LL | | pub u8,
- | | ------ tuple struct has 3 fields
-LL | | );
- | |__- tuple struct defined here
+LL | pub struct M(
+ | - tuple struct defined here
+LL | pub u8,
+ | ------
+LL | pub u8,
+ | ------
+LL | pub u8,
+ | ------ tuple struct has 3 fields
|
help: use `_` to explicitly ignore each field
|
error[E0023]: this pattern has 2 fields, but the corresponding tuple struct has 3 fields
--> $DIR/pat-tuple-field-count-cross.rs:26:11
|
-LL | M(xyz, abc) => {}
- | ^^^ ^^^ expected 3 fields, found 2
+LL | M(xyz, abc) => {}
+ | ^^^ ^^^ expected 3 fields, found 2
|
- ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:1
+ ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:12
|
-LL | / pub struct M(
-LL | | pub u8,
- | | ------
-LL | | pub u8,
- | | ------
-LL | | pub u8,
- | | ------ tuple struct has 3 fields
-LL | | );
- | |__- tuple struct defined here
+LL | pub struct M(
+ | - tuple struct defined here
+LL | pub u8,
+ | ------
+LL | pub u8,
+ | ------
+LL | pub u8,
+ | ------ tuple struct has 3 fields
|
help: use `_` to explicitly ignore each field
|
error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields
--> $DIR/pat-tuple-field-count-cross.rs:27:11
|
-LL | M(1, 2, 3, 4) => {}
- | ^ ^ ^ ^ expected 3 fields, found 4
+LL | M(1, 2, 3, 4) => {}
+ | ^ ^ ^ ^ expected 3 fields, found 4
|
- ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:1
+ ::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:5:12
|
-LL | / pub struct M(
-LL | | pub u8,
- | | ------
-LL | | pub u8,
- | | ------
-LL | | pub u8,
- | | ------ tuple struct has 3 fields
-LL | | );
- | |__- tuple struct defined here
+LL | pub struct M(
+ | - tuple struct defined here
+LL | pub u8,
+ | ------
+LL | pub u8,
+ | ------
+LL | pub u8,
+ | ------ tuple struct has 3 fields
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 0 fields
--> $DIR/pat-tuple-field-count-cross.rs:36:16
error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 3 fields
--> $DIR/pat-tuple-field-count-cross.rs:52:9
|
-LL | E2::M() => {}
- | ^^^^^^^ expected 3 fields, found 0
+LL | E2::M() => {}
+ | ^^^^^^^ expected 3 fields, found 0
|
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:15:5
|
-LL | / M(
-LL | | u8,
- | | --
-LL | | u8,
- | | --
-LL | | u8,
- | | -- tuple variant has 3 fields
-LL | | ),
- | |_____- tuple variant defined here
+LL | M(
+ | - tuple variant defined here
+LL | u8,
+ | --
+LL | u8,
+ | --
+LL | u8,
+ | -- tuple variant has 3 fields
|
help: use `_` to explicitly ignore each field
|
error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 3 fields
--> $DIR/pat-tuple-field-count-cross.rs:53:15
|
-LL | E2::M(1) => {}
- | ^ expected 3 fields, found 1
+LL | E2::M(1) => {}
+ | ^ expected 3 fields, found 1
|
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:15:5
|
-LL | / M(
-LL | | u8,
- | | --
-LL | | u8,
- | | --
-LL | | u8,
- | | -- tuple variant has 3 fields
-LL | | ),
- | |_____- tuple variant defined here
+LL | M(
+ | - tuple variant defined here
+LL | u8,
+ | --
+LL | u8,
+ | --
+LL | u8,
+ | -- tuple variant has 3 fields
|
help: use `_` to explicitly ignore each field
|
error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 3 fields
--> $DIR/pat-tuple-field-count-cross.rs:54:15
|
-LL | E2::M(xyz, abc) => {}
- | ^^^ ^^^ expected 3 fields, found 2
+LL | E2::M(xyz, abc) => {}
+ | ^^^ ^^^ expected 3 fields, found 2
|
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:15:5
|
-LL | / M(
-LL | | u8,
- | | --
-LL | | u8,
- | | --
-LL | | u8,
- | | -- tuple variant has 3 fields
-LL | | ),
- | |_____- tuple variant defined here
+LL | M(
+ | - tuple variant defined here
+LL | u8,
+ | --
+LL | u8,
+ | --
+LL | u8,
+ | -- tuple variant has 3 fields
|
help: use `_` to explicitly ignore each field
|
error[E0023]: this pattern has 4 fields, but the corresponding tuple variant has 3 fields
--> $DIR/pat-tuple-field-count-cross.rs:55:15
|
-LL | E2::M(1, 2, 3, 4) => {}
- | ^ ^ ^ ^ expected 3 fields, found 4
+LL | E2::M(1, 2, 3, 4) => {}
+ | ^ ^ ^ ^ expected 3 fields, found 4
|
::: $DIR/auxiliary/declarations-for-tuple-field-count-errors.rs:15:5
|
-LL | / M(
-LL | | u8,
- | | --
-LL | | u8,
- | | --
-LL | | u8,
- | | -- tuple variant has 3 fields
-LL | | ),
- | |_____- tuple variant defined here
+LL | M(
+ | - tuple variant defined here
+LL | u8,
+ | --
+LL | u8,
+ | --
+LL | u8,
+ | -- tuple variant has 3 fields
error: aborting due to 28 previous errors
LL | let _: Result<(), String> = Ok();
| ^^-- an argument of type `()` is missing
|
+note: tuple variant defined here
+ --> $SRC_DIR/core/src/result.rs:LL:COL
+ |
+LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
+ | ^^
help: provide the argument
|
LL | let _: Result<(), String> = Ok(());
|
= note: expected tuple `(i32, bool)`
found type `{integer}`
+note: tuple variant defined here
+ --> $SRC_DIR/core/src/option.rs:LL:COL
+ |
+LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+ | ^^^^
help: remove the extra argument
|
LL | let _: Option<(i32, bool)> = Some({(i32, bool)});
LL | let _: Option<(i8,)> = Some();
| ^^^^-- an argument of type `(i8,)` is missing
|
+note: tuple variant defined here
+ --> $SRC_DIR/core/src/option.rs:LL:COL
+ |
+LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+ | ^^^^
help: provide the argument
|
LL | let _: Option<(i8,)> = Some({(i8,)});
|
= note: expected tuple `(i32,)`
found type `usize`
+note: tuple variant defined here
+ --> $SRC_DIR/core/src/option.rs:LL:COL
+ |
+LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+ | ^^^^
error[E0308]: mismatched types
--> $DIR/args-instead-of-tuple-errors.rs:17:34
|
= note: expected tuple `(i32,)`
found type `usize`
+note: tuple variant defined here
+ --> $SRC_DIR/core/src/option.rs:LL:COL
+ |
+LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+ | ^^^^
error: aborting due to 5 previous errors
LL | let _: Result<(i32, i8), ()> = Ok(1, 2);
| ^^
|
+note: tuple variant defined here
+ --> $SRC_DIR/core/src/result.rs:LL:COL
+ |
+LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
+ | ^^
help: use parentheses to construct a tuple
|
LL | let _: Result<(i32, i8), ()> = Ok((1, 2));
LL | let _: Option<(i32, i8, &'static str)> = Some(1, 2, "hi");
| ^^^^
|
+note: tuple variant defined here
+ --> $SRC_DIR/core/src/option.rs:LL:COL
+ |
+LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+ | ^^^^
help: use parentheses to construct a tuple
|
LL | let _: Option<(i32, i8, &'static str)> = Some((1, 2, "hi"));
LL | let _: Option<()> = Some();
| ^^^^-- an argument of type `()` is missing
|
+note: tuple variant defined here
+ --> $SRC_DIR/core/src/option.rs:LL:COL
+ |
+LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+ | ^^^^
help: provide the argument
|
LL | let _: Option<()> = Some(());
|
= note: expected tuple `(i32,)`
found type `{integer}`
+note: tuple variant defined here
+ --> $SRC_DIR/core/src/option.rs:LL:COL
+ |
+LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+ | ^^^^
help: use a trailing comma to create a tuple with one element
|
LL | let _: Option<(i32,)> = Some((3,));
|
= note: expected tuple `(i32,)`
found type `{integer}`
+note: tuple variant defined here
+ --> $SRC_DIR/core/src/option.rs:LL:COL
+ |
+LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+ | ^^^^
help: use a trailing comma to create a tuple with one element
|
LL | let _: Option<(i32,)> = Some((3,));
|
= note: expected enum `Option<()>`
found unit type `()`
+note: tuple variant defined here
+ --> $SRC_DIR/core/src/result.rs:LL:COL
+ |
+LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
+ | ^^
help: try wrapping the expression in `Some`
|
LL | fn main() { test(Ok(Some(()))); }
LL | let _ = Some(3, 2);
| ^^^^ - argument unexpected
|
+note: tuple variant defined here
+ --> $SRC_DIR/core/src/option.rs:LL:COL
+ |
+LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+ | ^^^^
help: remove the extra argument
|
LL | let _ = Some(3);
| |
| argument unexpected
|
+note: tuple variant defined here
+ --> $SRC_DIR/core/src/result.rs:LL:COL
+ |
+LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
+ | ^^
help: remove the extra arguments
|
LL | let _ = Ok(3);
LL | let _ = Ok();
| ^^-- an argument is missing
|
+note: tuple variant defined here
+ --> $SRC_DIR/core/src/result.rs:LL:COL
+ |
+LL | Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
+ | ^^
help: provide the argument
|
LL | let _ = Ok({_});