Skip to content
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

fix: Correct span info for mir::Operand #19247

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alibektas
Copy link
Member

Fixes #19172

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 27, 2025
@alibektas
Copy link
Member Author

alibektas commented Feb 27, 2025

Right now the question is whether I should go the extra mile and make Operands span field of type MirSpan and not Option<MirSpan> ?

@alibektas alibektas changed the title Fix span info for mir::Operand fix: Correct span info for mir::Operand Feb 27, 2025
@@ -18,7 +18,22 @@ pub(crate) fn moved_out_of_ref(ctx: &DiagnosticsContext<'_>, d: &hir::MovedOutOf
mod tests {
use crate::tests::check_diagnostics;

// FIXME: spans are broken
#[test]
fn abc() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That... doesn't seem like the most descriptive name.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry about that 😂

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't worry, it happens to me too that I put a test before the changes and don't bother to make its name meaningful, I understand you can forget to do that after :)

@ChayimFriedman2
Copy link
Contributor

I think it'd be better if we wouldn't make this optional when there is no reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cannot move out of reference error has bad span
3 participants