-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Point to variable in asm!
macro when failing borrowck
#54945
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
@@ -1812,6 +1812,7 @@ pub struct InlineAsmOutput { | |||
pub constraint: Symbol, | |||
pub is_rw: bool, | |||
pub is_indirect: bool, | |||
pub span: Span, |
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.
Looks like there's no need to keep span here additionally, output expressions are already preserved in hir::ExprKind::InlineAsm
(the first HirVec<Expr>
), so spans can be taken from there.
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.
This addition is needed in https://github.com/rust-lang/rust/pull/54945/files#diff-5b4d01d26caf43976125ba0f877e78c0 (for the nll output) as we have StatementKind::InlineAsm
available only. ExprKind::InlineAsm
is accessible for ast-based borrow checker and there it is indeed using the expr.span
(https://github.com/rust-lang/rust/pull/54945/files#diff-dc986596b3470440badc6fb1a667adca).
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.
I see.
@bors r+ |
📌 Commit 57f10c7 has been approved by |
Point to variable in `asm!` macro when failing borrowck Fix rust-lang#34940.
Point to variable in `asm!` macro when failing borrowck Fix #34940.
☀️ Test successful - status-appveyor, status-travis |
Fix #34940.