rust/tests/ui/nll
bors 6eaa7fb576 Auto merge of #122603 - estebank:clone-o-rama, r=lcnr
Detect borrow checker errors where `.clone()` would be an appropriate user action

When a value is moved twice, suggest cloning the earlier move:

```
error[E0509]: cannot move out of type `U2`, which implements the `Drop` trait
  --> $DIR/union-move.rs:49:18
   |
LL |         move_out(x.f1_nocopy);
   |                  ^^^^^^^^^^^
   |                  |
   |                  cannot move out of here
   |                  move occurs because `x.f1_nocopy` has type `ManuallyDrop<RefCell<i32>>`, which does not implement the `Copy` trait
   |
help: consider cloning the value if the performance cost is acceptable
   |
LL |         move_out(x.f1_nocopy.clone());
   |                             ++++++++
```

When a value is borrowed by an `fn` call, consider if cloning the result of the call would be reasonable, and suggest cloning that, instead of the argument:

```
error[E0505]: cannot move out of `a` because it is borrowed
  --> $DIR/variance-issue-20533.rs:53:14
   |
LL |         let a = AffineU32(1);
   |             - binding `a` declared here
LL |         let x = bat(&a);
   |                     -- borrow of `a` occurs here
LL |         drop(a);
   |              ^ move out of `a` occurs here
LL |         drop(x);
   |              - borrow later used here
   |
help: consider cloning the value if the performance cost is acceptable
   |
LL |         let x = bat(&a).clone();
   |                        ++++++++
```

otherwise, suggest cloning the argument:

```
error[E0505]: cannot move out of `a` because it is borrowed
  --> $DIR/variance-issue-20533.rs:59:14
   |
LL |         let a = ClonableAffineU32(1);
   |             - binding `a` declared here
LL |         let x = foo(&a);
   |                     -- borrow of `a` occurs here
LL |         drop(a);
   |              ^ move out of `a` occurs here
LL |         drop(x);
   |              - borrow later used here
   |
help: consider cloning the value if the performance cost is acceptable
   |
LL -         let x = foo(&a);
LL +         let x = foo(a.clone());
   |
```

This suggestion doesn't attempt to square out the types between what's cloned and what the `fn` expects, to allow the user to make a determination on whether to change the `fn` call or `fn` definition themselves.

Special case move errors caused by `FnOnce`:

```
error[E0382]: use of moved value: `blk`
  --> $DIR/once-cant-call-twice-on-heap.rs:8:5
   |
LL | fn foo<F:FnOnce()>(blk: F) {
   |                    --- move occurs because `blk` has type `F`, which does not implement the `Copy` trait
LL |     blk();
   |     ----- `blk` moved due to this call
LL |     blk();
   |     ^^^ value used here after move
   |
note: `FnOnce` closures can only be called once
  --> $DIR/once-cant-call-twice-on-heap.rs:6:10
   |
LL | fn foo<F:FnOnce()>(blk: F) {
   |          ^^^^^^^^ `F` is made to be an `FnOnce` closure here
LL |     blk();
   |     ----- this value implements `FnOnce`, which causes it to be moved when called
```

Account for redundant `.clone()` calls in resulting suggestions:

```
error[E0507]: cannot move out of dereference of `S`
  --> $DIR/needs-clone-through-deref.rs:15:18
   |
LL |         for _ in self.clone().into_iter() {}
   |                  ^^^^^^^^^^^^ ----------- value moved due to this method call
   |                  |
   |                  move occurs because value has type `Vec<usize>`, which does not implement the `Copy` trait
   |
note: `into_iter` takes ownership of the receiver `self`, which moves value
  --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
help: you can `clone` the value and consume it, but this might not be your desired behavior
   |
LL |         for _ in <Vec<usize> as Clone>::clone(&self).into_iter() {}
   |                  ++++++++++++++++++++++++++++++    ~
```

We use the presence of `&mut` values in a move error as a proxy for the user caring about side effects, so we don't emit a clone suggestion in that case:

