1
Fork 0

Make some diagnostics not depend on the source of what they reference being available

This commit is contained in:
Oli Scherer 2022-12-09 15:56:23 +00:00
parent 71ec1457ee
commit cb26b35b12
228 changed files with 417 additions and 1504 deletions

View file

@ -13,9 +13,6 @@ LL | let _: Option<(i32, bool)> = Some(1, 2);
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) */);
@ -52,9 +49,6 @@ LL | let _: Option<(i8,)> = Some();
|
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,) */);
@ -72,9 +66,6 @@ LL | let _: Option<(i32,)> = Some(5_usize);
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
@ -88,9 +79,6 @@ LL | let _: Option<(i32,)> = Some((5_usize));
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