rust/tests/ui/generator
Matthias Krüger e413c2e770
Rollup merge of #110259 - ndrewxie:issue-109964-fix-gitstuff, r=cjgillot
Added diagnostic for pin! macro in addition to Box::pin if Unpin isn't implemented

I made a PR earlier, but accidentally renamed a branch and that deleted the PR... sorry for the duplicate

Currently, if an operation on `Pin<T>` is performed that requires `T` to implement `Unpin`, the diagnostic suggestion is to use `Box::pin` ("note: consider using `Box::pin`").

This PR suggests pin! as well, as that's another valid way of pinning a value, and avoids a heap allocation. Appropriate diagnostic suggestions were included to highlight the difference in semantics (local pinning for pin! vs non-local for Box::pin).

Fixes #109964
2023-04-13 21:58:37 +02:00
..
auxiliary
print Bless tests 2023-04-05 15:59:29 +00:00
addassign-yield.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
async-generator-issue-67158.rs
async-generator-issue-67158.stderr
auto-trait-regions.drop_tracking_mir.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
auto-trait-regions.drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
auto-trait-regions.no_drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
auto-trait-regions.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
auto-trait-regions.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
borrow-in-tail-expr.rs
borrowing.drop_tracking_mir.stderr Always require Drop for generators. 2023-01-27 18:58:23 +00:00
borrowing.drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
borrowing.no_drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
borrowing.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
borrowing.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
clone-impl-async.rs
clone-impl-async.stderr
clone-impl-static.rs
clone-impl-static.stderr
clone-impl.rs
clone-impl.stderr Tweak output for 'add line' suggestion 2023-04-12 22:50:10 +00:00
conditional-drop.rs
control-flow.rs
derived-drop-parent-expr.rs
discriminant.rs
drop-and-replace.rs
drop-control-flow.rs
drop-env.rs
drop-track-addassign-yield.rs
drop-tracking-parent-expression.drop_tracking_mir.stderr Bless tests. 2023-01-27 20:10:17 +00:00
drop-tracking-parent-expression.drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
drop-tracking-parent-expression.no_drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
drop-tracking-parent-expression.rs Bless tests. 2023-01-27 20:10:17 +00:00
drop-tracking-yielding-in-match-guards.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
drop-yield-twice.rs
drop-yield-twice.stderr
dropck-resume.rs
dropck-resume.stderr
dropck.rs
dropck.stderr Account for method call and indexing when looking for inner-most path in expression 2023-01-17 02:52:43 +00:00
generator-region-requirements.migrate.stderr
generator-region-requirements.rs
generator-region-requirements.stderr
generator-resume-after-panic.rs
generator-with-nll.rs
generator-with-nll.stderr
generator-yielding-or-returning-itself.rs
generator-yielding-or-returning-itself.stderr Specify what 'this' actually is 2023-02-21 05:21:07 +00:00
issue-44197.rs
issue-45729-unsafe-in-generator.mir.stderr
issue-45729-unsafe-in-generator.rs
issue-45729-unsafe-in-generator.thir.stderr
issue-48048.rs
issue-48048.stderr
issue-52304.rs
issue-52398.rs
issue-52398.stderr
issue-53548-1.rs
issue-53548.rs
issue-57017.no_drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-57017.rs Bless tests. 2023-01-27 20:10:17 +00:00
issue-57084.rs
issue-57084.stderr
issue-57478.no_drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-57478.rs Bless tests. 2023-01-27 20:10:17 +00:00
issue-58888.rs
issue-61442-stmt-expr-with-drop.rs
issue-62506-two_awaits.rs
issue-64620-yield-array-element.rs
issue-64620-yield-array-element.stderr
issue-68112.drop_tracking_mir.stderr Bless tests. 2023-01-27 20:10:17 +00:00
issue-68112.drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-68112.no_drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-68112.rs Bless tests. 2023-01-27 20:10:17 +00:00
issue-69017.rs
issue-69039.rs
issue-87142.rs Split out a separate feature gate for impl trait in associated types 2023-04-12 16:17:31 +00:00
issue-88653.rs
issue-88653.stderr
issue-91477.rs
issue-91477.stderr
issue-93161.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
issue-102645.rs
issue-102645.stderr diagnostics: update test cases to refer to assoc fn with self as method 2023-02-22 08:40:47 -07:00
issue-105084.drop_tracking_mir.stderr Remove uses of box_syntax in rustc and tools 2023-03-12 13:19:46 +00:00
issue-105084.rs Remove uses of box_syntax in rustc and tools 2023-03-12 13:19:46 +00:00
iterator-count.rs
layout-error.rs
layout-error.stderr
live-upvar-across-yield.rs
match-bindings.rs
match-bindings.stderr
metadata-sufficient-for-layout.rs
metadata-sufficient-for-layout.stderr
nested_generators.rs
niche-in-generator.rs
non-static-is-unpin.rs
not-send-sync.drop_tracking_mir.stderr Bless tests. 2023-01-27 20:10:17 +00:00
not-send-sync.drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
not-send-sync.no_drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
not-send-sync.rs Bless tests. 2023-01-27 20:10:17 +00:00
overlap-locals.rs
panic-drops-resume.rs
panic-drops.rs
panic-safe.rs
parent-expression.drop_tracking_mir.stderr Bless tests. 2023-01-27 20:10:17 +00:00
parent-expression.drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
parent-expression.no_drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
parent-expression.rs Bless tests. 2023-01-27 20:10:17 +00:00
partial-drop.drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
partial-drop.no_drop_tracking.stderr Bless tests. 2023-01-27 20:10:17 +00:00
partial-drop.rs Bless tests. 2023-01-27 20:10:17 +00:00
partial-initialization-across-yield.rs
partial-initialization-across-yield.stderr
pattern-borrow.rs
pattern-borrow.stderr
pin-box-generator.rs
reborrow-mut-upvar.rs
reborrow-mut-upvar.stderr
ref-escapes-but-not-over-yield.rs
ref-escapes-but-not-over-yield.stderr
ref-upvar-not-send.rs
ref-upvar-not-send.stderr
reinit-in-match-guard.rs
resume-after-return.rs
resume-arg-late-bound.rs
resume-arg-late-bound.stderr
resume-arg-size.rs
resume-live-across-yield.rs
retain-resume-ref.drop_tracking_mir.stderr Always require Drop for generators. 2023-01-27 18:58:23 +00:00
retain-resume-ref.drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
retain-resume-ref.no_drop_tracking.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
retain-resume-ref.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
retain-resume-ref.stderr Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
size-moved-locals.rs
sized-yield.rs
sized-yield.stderr
smoke-resume-args.rs
smoke.rs
static-generators.rs
static-mut-reference-across-yield.rs Test the 3 generator handling versions for generator/async tests. 2023-01-27 18:58:13 +00:00
static-not-unpin.rs
static-not-unpin.stderr Added diagnostic for pin! macro in addition to Box::pin if Unpin isn't implemented 2023-04-12 18:03:11 -04:00
static-reference-across-yield.rs
too-live-local-in-immovable-gen.rs
too-live-local-in-immovable-gen.stderr
too-many-parameters.rs
too-many-parameters.stderr
type-mismatch-error.rs
type-mismatch-error.stderr
type-mismatch-signature-deduction.rs
type-mismatch-signature-deduction.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
unresolved-ct-var-drop-tracking.rs
unresolved-ct-var-drop-tracking.stderr
unresolved-ct-var.rs
unresolved-ct-var.stderr
xcrate-reachable.rs
xcrate.rs
yield-in-args-rev.rs
yield-in-args-rev.stderr
yield-in-args.rs
yield-in-args.stderr
yield-in-const.rs
yield-in-const.stderr
yield-in-function.rs
yield-in-function.stderr
yield-in-initializer.rs
yield-in-initializer.stderr
yield-in-static.rs
yield-in-static.stderr
yield-outside-generator-issue-78653.rs
yield-outside-generator-issue-78653.stderr
yield-subtype.rs
yield-subtype.stderr
yield-while-iterating.rs
yield-while-iterating.stderr
yield-while-local-borrowed.rs
yield-while-local-borrowed.stderr
yield-while-ref-reborrowed.rs
yield-while-ref-reborrowed.stderr
yielding-in-match-guards.rs