Uh oh!
There was an error while loading. Please reload this page.
Point to enclosing block/fn on nested unsafe - #39202
Conversation
rust-highfive
commented
Jan 20, 2017
r? @arielb1 (rust_highfive has picked a reviewer for you, use r? to override) |
estebank
commented
Jan 20, 2017
durka
commented
Jan 21, 2017
Might want to carve out an exception for unsafe blocks within macros. |
estebank
commented
Jan 29, 2017
nikomatsakis
commented
Feb 2, 2017
@estebank this seems nice; but it'd be nicer still if we used a more targeted span (i.e., just the |
estebank
commented
Feb 2, 2017
@nikomatsakis There's only one reason I'm reticent to that suggestion: The current presentation will only be as shown if the block is less than 8 lines (showing only the first line that contains the keyword otherwise), and I'm looking into making the multiline presentation smarter about longer blocks (instead of using the first line, showing the first X and last Y lines). I feel it is useful to know both the start and end of the enclosing block (as not everyone will know about "jump to closing brace" in their editor) when possible. What do you think? |
nikomatsakis
commented
Feb 2, 2017
@estebank I think people can find the end of their blocks ok, personally. But also, I sort of like the "collapsed" error where both of the unsafe blocks are shown simultaneously, but
|
arielb1
commented
Feb 26, 2017
Personally, I don't like errors with separate spans - it blasts the console too much. |
arielb1
commented
Feb 26, 2017
The code seems ok. I think r? @jonathandturner |
sophiajt
commented
Feb 26, 2017
Looks good. @bors r+ |
bors
commented
Feb 26, 2017
📌 Commit f31c8b7 has been approved by |
bors
commented
Feb 26, 2017
⌛ Testing commit f31c8b7 with merge 2ae8de7... |
bors
commented
Feb 26, 2017
💔 Test failed - status-travis |
sophiajt
commented
Feb 26, 2017
Seems like a legit failure: |
hanna-kruppe
commented
Feb 26, 2017
FYI: The fix for this is simply using |
f0c6be0 to
3a9560aCompare@jonathandturner fixed merge conflict and added label to the block. |
sophiajt
commented
Mar 6, 2017
@bors r+ |
bors
commented
Mar 6, 2017
📌 Commit 3a9560a has been approved by |
…turner
Point to enclosing block/fn on nested unsafe
When declaring nested unsafe blocks (`unsafe {unsafe {}}`) that trigger
the "unnecessary `unsafe` block" error, point out the enclosing `unsafe
block` or `unsafe fn` that makes it unnecessary.
<img width="621" alt="" src="https://cloud.githubusercontent.com/assets/1606434/22139922/26ad468a-de9e-11e6-8884-2945be882ea8.png">
Fixesrust-lang#39144.bors
commented
Mar 10, 2017
🔒 Merge conflict |
alexcrichton
commented
Mar 10, 2017
@bors: retry |
…turner
Point to enclosing block/fn on nested unsafe
When declaring nested unsafe blocks (`unsafe {unsafe {}}`) that trigger
the "unnecessary `unsafe` block" error, point out the enclosing `unsafe
block` or `unsafe fn` that makes it unnecessary.
<img width="621" alt="" src="https://cloud.githubusercontent.com/assets/1606434/22139922/26ad468a-de9e-11e6-8884-2945be882ea8.png">
Fixesrust-lang#39144.bors
commented
Mar 10, 2017
🔒 Merge conflict |
When declaring nested unsafe blocks (`unsafe {unsafe {}}`) that trigger
the "unnecessary `unsafe` block" error, point out the enclosing `unsafe
block` or `unsafe fn` that makes it unnecessary.cd7bde9 to
ac2bc7cComparealexcrichton
commented
Mar 10, 2017
@bors: r=jonathandturner |
bors
commented
Mar 10, 2017
📌 Commit ac2bc7c has been approved by |
…turner
Point to enclosing block/fn on nested unsafe
When declaring nested unsafe blocks (`unsafe {unsafe {}}`) that trigger
the "unnecessary `unsafe` block" error, point out the enclosing `unsafe
block` or `unsafe fn` that makes it unnecessary.
<img width="621" alt="" src="https://cloud.githubusercontent.com/assets/1606434/22139922/26ad468a-de9e-11e6-8884-2945be882ea8.png">
Fixesrust-lang#39144.…turner
Point to enclosing block/fn on nested unsafe
When declaring nested unsafe blocks (`unsafe {unsafe {}}`) that trigger
the "unnecessary `unsafe` block" error, point out the enclosing `unsafe
block` or `unsafe fn` that makes it unnecessary.
<img width="621" alt="" src="https://cloud.githubusercontent.com/assets/1606434/22139922/26ad468a-de9e-11e6-8884-2945be882ea8.png">
Fixesrust-lang#39144.…turner
Point to enclosing block/fn on nested unsafe
When declaring nested unsafe blocks (`unsafe {unsafe {}}`) that trigger
the "unnecessary `unsafe` block" error, point out the enclosing `unsafe
block` or `unsafe fn` that makes it unnecessary.
<img width="621" alt="" src="https://cloud.githubusercontent.com/assets/1606434/22139922/26ad468a-de9e-11e6-8884-2945be882ea8.png">
Fixesrust-lang#39144.…turner
Point to enclosing block/fn on nested unsafe
When declaring nested unsafe blocks (`unsafe {unsafe {}}`) that trigger
the "unnecessary `unsafe` block" error, point out the enclosing `unsafe
block` or `unsafe fn` that makes it unnecessary.
<img width="621" alt="" src="https://cloud.githubusercontent.com/assets/1606434/22139922/26ad468a-de9e-11e6-8884-2945be882ea8.png">
Fixesrust-lang#39144.…turner
Point to enclosing block/fn on nested unsafe
When declaring nested unsafe blocks (`unsafe {unsafe {}}`) that trigger
the "unnecessary `unsafe` block" error, point out the enclosing `unsafe
block` or `unsafe fn` that makes it unnecessary.
<img width="621" alt="" src="https://cloud.githubusercontent.com/assets/1606434/22139922/26ad468a-de9e-11e6-8884-2945be882ea8.png">
Fixesrust-lang#39144.Rollup of 38 pull requests - Successful merges: #39202, #39820, #39918, #39921, #40092, #40146, #40199, #40225, #40239, #40257, #40259, #40261, #40277, #40278, #40287, #40297, #40311, #40315, #40319, #40324, #40336, #40340, #40344, #40345, #40367, #40369, #40372, #40373, #40379, #40385, #40386, #40389, #40400, #40404, #40410, #40422, #40423, #40424 - Failed merges: #40220, #40329, #40426
Rollup of 38 pull requests - Successful merges: #39202, #39820, #39918, #39921, #40092, #40146, #40199, #40225, #40239, #40257, #40259, #40261, #40277, #40278, #40287, #40297, #40311, #40315, #40319, #40324, #40336, #40340, #40344, #40345, #40367, #40369, #40372, #40373, #40379, #40385, #40386, #40389, #40400, #40404, #40410, #40422, #40423, #40424 - Failed merges: #40220, #40329, #40426

When declaring nested unsafe blocks (
unsafe {unsafe {}}) that triggerthe "unnecessary
unsafeblock" error, point out the enclosingunsafe blockorunsafe fnthat makes it unnecessary.Fixes#39144.