Skip to content

Commit a9e01d2

Browse files
authored
Rollup merge of rust-lang#101556 - compiler-errors:tweak-generator-print, r=jackh726
Tweak future opaque ty pretty printing 1. The `Return` type of a generator doesn't need to be a lang item just for diagnostic printing of types 2. We shouldn't suppress the `Output = Ty` of a opaque future if the type is a int or float var.
2 parents ae644c1 + 1027d99 commit a9e01d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/ops/generator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub trait Generator<R = ()> {
8383
/// `return` statement or implicitly as the last expression of a generator
8484
/// literal. For example futures would use this as `Result<T, E>` as it
8585
/// represents a completed future.
86-
#[lang = "generator_return"]
86+
#[cfg_attr(bootstrap, lang = "generator_return")]
8787
type Return;
8888

8989
/// Resumes the execution of this generator.

0 commit comments

Comments
 (0)