rust/tests
Matthias Krüger 8de487fdbd
Rollup merge of #124599 - estebank:issue-41708, r=wesleywiser
Suggest borrowing on fn argument that is `impl AsRef`

When encountering a move conflict, on an expression that is `!Copy` passed as an argument to an `fn` that is `impl AsRef`, suggest borrowing the expression.

```
error[E0382]: use of moved value: `bar`
  --> f204.rs:14:15
   |
12 |     let bar = Bar;
   |         --- move occurs because `bar` has type `Bar`, which does not implement the `Copy` trait
13 |     foo(bar);
   |         --- value moved here
14 |     let baa = bar;
   |               ^^^ value used here after move
   |
help: borrow the value to avoid moving it
   |
13 |     foo(&bar);
   |         +
```

Fix #41708
2024-07-11 17:01:36 +02:00
..
assembly Always preserve user-written comments in assembly 2024-07-02 21:41:59 -04:00
auxiliary
codegen Use the aligned size for alloca at ret when the pass mode is cast. 2024-07-02 06:33:40 +08:00
codegen-units Avoid MIR bloat in inlining 2024-07-01 05:17:13 -07:00
coverage coverage. Fix panic when generating mcdc code for inlined functions 2024-07-09 14:28:40 +08:00
coverage-run-rustdoc coverage: Extract hole spans from HIR instead of MIR 2024-07-08 21:22:56 +10:00
crashes Avoid follow-up errors and ICEs after missing lifetime errors on data structures 2024-07-11 11:00:15 +00:00
debuginfo Add Natvis visualiser and debuginfo tests for f16 2024-07-09 03:47:50 +01:00
incremental
mir-opt Auto merge of #127028 - Nadrieril:fix-or-pat-expansion, r=matthewjasper 2024-07-09 16:33:59 +00:00
pretty Mark format! with must_use hint 2024-07-06 14:24:20 +02:00
run-make Auto merge of #127538 - Oneirical:the-sacred-tests, r=jieyouxu 2024-07-11 00:56:46 +00:00
run-pass-valgrind
rustdoc Migrate tests to use -Znext-solver 2024-06-30 17:08:45 +00:00
rustdoc-gui Don't call switch-theme function 2024-06-29 11:56:06 +02:00
rustdoc-js
rustdoc-js-std
rustdoc-json rustdoc-json: add trait/type alias tests 2024-07-07 15:02:30 +01:00
rustdoc-ui Auto merge of #127311 - oli-obk:do_not_count_errors, r=compiler-errors 2024-07-11 11:51:33 +00:00
ui Rollup merge of #124599 - estebank:issue-41708, r=wesleywiser 2024-07-11 17:01:36 +02:00
ui-fulldeps Always use a colon in //@ normalize-*: headers 2024-07-11 12:23:44 +10:00
COMPILER_TESTS.md