Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jonathandturner (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
|
Looks good! @bors r+ rollup |
|
📌 Commit c5f9feb has been approved by |
| let mut err = struct_span_err!(self.sess, span, E0072, | ||
| "recursive type `{}` has infinite size", | ||
| self.item_path_str(type_def_id)); | ||
| err.span_label(span, &format!("recursive type has infinite size")); |
There was a problem hiding this comment.
Seems like the call to format! is unnecessary?
There was a problem hiding this comment.
it's not technically required here, though harmless.
…t, r=jonathandturner E0072 update error format Part of rust-lang#35233 Fixes rust-lang#35506 r? @jonathandturner The bonus for this issue currently seems to be impossible to do reliably, as the compiler seems to lack span information for item names alone, like `Foo` in `struct Foo { ... }`. It would be possible to hack something together by computing span offsets, but that seems like a solution that would be begging for trouble. A proper solution to this would, of course, be to add span information to the right place (seems to be `rustc::hir::Item::name` but I may be wrong).
Part of #35233
Fixes #35506
r? @jonathandturner
The bonus for this issue currently seems to be impossible to do reliably, as the compiler seems to lack span information for item names alone, like
Fooinstruct Foo { ... }. It would be possible to hack something together by computing span offsets, but that seems like a solution that would be begging for trouble.A proper solution to this would, of course, be to add span information to the right place (seems to be
rustc::hir::Item::namebut I may be wrong).