-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #67149 - JohnTitor:fix-ice-1, r=Dylan-DPC
Do not ICE #67123 Fixes #67123 r? @matthewjasper
- Loading branch information
Showing
3 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
fn foo<T>(t: T) { | ||
|| { t; t; }; //~ ERROR: use of moved value | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
error[E0382]: use of moved value: `t` | ||
--> $DIR/issue-67123.rs:2:13 | ||
| | ||
LL | fn foo<T>(t: T) { | ||
| - help: consider restricting this bound: `T: Copy` | ||
LL | || { t; t; }; | ||
| - ^ value used here after move | ||
| | | ||
| value moved here | ||
| | ||
= note: move occurs because `t` has type `T`, which does not implement the `Copy` trait | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0382`. |