```
error[E0505]: cannot move out of `s` because it is borrowed
  --> $DIR/borrowck-overloaded-index-move-index.rs:53:7
   |
LL |     let mut s = "hello".to_string();
   |         ----- binding `s` declared here
LL |     let rs = &mut s;
   |              ------ borrow of `s` occurs here
...
LL |     f[s] = 10;
   |       ^ move out of `s` occurs here
...
LL |     use_mut(rs);
   |             -- borrow later used here
```

We properly account for `foo += foo;` errors where we *don't* suggest `foo.clone() += foo;`, instead suggesting `foo += foo.clone();`.

---

Each commit can be reviewed in isolation. There are some "cleanup" commits, but kept them separate in order to show *why* specific changes were being made, and their effect on tests' output.

Fix #49693, CC #64167.
2024-04-13 09:07:26 +00:00
..
closure-requirements Stop ConstraintCategory Ord impl from relying on Ty's Ord impl. 2024-03-21 10:45:30 +00:00
member-constraints [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
polonius Do not recomment cloning explicit &mut expressions 2024-04-11 16:41:41 +00:00
relate_tys Make nll higher ranked equate use bidirectional subtyping in invariant context 2024-02-29 15:27:59 -03:00
ty-outlives update region debug formatting 2024-03-18 16:44:12 +00:00
user-annotations Stop ConstraintCategory Ord impl from relying on Ty's Ord impl. 2024-03-21 10:45:30 +00:00
assign-while-to-immutable.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
borrow-use-issue-46875.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
borrowck-thread-local-static-mut-borrow-outlives-fn.rs Improve wording of static_mut_ref 2024-02-18 06:01:40 +03:00
borrowck-thread-local-static-mut-borrow-outlives-fn.stderr Improve wording of static_mut_ref 2024-02-18 06:01:40 +03:00
borrowed-local-error.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
borrowed-local-error.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
borrowed-match-issue-45045.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
borrowed-match-issue-45045.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
borrowed-referent-issue-38899.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
borrowed-referent-issue-38899.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
borrowed-temporary-error.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
borrowed-temporary-error.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
borrowed-universal-error-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
borrowed-universal-error-2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
borrowed-universal-error.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
borrowed-universal-error.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
cannot-move-block-spans.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cannot-move-block-spans.stderr More move error suggestions to clone 2024-04-11 16:41:41 +00:00
capture-mut-ref.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
capture-mut-ref.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
capture-mut-ref.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
capture-ref-in-struct.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
capture-ref-in-struct.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
check-normalized-sig-for-wf.rs Check normalized call signature for WF in mir typeck 2024-02-13 16:00:01 +00:00
check-normalized-sig-for-wf.stderr Check normalized call signature for WF in mir typeck 2024-02-13 16:00:01 +00:00
closure-access-spans.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-access-spans.stderr Fix accuracy of T: Clone check in suggestion 2024-04-11 16:41:41 +00:00
closure-borrow-spans.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-borrow-spans.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
closure-captures.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-captures.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-malformed-projection-input-issue-102800.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
closure-malformed-projection-input-issue-102800.stderr Add a note to duplicate diagnostics 2023-10-05 01:04:41 +00:00
closure-move-spans.fixed Better account for more cases involving closures 2024-04-12 04:46:31 +00:00
closure-move-spans.rs Better account for more cases involving closures 2024-04-12 04:46:31 +00:00
closure-move-spans.stderr Better account for more cases involving closures 2024-04-12 04:46:31 +00:00
closure-use-spans.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closure-use-spans.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
closures-in-loops.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
closures-in-loops.stderr Better account for more cases involving closures 2024-04-12 04:46:31 +00:00
constant-thread-locals-issue-47053.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
constant-thread-locals-issue-47053.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
constant.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
continue-after-missing-main.rs Continue to borrowck even if there were previous errors 2024-02-08 08:10:43 +00:00
continue-after-missing-main.stderr Continue to borrowck even if there were previous errors 2024-02-08 08:10:43 +00:00
coroutine-distinct-lifetime.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
coroutine-upvar-mutability.rs Rename lots of files that had generator in their name 2023-10-20 21:14:02 +00:00
coroutine-upvar-mutability.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
decl-macro-illegal-copy.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
decl-macro-illegal-copy.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
do-not-ignore-lifetime-bounds-in-copy-proj.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
do-not-ignore-lifetime-bounds-in-copy-proj.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
do-not-ignore-lifetime-bounds-in-copy.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
do-not-ignore-lifetime-bounds-in-copy.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
dont-print-desugared.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dont-print-desugared.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
drop-may-dangle.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop-no-may-dangle.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
drop-no-may-dangle.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
empty-type-predicate-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
empty-type-predicate.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
enum-drop-access.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
enum-drop-access.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
extra-unused-mut.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
get_default.polonius.stderr Manual find replace updates 2023-11-24 21:04:51 +01:00
get_default.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
get_default.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
guarantor-issue-46974.rs Remove FIXME about NLL diagnostic that is already improved 2023-08-06 21:20:15 +02:00
guarantor-issue-46974.stderr Remove FIXME about NLL diagnostic that is already improved 2023-08-06 21:20:15 +02:00
ice-106874.rs address review feedback 2024-03-23 16:14:42 +01:00
ice-106874.stderr add test for #106874 ICE BoundUniversalRegionError 2024-03-23 12:50:21 +01:00
issue-16223.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-21114-ebfull.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-21114-kixunil.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-21232-partial-init-and-erroneous-use.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-21232-partial-init-and-erroneous-use.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-21232-partial-init-and-use.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-21232-partial-init-and-use.stderr Mention when the type of the moved value doesn't implement Clone 2024-04-11 16:41:42 +00:00
issue-22323-temp-destruction.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-24535-allow-mutable-borrow-in-match-guard.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-27282-move-match-input-into-guard.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-27282-move-match-input-into-guard.stderr Better account for more cases involving closures 2024-04-12 04:46:31 +00:00
issue-27282-move-ref-mut-into-guard.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-27282-move-ref-mut-into-guard.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
issue-27282-mutate-before-diverging-arm-1.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-27282-mutate-before-diverging-arm-1.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-27282-mutate-before-diverging-arm-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-27282-mutate-before-diverging-arm-2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-27282-mutate-before-diverging-arm-3.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-27282-mutate-before-diverging-arm-3.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-27282-mutation-in-guard.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-27282-mutation-in-guard.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
issue-27282-reborrow-ref-mut-in-guard.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-27282-reborrow-ref-mut-in-guard.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-27583.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-27868.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-27868.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-30104.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-30438-a.rs Move tests 2023-05-08 17:58:01 -03:00
issue-30438-a.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-30438-b.rs Move tests 2023-05-08 17:58:01 -03:00
issue-30438-b.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-30438-c.rs Move tests 2023-05-08 17:58:01 -03:00
issue-30438-c.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-31567.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-31567.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-32382-index-assoc-type-with-lifetime.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-40510-1.rs Move tests 2024-04-07 17:38:07 -03:00
issue-40510-1.stderr Move tests 2024-04-07 17:38:07 -03:00
issue-40510-2.rs Move tests 2024-04-07 17:38:07 -03:00
issue-40510-3.rs Move tests 2024-04-07 17:38:07 -03:00
issue-40510-3.stderr Move tests 2024-04-07 17:38:07 -03:00
issue-40510-4.rs Move tests 2024-04-07 17:38:07 -03:00
issue-42574-diagnostic-in-nested-closure.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-42574-diagnostic-in-nested-closure.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-43058.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-45157.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-45157.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-45696-long-live-borrows-in-boxes.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-45696-no-variant-box-recur.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-45696-scribble-on-boxed-borrow.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-45696-scribble-on-boxed-borrow.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-46023.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-46023.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-46036.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-46036.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-46589.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-46589.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-47022.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-47153-generic-const.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-47388.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-47388.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-47470.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-47470.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-47589.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-48070.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-48179.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-48238.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-48238.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-48623-closure.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-48623-coroutine.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-48623-coroutine.stderr Rename lots of files that had generator in their name 2023-10-20 21:14:02 +00:00
issue-48697.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-48697.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-48803.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-48803.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-50343.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-50461-used-mut-from-moves.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-50716-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-50716.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-50716.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-51191.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-51191.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
issue-51244.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-51244.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-51268.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-51268.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-51345-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-51351.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-51512.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-51512.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-51770.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-52057.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-52059-report-when-borrow-and-drop-conflict.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-52059-report-when-borrow-and-drop-conflict.stderr Fix accuracy of T: Clone check in suggestion 2024-04-11 16:41:41 +00:00
issue-52078.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-52086.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-52086.stderr Suggest .clone() in some move errors 2024-04-11 16:41:41 +00:00
issue-52113.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-52113.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-52213.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-52213.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-52533-1.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-52533-1.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-52534-1.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-52534-1.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-52534-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-52534-2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-52534.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-52534.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-52663-span-decl-captured-variable.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-52663-span-decl-captured-variable.stderr Suggest .clone() in some move errors 2024-04-11 16:41:41 +00:00
issue-52663-trait-object.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-52663-trait-object.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-52669.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-52669.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-52742.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-52742.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-52992.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-53040.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-53040.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-53119.rs Ignore tests w/ current/next revisions from compare-mode=next-solver 2024-03-10 21:18:41 -04:00
issue-53123-raw-pointer-cast.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-53570.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-53773.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-53773.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-53807.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-53807.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-54189.rs Bless test fallout (duplicate diagnostics) 2024-03-20 13:00:34 -04:00
issue-54189.stderr Bless test fallout (duplicate diagnostics) 2024-03-20 13:00:34 -04:00
issue-54302-cases.rs Move tests 2023-05-08 17:58:01 -03:00
issue-54302-cases.stderr Move tests 2023-05-08 17:58:01 -03:00
issue-54302.rs Move tests 2023-05-08 17:58:01 -03:00
issue-54302.stderr unify query canonicalization mode 2023-12-15 06:59:42 +00:00
issue-54382-use-span-of-tail-of-block.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-54382-use-span-of-tail-of-block.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-54556-niconii.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-54556-niconii.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-54556-stephaneyfx.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-54556-stephaneyfx.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-54556-temps-in-tail-diagnostic.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-54556-temps-in-tail-diagnostic.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-54556-used-vs-unused-tails.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-54556-used-vs-unused-tails.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
issue-54556-wrap-it-up.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-54556-wrap-it-up.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-54779-anon-static-lifetime.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-54779-anon-static-lifetime.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-54943-3.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-54943.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-54943.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-55288.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-55344.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-55394.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-55394.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-55401.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-55401.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-55511.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-55511.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-55651.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-55825-const-fn.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-55850.rs s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
issue-55850.stderr s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
issue-57100.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-57100.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-57265-return-type-wf-check.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-57265-return-type-wf-check.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-57280-1-flipped.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-57280-1-flipped.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-57280-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-57280.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-57642-higher-ranked-subtype.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-57642-higher-ranked-subtype.stderr Tweak use of trimmed paths 2023-01-30 20:12:21 +00:00
issue-57843.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-57843.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-57960.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-57989.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-57989.stderr tweak "make mut" spans (No. 3) 2023-05-05 22:40:05 +12:00
issue-58053.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-58053.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-58299.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-58299.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-61311-normalize.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-61320-normalize.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-61424.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-61424.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-61424.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-62007-assign-const-index.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-62007-assign-const-index.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
issue-62007-assign-differing-fields.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-62007-assign-differing-fields.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
issue-63154-normalize.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-67007-escaping-data.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-67007-escaping-data.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-68550.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-68550.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-69114-static-mut-ty.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-69114-static-mut-ty.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
issue-69114-static-ty.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-69114-static-ty.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-73159-rpit-static.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-73159-rpit-static.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-75777.rs Move tests 2023-02-16 11:42:35 -03:00
issue-75777.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-78561.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-95272.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-95272.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-97997.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-97997.stderr Add a note to duplicate diagnostics 2023-10-05 01:04:41 +00:00
issue-98170.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-98170.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-98589-closures-relate-named-regions.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-98589-closures-relate-named-regions.stderr remove trailing dots 2023-10-08 10:06:17 +00:00
issue-98693.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-98693.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-112604-closure-output-normalize.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
lint-no-err.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
loan_ends_mid_block_pair.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
loan_ends_mid_block_pair.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
loan_ends_mid_block_vec.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
loan_ends_mid_block_vec.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
local-outlives-static-via-hrtb.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
local-outlives-static-via-hrtb.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
lub-if.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lub-if.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lub-match.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lub-match.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
match-cfg-fake-edges2.rs Add tests 2024-04-03 21:02:47 +02:00
match-cfg-fake-edges2.stderr Add tests 2024-04-03 21:02:47 +02:00
match-cfg-fake-edges.rs Add if let tests 2024-04-03 23:16:27 +02:00
match-cfg-fake-edges.stderr Handle more cases of value suggestions 2024-04-10 20:36:14 +00:00
match-guards-always-borrow.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
match-guards-always-borrow.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
match-guards-partially-borrow.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
match-guards-partially-borrow.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
match-on-borrowed.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
match-on-borrowed.stderr Tweak value suggestions in borrowck and hir_analysis 2024-04-09 23:37:13 +00:00
maybe-initialized-drop-implicit-fragment-drop.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
maybe-initialized-drop-implicit-fragment-drop.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
maybe-initialized-drop-uninitialized.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
maybe-initialized-drop-with-fragment.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
maybe-initialized-drop-with-fragment.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
maybe-initialized-drop-with-uninitialized-fragments.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
maybe-initialized-drop-with-uninitialized-fragments.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
maybe-initialized-drop.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
maybe-initialized-drop.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
mir_check_cast_closure.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
mir_check_cast_closure.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
mir_check_cast_reify.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
mir_check_cast_reify.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
mir_check_cast_unsafe_fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
mir_check_cast_unsafe_fn.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
mir_check_cast_unsize.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
mir_check_cast_unsize.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
missing-universe-cause-issue-114907.rs eagerly instantiate binders to avoid relying on sub 2024-03-14 17:19:40 +01:00
missing-universe-cause-issue-114907.stderr eagerly instantiate binders to avoid relying on sub 2024-03-14 17:19:40 +01:00
move-errors.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
move-errors.stderr Mention when the type of the moved value doesn't implement Clone 2024-04-11 16:41:42 +00:00
move-subpaths-moves-root.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
move-subpaths-moves-root.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
mutating_references.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
normalization-bounds-error.rs Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
normalization-bounds-error.stderr Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
normalization-bounds.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
outlives-suggestion-more.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
outlives-suggestion-more.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
outlives-suggestion-simple.polonius.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
outlives-suggestion-simple.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
outlives-suggestion-simple.stderr diagnostics: update test cases to refer to assoc fn with self as method 2023-02-22 08:40:47 -07:00
process_or_insert_default.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
projection-return.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
promotable-mutable-zst-doesnt-conflict.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
promoted-bounds.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
promoted-bounds.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
promoted-closure-pair.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
promoted-closure-pair.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
promoted-liveness.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
rc-loop.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
ref-suggestion.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
ref-suggestion.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
reference-carried-through-struct-field.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
reference-carried-through-struct-field.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
region-ends-after-if-condition.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
region-ends-after-if-condition.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
return_from_loop.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
return_from_loop.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
return-ref-mut-issue-46557.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
return-ref-mut-issue-46557.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
self-assign-ref-mut.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
snocat-regression.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
snocat-regression.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
trait-associated-constant.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
trait-associated-constant.stderr recurse into refs when comparing tys for diagnostics 2023-12-07 23:00:46 -05:00
type-alias-free-regions.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
type-alias-free-regions.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
type-check-pointer-coercions.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
type-check-pointer-coercions.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
type-check-pointer-comparisons.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
type-check-pointer-comparisons.stderr Add a note to duplicate diagnostics 2023-10-05 01:04:41 +00:00
type-test-universe.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
type-test-universe.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unexpected-inference-var-ice-116599.rs add test for #116599 2024-03-24 10:05:27 +01:00
unused-mut-issue-50343.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unused-mut-issue-50343.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unused-mut-issue-50343.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
vimwiki-core-regression.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
where_clauses_in_functions.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
where_clauses_in_functions.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
where_clauses_in_structs.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
where_clauses_in_structs.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00