Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c88e6a7
add Windows system error codes that map to io::ErrorKind::TimedOut
May 1, 2020
8667996
use or pattern to match error codes that map to ErrorKind::TimedOut
carstenandrich May 2, 2020
c69d6c8
fix formatting issues that fail tidy test
carstenandrich May 2, 2020
e27a8b5
add link list of error codes on docs.microsoft.com
Jun 13, 2020
c9c434d
Converted all platform-specific stdin/stdout/stderr implementations t…
Lucretiel Jun 19, 2020
e93362b
Fixed missing `mut`
Lucretiel Jun 19, 2020
0094f44
Remove old commented code
Lucretiel Jun 19, 2020
e3d735d
Fix typo in error_codes doc
dario23 Jun 21, 2020
1c74ab4
Make is_freeze and is_copy_modulo_regions take TyCtxtAt
RalfJung Jun 21, 2020
3bfd0c9
remove switch_ty reliance in codegen
RalfJung Jun 21, 2020
6297228
MIR validation: check switch_ty
RalfJung Jun 21, 2020
7447bf2
fmt
RalfJung Jun 21, 2020
953104e
Fix spurious 'value moved here in previous iteration of loop' messages
Aaron1011 Jun 22, 2020
c474317
Clean up E0699 explanation
GuillaumeGomez Jun 22, 2020
6276c13
Rollup merge of #71756 - carstenandrich:master, r=dtolnay
Dylan-DPC Jun 23, 2020
5426586
Rollup merge of #73495 - Lucretiel:wasi-io-impls, r=sfackler
Dylan-DPC Jun 23, 2020
4dfae77
Rollup merge of #73575 - dario23:typo-errorcodes-doc, r=matthewjasper
Dylan-DPC Jun 23, 2020
963a480
Rollup merge of #73578 - RalfJung:ty-ctxt-at, r=jonas-schievink
Dylan-DPC Jun 23, 2020
490d820
Rollup merge of #73586 - RalfJung:switch-ty, r=oli-obk
Dylan-DPC Jun 23, 2020
b3d99cb
Rollup merge of #73600 - Aaron1011:fix/move-in-macro, r=ecstatic-morse
Dylan-DPC Jun 23, 2020
e979392
Rollup merge of #73610 - GuillaumeGomez:cleanup-e0699, r=Dylan-DPC
Dylan-DPC Jun 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {

let move_msg = if move_spans.for_closure() { " into closure" } else { "" };

if span == move_span {
if location == move_out.source {
err.span_label(
span,
format!("value moved{} here, in previous iteration of loop", move_msg),
Expand Down
15 changes: 15 additions & 0 deletions src/test/ui/moves/issue-46099-move-in-macro.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Regression test for issue #46099
// Tests that we don't emit spurious
// 'value moved in previous iteration of loop' message

macro_rules! test {
($v:expr) => {{
drop(&$v);
$v
}}
}

fn main() {
let b = Box::new(true);
test!({b}); //~ ERROR use of moved value
}
14 changes: 14 additions & 0 deletions src/test/ui/moves/issue-46099-move-in-macro.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
error[E0382]: use of moved value: `b`
--> $DIR/issue-46099-move-in-macro.rs:14:12
|
LL | let b = Box::new(true);
| - move occurs because `b` has type `std::boxed::Box<bool>`, which does not implement the `Copy` trait
LL | test!({b});
| ^
| |
| value moved here
| value used here after move

error: aborting due to previous error

For more information about this error, try `rustc --explain E0382`.
5 changes: 4 additions & 1 deletion src/test/ui/moves/move-in-guard-2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ LL | let x: Box<_> = box 1;
| - move occurs because `x` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
...
LL | (_, 2) if take(x) => (),
| ^ value moved here, in previous iteration of loop
| ^
| |
| value moved here
| value used here after move

error: aborting due to previous error

Expand Down