Uh oh!
There was an error while loading. Please reload this page.
Stabilize the panic_col feature - #46762
Conversation
rust-highfive
commented
Dec 16, 2017
r? @TimNN (rust_highfive has picked a reviewer for you, use r? to override) |
TimNN
commented
Dec 17, 2017
cc @rust-lang/libs: There seems nothing more to do here, does this require any kind of FCP? |
alexcrichton
commented
Dec 18, 2017
@rfcbot fcp merge Yeah for stabilizations we do indeed like to go through FCP! |
Team member @alexcrichton has proposed to merge this. The next step is review by the rest of the tagged teams: Concerns:
Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
dtolnay
commented
Dec 18, 2017
Is it intentional that line numbers in a panic start at 1 but column numbers start at 0? I see that this is what fnmain(){panic!("line 2 column 0");}@rfcbot concern 0 |
sfackler
commented
Dec 18, 2017
vim seems to start at 1 for lines and columns. |
est31
commented
Dec 18, 2017
Compiler errors in both Rust and gcc start at 1 for columns as well. If you have code like: fnmain(){panic!("line 2 column 0");}Rust will say the column is 1 and if you do kate src/main.rs:linenum:1 then it jumps to the space, not the panic. I'd say this is a off-by-one error and a bug in the actual code that emits the panic column info. I'd also say that it's a bug with the |
Note that this code gives you the correct column number: fnmain(){let v = [1,2,3];
v[7];}This is because this panic is directly emitted by the compiler and thus uses a separate way to obtain the column. I guess I'll just add one to the column value for the panic macro case. |
est31
commented
Dec 19, 2017
Not sure how to add a regression test for this. Any ideas? |
sfackler
commented
Dec 19, 2017
You should be able to make an rpass test that sets a panic handle that looks at the column. |
est31
commented
Dec 20, 2017
@sfackler good idea, will do |
dtolnay
commented
Dec 20, 2017
@rfcbot resolved 0 |
dtolnay
commented
Dec 20, 2017
We discussed this with the libs team and we would be interested in fixing the |
est31
commented
Dec 23, 2017
I've marked this as WIP until the column issue is resolved. |
0855471 to
131a9d8Comparesfackler
commented
Jan 4, 2018
LGTM |
est31
commented
Jan 4, 2018
carols10cents
commented
Jan 9, 2018
rfcbot
commented
Jan 9, 2018
🔔 This is now entering its final comment period, as per the review above. 🔔 |
alexcrichton
commented
Jan 10, 2018
@bors: r+ |
bors
commented
Jan 10, 2018
📌 Commit 131a9d8 has been approved by |
There was a problem hiding this comment.
Shouldn't this be since = "1.25" now?
I've added the panic_col feature in PR rust-lang#42938. Now it's time to stabilize it! Closesrust-lang#42939.
est31
commented
Jan 10, 2018
re-r? @alexcrichton |
alexcrichton
commented
Jan 10, 2018
@bors: r+ |
bors
commented
Jan 10, 2018
📌 Commit 2491814 has been approved by |
frewsxcv
commented
Jan 10, 2018
@bors rollup |
Stabilize the panic_col feature I've added the panic_col feature in PR rust-lang#42938. Now it's time to stabilize it! Closesrust-lang#42939.
bors
commented
Jan 10, 2018
☔ The latest upstream changes (presumably #47308) made this pull request unmergeable. Please resolve the merge conflicts. |
I've added the panic_col feature in PR #42938.
Now it's time to stabilize it!
Closes#42939.