-
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.
Auto merge of #67575 - Centril:rollup-feikoir, r=Centril
Rollup of 7 pull requests Successful merges: - #67337 (Ensure that evaluating or validating a constant never reads from a static) - #67543 (Add regression tests for fixed ICEs) - #67547 (Cleanup err codes) - #67551 (Add long error code explanation message for E0627) - #67561 (remove `description` from `Error` impls in docs) - #67569 (Clean up unsafety in char::encode_utf8) - #67572 (Use the chocolatey CDN directly to avoid the flaky API) Failed merges: r? @ghost
- Loading branch information
Showing
43 changed files
with
491 additions
and
115 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
A yield expression was used outside of the generator literal. | ||
|
||
Erroneous code example: | ||
|
||
```compile_fail,E0627 | ||
#![feature(generators, generator_trait)] | ||
fn fake_generator() -> &'static str { | ||
yield 1; | ||
return "foo" | ||
} | ||
fn main() { | ||
let mut generator = fake_generator; | ||
} | ||
``` | ||
|
||
The error occurs because keyword `yield` can only be used inside the generator | ||
literal. This can be fixed by constructing the generator correctly. | ||
|
||
``` | ||
#![feature(generators, generator_trait)] | ||
fn main() { | ||
let mut generator = || { | ||
yield 1; | ||
return "foo" | ||
}; | ||
} | ||
``` |
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
Oops, something went wrong.