-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use short ty string for move errors #136018
Conversation
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
Some changes occurred in match checking cc @Nadrieril |
``` error[E0382]: use of moved value: `x` --> bay.rs:14:14 | 12 | fn foo(x: D) { | - move occurs because `x` has type `(((..., ..., ..., ...), ..., ..., ...), ..., ..., ...)`, which does not implement the `Copy` trait 13 | let _a = x; | - value moved here 14 | let _b = x; //~ ERROR use of moved value | ^ value used here after move | = note: the full type name has been written to 'bay.long-type-14349227078439097973.txt' = note: consider using `--verbose` to print the full type name to the console help: consider cloning the value if the performance cost is acceptable | 13 | let _a = x.clone(); | ++++++++ ```
0ffffd2
to
91b7593
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
@@ -289,6 +289,8 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> { | |||
None => "value".to_owned(), | |||
}; | |||
if needs_note { | |||
let mut path = None; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having to duplicate the path book keeping is a bit unfortunate, but oh well
r? jieyouxu @bors r+ rollup |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#135971 (Properly report error when object type param default references self) - rust-lang#135977 (Fix `FormattingOptions` instantiation with `Default`) - rust-lang#135985 (Rename test to `unresolvable-upvar-issue-87987.rs` and add some notes) - rust-lang#135991 (Fix set_name in thread mod for NuttX) - rust-lang#136009 (bootstrap: Handle bootstrap lockfile race condition better) - rust-lang#136018 (Use short ty string for move errors) - rust-lang#136027 (Skip suggestions in `derive`d code) - rust-lang#136029 (Bootstrap: Don't move ownership of job object) - rust-lang#136034 (fix(bootstrap): deserialize null as `f64::NAN`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#136018 - estebank:long-moved-type, r=jieyouxu Use short ty string for move errors ``` error[E0382]: use of moved value: `x` --> bay.rs:14:14 | 12 | fn foo(x: D) { | - move occurs because `x` has type `(((..., ..., ..., ...), ..., ..., ...), ..., ..., ...)`, which does not implement the `Copy` trait 13 | let _a = x; | - value moved here 14 | let _b = x; //~ ERROR use of moved value | ^ value used here after move | = note: the full type name has been written to 'bay.long-type-14349227078439097973.txt' = note: consider using `--verbose` to print the full type name to the console help: consider cloning the value if the performance cost is acceptable | 13 | let _a = x.clone(); | ++++++++ ``` Address 4th case in rust-lang#135919.
Address 4th case in #135919.