rust/tests/ui/variance
Esteban Küber a1a3abb08f When possible, suggest cloning the result of a call instead of an argument
```
error[E0505]: cannot move out of `a` because it is borrowed
  --> $DIR/variance-issue-20533.rs:28:14
   |
LL |         let a = AffineU32(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).clone();
   |                        ++++++++
```
2024-04-11 16:41:41 +00:00
..
variance-associated-consts.rs Merge check_mod_impl_wf and check_mod_type_wf 2024-03-07 06:27:09 +00:00
variance-associated-consts.stderr Provide structured suggestion for unconstrained generic constant 2024-03-21 00:03:59 +00:00
variance-associated-types2.rs
variance-associated-types2.stderr
variance-associated-types.rs
variance-associated-types.stderr
variance-btree-invariant-types.rs
variance-btree-invariant-types.stderr
variance-cell-is-invariant.rs
variance-cell-is-invariant.stderr
variance-contravariant-arg-object.rs
variance-contravariant-arg-object.stderr
variance-contravariant-arg-trait-match.rs
variance-contravariant-arg-trait-match.stderr
variance-contravariant-self-trait-match.rs
variance-contravariant-self-trait-match.stderr
variance-covariant-arg-object.rs
variance-covariant-arg-object.stderr
variance-covariant-arg-trait-match.rs
variance-covariant-arg-trait-match.stderr
variance-covariant-self-trait-match.rs
variance-covariant-self-trait-match.stderr
variance-intersection-of-ref-and-opt-ref.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
variance-invariant-arg-object.rs
variance-invariant-arg-object.stderr
variance-invariant-arg-trait-match.rs
variance-invariant-arg-trait-match.stderr
variance-invariant-self-trait-match.rs
variance-invariant-self-trait-match.stderr
variance-issue-20533.rs When possible, suggest cloning the result of a call instead of an argument 2024-04-11 16:41:41 +00:00
variance-issue-20533.stderr When possible, suggest cloning the result of a call instead of an argument 2024-04-11 16:41:41 +00:00
variance-iterators-in-libcore.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
variance-object-types.rs
variance-object-types.stderr
variance-regions-direct.rs Merge check_mod_impl_wf and check_mod_type_wf 2024-03-07 06:27:09 +00:00
variance-regions-direct.stderr Revert "Auto merge of #122140 - oli-obk:track_errors13, r=davidtwco" 2024-03-11 21:28:16 +00:00
variance-regions-indirect.rs Merge check_mod_impl_wf and check_mod_type_wf 2024-03-07 06:27:09 +00:00
variance-regions-indirect.stderr Revert "Auto merge of #122140 - oli-obk:track_errors13, r=davidtwco" 2024-03-11 21:28:16 +00:00
variance-regions-unused-direct.rs
variance-regions-unused-direct.stderr
variance-regions-unused-indirect.rs
variance-regions-unused-indirect.stderr
variance-trait-bounds.rs Merge check_mod_impl_wf and check_mod_type_wf 2024-03-07 06:27:09 +00:00
variance-trait-bounds.stderr Revert "Auto merge of #122140 - oli-obk:track_errors13, r=davidtwco" 2024-03-11 21:28:16 +00:00
variance-trait-matching.rs
variance-trait-matching.stderr
variance-trait-object-bound.rs
variance-trait-object-bound.stderr
variance-types-bounds.rs
variance-types-bounds.stderr
variance-types.rs
variance-types.stderr
variance-unused-region-param.rs
variance-unused-region-param.stderr
variance-unused-type-param.rs
variance-unused-type-param.stderr
variance-use-contravariant-struct-1.rs
variance-use-contravariant-struct-1.stderr
variance-use-contravariant-struct-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
variance-use-covariant-struct-1.rs
variance-use-covariant-struct-1.stderr
variance-use-covariant-struct-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
variance-use-invariant-struct-1.rs
variance-use-invariant-struct-1.stderr