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

Suggest using an inclusive range instead of an exclusive range when the endpoint overflows by 1 #60330

Merged
merged 9 commits into from May 1, 2019

Conversation

Projects
None yet
6 participants
@varkor
Copy link
Member

commented Apr 27, 2019

Fixes #47213.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Apr 27, 2019

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@varkor varkor force-pushed the varkor:range-endpoint-overflow-lint branch from ccdf86e to 5574826 Apr 27, 2019

@varkor

This comment has been minimized.

Copy link
Member Author

commented Apr 27, 2019

@rust-highfive rust-highfive assigned estebank and unassigned eddyb Apr 27, 2019

Show resolved Hide resolved src/librustc/hir/lowering.rs Outdated
Show resolved Hide resolved src/librustc/hir/lowering.rs Outdated
Show resolved Hide resolved src/librustc/hir/lowering.rs Outdated
Show resolved Hide resolved src/librustc_lint/types.rs Outdated
@estebank
Copy link
Contributor

left a comment

looks good for the most part, with caveat of the style issues that centril pointed out

Show resolved Hide resolved src/librustc_lint/types.rs Outdated
Show resolved Hide resolved src/librustc_lint/types.rs
Show resolved Hide resolved src/librustc_lint/types.rs Outdated
@bors

This comment was marked as resolved.

Copy link
Contributor

commented Apr 30, 2019

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

@varkor varkor force-pushed the varkor:range-endpoint-overflow-lint branch from 5574826 to 80f90d8 Apr 30, 2019

@varkor

This comment has been minimized.

Copy link
Member Author

commented Apr 30, 2019

I've done the suggested refactoring and pulled several functions out of check_expr (the last commit is probably worth checking in isolation, as it's just moving functions around).

Show resolved Hide resolved src/librustc/hir/lowering.rs Outdated
@estebank

This comment has been minimized.

Copy link
Contributor

commented May 1, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

commented May 1, 2019

📌 Commit b7711bf has been approved by estebank

Centril added a commit to Centril/rust that referenced this pull request May 1, 2019

Rollup merge of rust-lang#60330 - varkor:range-endpoint-overflow-lint…
…, r=estebank

Suggest using an inclusive range instead of an exclusive range when the endpoint overflows by 1

Fixes rust-lang#47213.

@Centril Centril referenced this pull request May 1, 2019

Closed

Rollup of 8 pull requests #60433

bors added a commit that referenced this pull request May 1, 2019

Auto merge of #60433 - Centril:rollup-l534wjc, r=Centril
Rollup of 8 pull requests

Successful merges:

 - #60287 (Use references for variances_of)
 - #60327 (Search for incompatible universes in borrow errors)
 - #60330 (Suggest using an inclusive range instead of an exclusive range when the endpoint overflows by 1)
 - #60366 (build-gcc: Create missing cc symlink)
 - #60369 (Support ZSTs in DispatchFromDyn)
 - #60404 (Implement `BorrowMut<str>` for `String`)
 - #60417 (Rename hir::ExprKind::Use to ::DropTemps and improve docs.)
 - #60432 (Update clippy)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request May 1, 2019

Rollup merge of rust-lang#60330 - varkor:range-endpoint-overflow-lint…
…, r=estebank

Suggest using an inclusive range instead of an exclusive range when the endpoint overflows by 1

Fixes rust-lang#47213.

@Centril Centril referenced this pull request May 1, 2019

Closed

Rollup of 7 pull requests #60434

bors added a commit that referenced this pull request May 1, 2019

Auto merge of #60434 - Centril:rollup-x1iczrh, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #60327 (Search for incompatible universes in borrow errors)
 - #60330 (Suggest using an inclusive range instead of an exclusive range when the endpoint overflows by 1)
 - #60366 (build-gcc: Create missing cc symlink)
 - #60369 (Support ZSTs in DispatchFromDyn)
 - #60404 (Implement `BorrowMut<str>` for `String`)
 - #60417 (Rename hir::ExprKind::Use to ::DropTemps and improve docs.)
 - #60432 (Update clippy)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request May 1, 2019

Rollup merge of rust-lang#60330 - varkor:range-endpoint-overflow-lint…
…, r=estebank

Suggest using an inclusive range instead of an exclusive range when the endpoint overflows by 1

Fixes rust-lang#47213.

@Centril Centril referenced this pull request May 1, 2019

Merged

Rollup of 7 pull requests #60435

bors added a commit that referenced this pull request May 1, 2019

Auto merge of #60435 - Centril:rollup-aa5lmuw, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #60287 (Use references for variances_of)
 - #60327 (Search for incompatible universes in borrow errors)
 - #60330 (Suggest using an inclusive range instead of an exclusive range when the endpoint overflows by 1)
 - #60366 (build-gcc: Create missing cc symlink)
 - #60369 (Support ZSTs in DispatchFromDyn)
 - #60404 (Implement `BorrowMut<str>` for `String`)
 - #60417 (Rename hir::ExprKind::Use to ::DropTemps and improve docs.)

Failed merges:

r? @ghost

bors added a commit that referenced this pull request May 1, 2019

Auto merge of #60435 - Centril:rollup-aa5lmuw, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #60287 (Use references for variances_of)
 - #60327 (Search for incompatible universes in borrow errors)
 - #60330 (Suggest using an inclusive range instead of an exclusive range when the endpoint overflows by 1)
 - #60366 (build-gcc: Create missing cc symlink)
 - #60369 (Support ZSTs in DispatchFromDyn)
 - #60404 (Implement `BorrowMut<str>` for `String`)
 - #60417 (Rename hir::ExprKind::Use to ::DropTemps and improve docs.)

Failed merges:

r? @ghost

bors added a commit that referenced this pull request May 1, 2019

Auto merge of #60435 - Centril:rollup-aa5lmuw, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #60287 (Use references for variances_of)
 - #60327 (Search for incompatible universes in borrow errors)
 - #60330 (Suggest using an inclusive range instead of an exclusive range when the endpoint overflows by 1)
 - #60366 (build-gcc: Create missing cc symlink)
 - #60369 (Support ZSTs in DispatchFromDyn)
 - #60404 (Implement `BorrowMut<str>` for `String`)
 - #60417 (Rename hir::ExprKind::Use to ::DropTemps and improve docs.)

Failed merges:

r? @ghost

@bors bors merged commit b7711bf into rust-lang:master May 1, 2019

1 check passed

Travis CI - Pull Request Build Passed
Details

@varkor varkor deleted the varkor:range-endpoint-overflow-lint branch May 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.