-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #105267 - compiler-errors:issue-104613, r=oli-obk
- Loading branch information
Showing
13 changed files
with
85 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// compile-flags: -Zdrop-tracking | ||
// edition: 2021 | ||
|
||
fn main() {} | ||
|
||
async fn foo() { | ||
None { value: (), ..Default::default() }.await; | ||
//~^ ERROR `Option<_>` is not a future | ||
//~| ERROR variant `Option<_>::None` has no field named `value` | ||
} |
23 changes: 23 additions & 0 deletions
23
src/test/ui/async-await/drop-track-bad-field-in-fru.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
error[E0559]: variant `Option<_>::None` has no field named `value` | ||
--> $DIR/drop-track-bad-field-in-fru.rs:7:12 | ||
| | ||
LL | None { value: (), ..Default::default() }.await; | ||
| ^^^^^ `Option<_>::None` does not have this field | ||
|
||
error[E0277]: `Option<_>` is not a future | ||
--> $DIR/drop-track-bad-field-in-fru.rs:7:45 | ||
| | ||
LL | None { value: (), ..Default::default() }.await; | ||
| ^^^^^^ | ||
| | | ||
| `Option<_>` is not a future | ||
| help: remove the `.await` | ||
| | ||
= help: the trait `Future` is not implemented for `Option<_>` | ||
= note: Option<_> must be a future or must implement `IntoFuture` to be awaited | ||
= note: required for `Option<_>` to implement `IntoFuture` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0277, E0559. | ||
For more information about an error, try `rustc --explain E0277`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
struct S { | ||
a: u32, | ||
} | ||
|
||
fn main() { | ||
let s1 = S { a: 1 }; | ||
|
||
let _ = || { | ||
let s2 = Oops { a: 2, ..s1 }; | ||
//~^ ERROR cannot find struct, variant or union type `Oops` in this scope | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error[E0422]: cannot find struct, variant or union type `Oops` in this scope | ||
--> $DIR/unresolved-struct-with-fru.rs:9:18 | ||
| | ||
LL | let s2 = Oops { a: 2, ..s1 }; | ||
| ^^^^ not found in this scope | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0422`. |