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

rustc_span: encode 1-based line number as it's own type, not usize #100234

Closed
wants to merge 4 commits into from

Conversation

klensy
Copy link
Contributor

@klensy klensy commented Aug 7, 2022

r? @ghost

Want to see what/where will be broken.

@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 7, 2022
@klensy klensy force-pushed the line-num branch 2 times, most recently from 771904c to 9d7f3a8 Compare August 7, 2022 15:23
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@klensy klensy force-pushed the line-num branch 2 times, most recently from 68e8250 to 778a662 Compare August 9, 2022 14:33
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-12 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
 ---> 2afb3e7bef8f
Step 3/8 : RUN apt-get update && apt-get install -y --no-install-recommends   g++   gcc-multilib   make   ninja-build   file   curl   ca-certificates   python2.7   python3.9   git   cmake   sudo   gdb   llvm-12-tools   llvm-12-dev   libedit-dev   libssl-dev   pkg-config   zlib1g-dev   xz-utils   nodejs
 ---> Using cache
 ---> 357fae1e02d2
Step 4/8 : RUN apt-get update &&     apt-get install -y apt-transport-https software-properties-common &&     curl -s "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb" > packages-microsoft-prod.deb &&     dpkg -i packages-microsoft-prod.deb &&     apt-get update &&     apt-get install -y powershell
 ---> 080d1843107f
Step 5/8 : COPY scripts/sccache.sh /scripts/
 ---> Using cache
 ---> 4a6c76c56ba3
---

---- [ui] src/test/ui/proc-macro/span-absolute-posititions.rs stdout ----
diff of stderr:

- error: line/column mismatch: (0, 35) != (21, 35)
+ error: line/column mismatch: (5, 35) != (5, 36)
+    |
+    |
+ LL | assert_span_pos::assert_span_pos!(5, 35);
+ 
+ 
+ error: line/column mismatch: (8, 39) != (8, 40)
+    |
+    |
+ LL |     assert_span_pos::assert_span_pos!(8, 39);
+ 
+ 
+ error: line/column mismatch: (10, 36) != (10, 37)
+    |
+    |
+ LL |     assert_span_pos::assert_span_pos!(10, 36);
+ 
+ 
+ error: line/column mismatch: (16, 40) != (16, 41)
+    |
+    |
+ LL | /*🌈*/assert_span_pos::assert_span_pos!(16, 40);
+ 
+ 
+ error: line/column mismatch: (18, 43) != (18, 44)
+    |
+    |
+ LL | /*🏳️🌈*/assert_span_pos::assert_span_pos!(18, 43);
+ 
+ 
+ error: line/column mismatch: (0, 35) != (21, 36)
3    |
3    |
4 LL | assert_span_pos::assert_span_pos!(0, 35);
5    |                                   ^
6 
6 
- error: line/column mismatch: (22, 0) != (22, 35)
+ error: line/column mismatch: (22, 0) != (22, 36)
9    |
9    |
10 LL | assert_span_pos::assert_span_pos!(22, 0);
11    |                                   ^^
12 
- error: aborting due to 2 previous errors
+ error: aborting due to 7 previous errors
---
To only update this specific test, also pass `--test-args proc-macro/span-absolute-posititions.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/proc-macro/span-absolute-posititions.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/proc-macro/span-absolute-posititions" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/proc-macro/span-absolute-posititions/auxiliary"
stdout: none
--- stderr -------------------------------
error: line/column mismatch: (5, 35) != (5, 36)
   |
   |
LL | assert_span_pos::assert_span_pos!(5, 35);


error: line/column mismatch: (8, 39) != (8, 40)
   |
   |
LL |     assert_span_pos::assert_span_pos!(8, 39);


error: line/column mismatch: (10, 36) != (10, 37)
   |
   |
LL |     assert_span_pos::assert_span_pos!(10, 36);


error: line/column mismatch: (16, 40) != (16, 41)
   |
   |
LL | /*🌈*/assert_span_pos::assert_span_pos!(16, 40);


error: line/column mismatch: (18, 43) != (18, 44)
   |
   |
LL | /*🏳️🌈*/assert_span_pos::assert_span_pos!(18, 43);

Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
error: line/column mismatch: (0, 35) != (21, 36)
   |
   |
LL | assert_span_pos::assert_span_pos!(0, 35); //~ ERROR line/column mismatch: (0, 35) != (21, 35)


error: line/column mismatch: (22, 0) != (22, 36)
   |
   |
LL | assert_span_pos::assert_span_pos!(22, 0); //~ ERROR line/column mismatch: (22, 0) != (22, 35)

error: aborting due to 7 previous errors
------------------------------------------

@bors
Copy link
Contributor

bors commented Aug 25, 2022

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

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 25, 2022
@Dylan-DPC
Copy link
Member

Closing this as it was an experiment

@Dylan-DPC Dylan-DPC closed this May 15, 2023
@Dylan-DPC Dylan-DPC removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc 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