forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
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 rust-lang#107185 - compiler-errors:rollup-wkomjma, r=co…
…mpiler-errors Rollup of 8 pull requests Successful merges: - rust-lang#103418 (Add `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` to future-incompat report) - rust-lang#106113 (llvm-wrapper: adapt for LLVM API change) - rust-lang#106144 (Improve the documentation of `black_box`) - rust-lang#106578 (Label closure captures/generator locals that make opaque types recursive) - rust-lang#106749 (Update cc to 1.0.77) - rust-lang#106935 (Fix `SingleUseLifetime` ICE) - rust-lang#107015 (Re-enable building rust-analyzer on riscv64) - rust-lang#107029 (Add new bootstrap members to triagebot.toml) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
21 changed files
with
577 additions
and
51 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,23 @@ | ||
#![feature(generators, generator_trait)] | ||
|
||
use std::ops::{Generator, GeneratorState}; | ||
|
||
fn foo() -> impl Generator<Yield = (), Return = ()> { | ||
//~^ ERROR cannot resolve opaque type | ||
//~| NOTE recursive opaque type | ||
//~| NOTE in this expansion of desugaring of | ||
|| { | ||
//~^ NOTE returning here | ||
let mut gen = Box::pin(foo()); | ||
//~^ NOTE generator captures itself here | ||
let mut r = gen.as_mut().resume(()); | ||
while let GeneratorState::Yielded(v) = r { | ||
yield v; | ||
r = gen.as_mut().resume(()); | ||
} | ||
} | ||
} | ||
|
||
fn main() { | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
error[E0720]: cannot resolve opaque type | ||
--> $DIR/recursive-generator.rs:5:13 | ||
| | ||
LL | fn foo() -> impl Generator<Yield = (), Return = ()> { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type | ||
... | ||
LL | / || { | ||
LL | | | ||
LL | | let mut gen = Box::pin(foo()); | ||
| | ------- generator captures itself here | ||
LL | | | ||
... | | ||
LL | | } | ||
LL | | } | ||
| |_____- returning here with type `[generator@$DIR/recursive-generator.rs:9:5: 9:7]` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0720`. |
Oops, something went wrong.