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 Parser::break_up_float's right span #130349

Merged
merged 3 commits into from
Sep 14, 2024
Merged

Conversation

ShE3py
Copy link
Contributor

@ShE3py ShE3py commented Sep 14, 2024

use std::mem::offset_of;

fn main() {
    offset_of!((u8,), 0.0);
}

Before:

error[E0609]: no field `0` on type `u8`
    --> ./main.rs:4:25
     |
4    |       offset_of!((u8,), 0.0);
     |  _____--------------------^-
     | |     |
     | |     in this macro invocation
5    | | }
...    |
     |
     = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 1 previous error

After:

error[E0609]: no field `0` on type `u8`
 --> ./main.rs:4:25
  |
4 |     offset_of!((u8,), 0.0);
  |                         ^

error: aborting due to 1 previous error

@rustbot label +A-parser +D-imprecise-spans

@rustbot
Copy link
Collaborator

rustbot commented Sep 14, 2024

r? @chenyukang

rustbot has assigned @chenyukang.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-parser Area: The parsing of Rust source code to an AST D-imprecise-spans Diagnostics: spans don't point to exactly the erroneous code labels Sep 14, 2024
@fmease fmease assigned fmease and unassigned chenyukang Sep 14, 2024
@fmease
Copy link
Member

fmease commented Sep 14, 2024

cc #123877 (comment)

@fmease
Copy link
Member

fmease commented Sep 14, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 14, 2024

📌 Commit 4cb5849 has been approved by fmease

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 14, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 14, 2024
Rollup of 6 pull requests

Successful merges:

 - rust-lang#130017 (coverage: Extract `executor::block_on` from several async coverage tests)
 - rust-lang#130268 (simd_shuffle: require index argument to be a vector)
 - rust-lang#130290 (Stabilize entry_insert)
 - rust-lang#130294 (Lifetime cleanups)
 - rust-lang#130343 (docs: Enable required feature for 'closure_returning_async_block' lint)
 - rust-lang#130349 (Fix `Parser::break_up_float`'s right span)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 2b40fdb into rust-lang:master Sep 14, 2024
6 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 14, 2024
Rollup merge of rust-lang#130349 - ShE3py:break_up_float, r=fmease

Fix `Parser::break_up_float`'s right span

```rs
use std::mem::offset_of;

fn main() {
    offset_of!((u8,), 0.0);
}
```
Before:
```
error[E0609]: no field `0` on type `u8`
    --> ./main.rs:4:25
     |
4    |       offset_of!((u8,), 0.0);
     |  _____--------------------^-
     | |     |
     | |     in this macro invocation
5    | | }
...    |
     |
     = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 1 previous error
```
After:
```
error[E0609]: no field `0` on type `u8`
 --> ./main.rs:4:25
  |
4 |     offset_of!((u8,), 0.0);
  |                         ^

error: aborting due to 1 previous error
```

---
`@rustbot` label +A-parser +D-imprecise-spans
@rustbot rustbot added this to the 1.83.0 milestone Sep 14, 2024
@bors
Copy link
Contributor

bors commented Sep 14, 2024

☔ The latest upstream changes (presumably #130357) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 14, 2024
nnethercote added a commit to nnethercote/rust that referenced this pull request Sep 24, 2024
It was added in rust-lang#130349, but it's not used meaningfully, and causes
difficulties for Nonterminal removal in rust-lang#124141.
nnethercote added a commit to nnethercote/rust that referenced this pull request Sep 24, 2024
It was added in rust-lang#130349, but it's not used meaningfully, and causes
difficulties for Nonterminal removal in rust-lang#124141.
nnethercote added a commit to nnethercote/rust that referenced this pull request Sep 25, 2024
It was added in rust-lang#130349, but it's not used meaningfully, and causes
difficulties for Nonterminal removal in rust-lang#124141.
nnethercote added a commit to nnethercote/rust that referenced this pull request Oct 28, 2024
It was added in rust-lang#130349, but it's not used meaningfully, and causes
difficulties for Nonterminal removal in rust-lang#124141.
nnethercote added a commit to nnethercote/rust that referenced this pull request Oct 30, 2024
It was added in rust-lang#130349, but it's not used meaningfully, and causes
difficulties for Nonterminal removal in rust-lang#124141.
nnethercote added a commit to nnethercote/rust that referenced this pull request Nov 5, 2024
It was added in rust-lang#130349, but it's not used meaningfully, and causes
difficulties for Nonterminal removal in rust-lang#124141.
nnethercote added a commit to nnethercote/rust that referenced this pull request Nov 13, 2024
It was added in rust-lang#130349, but it's not used meaningfully, and causes
difficulties for Nonterminal removal in rust-lang#124141.
nnethercote added a commit to nnethercote/rust that referenced this pull request Nov 18, 2024
It was added in rust-lang#130349, but it's not used meaningfully, and causes
difficulties for Nonterminal removal in rust-lang#124141.
nnethercote added a commit to nnethercote/rust that referenced this pull request Nov 20, 2024
It was added in rust-lang#130349, but it's not used meaningfully, and causes
difficulties for Nonterminal removal in rust-lang#124141.
icmccorm pushed a commit to borrow-sanitizer/rust that referenced this pull request Nov 22, 2024
It was added in rust-lang#130349, but it's not used meaningfully, and causes
difficulties for Nonterminal removal in rust-lang#124141.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-parser Area: The parsing of Rust source code to an AST D-imprecise-spans Diagnostics: spans don't point to exactly the erroneous code S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants