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

NLL Diagnostic Review 3: Missing errors for borrows of union fields #55696

Merged
merged 2 commits into from
Nov 6, 2018

Conversation

davidtwco
Copy link
Member

Fixes #55675.

This PR modifies a test to make it more robust (it also fixes indentation on a doc comment, but that's not the point of the PR). See the linked issue for details.

r? @pnkfelix

This commit adjusts the indentation of code within a documentation
comment so that it is correctly highlighted as code by rustdoc.
In each of the three cases in this test, there is a mutable borrow
of some field of the union and then a shared borrow of some other field
immediately following.

Under NLL, the mutable borrow is killed straight away as it isn't
used later - therefore not causing a conflict with the shared borrow.
This commit adds a use of the first mutable borrow to force the intended
errors to appear under NLL.
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 5, 2018
@pnkfelix
Copy link
Member

pnkfelix commented Nov 5, 2018

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 5, 2018

📌 Commit ba09ed5 has been approved by pnkfelix

@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 Nov 5, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Nov 6, 2018
NLL Diagnostic Review 3: Missing errors for borrows of union fields

Fixes rust-lang#55675.

This PR modifies a test to make it more robust (it also fixes indentation on a doc comment, but that's not the point of the PR). See the linked issue for details.

r? @pnkfelix
bors added a commit that referenced this pull request Nov 6, 2018
Rollup of 11 pull requests

Successful merges:

 - #55490 (resolve: Fix ICE in macro import error recovery)
 - #55597 (std: Enable usage of `thread_local!` through imports)
 - #55601 (Fix tracking issue numbers for some unstable features)
 - #55621 (Add precision for create_dir function)
 - #55644 (ci: Add Dockerfile for dist-powerpcspe-linux)
 - #55664 (Make "all possible cases" help message uniform with existing help messages)
 - #55689 (miri: binary_op_val -> binary_op_imm)
 - #55694 (Fixes #31076)
 - #55696 (NLL Diagnostic Review 3: Missing errors for borrows of union fields)
 - #55700 (Update ui tests with respect to NLL)
 - #55703 (Update `configure --help` (via configure.py) to reflect decoupling of debug+optimize)
@bors bors merged commit ba09ed5 into rust-lang:master Nov 6, 2018
@davidtwco davidtwco deleted the issue-55675 branch November 6, 2018 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NLL Diagnostic Review 3: Missing errors for borrows of union fields
4 participants