Skip to content

Better inline assembly errors #21518

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

Merged
merged 1 commit into from
Jan 25, 2015
Merged

Better inline assembly errors #21518

merged 1 commit into from
Jan 25, 2015

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Jan 22, 2015

Before:

error: invalid operand for inline asm constraint 'i' at line 11

Note that 11 is not the line the inline assembly appears in.

After:

src/arch/x64/multiboot/bootstrap.rs:203:5: 209:9 error: invalid operand for inline asm constraint 'i'
src/arch/x64/multiboot/bootstrap.rs:203     asm! {
src/arch/x64/multiboot/bootstrap.rs:204         [multiboot => %ecx, mod attsyntax]
src/arch/x64/multiboot/bootstrap.rs:205 
src/arch/x64/multiboot/bootstrap.rs:206         ljmp {size_of::<Descriptor>() => %i}, $bootstrap.64
src/arch/x64/multiboot/bootstrap.rs:207     }
src/arch/x64/multiboot/bootstrap.rs:208 
                                        ...
error: aborting due to previous error

@rust-highfive
Copy link
Contributor

r? @luqmana

(rust_highfive has picked a reviewer for you, use r? to override)

@luqmana
Copy link
Member

luqmana commented Jan 25, 2015

@bors: r+ 4cfb700

bors added a commit that referenced this pull request Jan 25, 2015
Before:
```
error: invalid operand for inline asm constraint 'i' at line 11
```
Note that 11 is not the line the inline assembly appears in.

After:
```
src/arch/x64/multiboot/bootstrap.rs:203:5: 209:9 error: invalid operand for inline asm constraint 'i'
src/arch/x64/multiboot/bootstrap.rs:203     asm! {
src/arch/x64/multiboot/bootstrap.rs:204         [multiboot => %ecx, mod attsyntax]
src/arch/x64/multiboot/bootstrap.rs:205 
src/arch/x64/multiboot/bootstrap.rs:206         ljmp {size_of::<Descriptor>() => %i}, $bootstrap.64
src/arch/x64/multiboot/bootstrap.rs:207     }
src/arch/x64/multiboot/bootstrap.rs:208 
                                        ...
error: aborting due to previous error
```
@bors
Copy link
Collaborator

bors commented Jan 25, 2015

⌛ Testing commit 4cfb700 with merge d151923...

@bors
Copy link
Collaborator

bors commented Jan 25, 2015

@bors bors merged commit 4cfb700 into rust-lang:master Jan 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants