Skip to content

beta backport rollup - #56102

Merged
bors merged 31 commits into
rust-lang:betafrom
nikomatsakis:beta
Nov 21, 2018
Merged

beta backport rollup#56102
bors merged 31 commits into
rust-lang:betafrom
nikomatsakis:beta

Conversation

@nikomatsakis

@nikomatsakisnikomatsakis commented Nov 20, 2018

Copy link
Copy Markdown
Contributor

Backports of some beta-approved PRs

Still running tests locally, and I plan to backport @nrc's other PRs too

(cc @petrochenkov -- thanks for the advice)

davidtwcoand others added 10 commits November 19, 2018 21:10
This commit adds logging statements to `promote_consts` and
`qualify_consts` to make it easier to understand what it is doing.
This commit adds a test that ensures that a cast in a static doesn't
stop const promotion within the static.
This commit refactors `PlaceContext` to split it into four different
smaller enums based on if the context represents a mutating use,
non-mutating use, maybe-mutating use or a non-use (this is based on the
recommendation from @oli-obk on Zulip[1]).
This commit then introduces a `PlaceContext::AscribeUserTy` variant.
`StatementKind::AscribeUserTy` is now correctly mapped to
`PlaceContext::AscribeUserTy` instead of `PlaceContext::Validate`.
`PlaceContext::AscribeUserTy` can also now be correctly categorized as a
non-use which fixes an issue with constant promotion in statics after a
cast introduces a `AscribeUserTy` statement.
[1]: https://rust-lang.zulipchat.com/#narrow/stream/122657-wg-nll/subject/.2355288.20cast.20fails.20to.20promote.20to.20'static/near/136536949
Previously this threshold when testing was 100ns, but the Windows
documentation states:
> which is a high resolution (<1us) time stamp
which presumably means that we could have up to 1us resolution, which
means that 100ns doesn't capture "equivalent" time intervals due to
various bits of rounding here and there.
It's hoped that this..
Closesrust-lang#56034
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @davidtwco

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

@rust-highfive

Copy link
Copy Markdown
Contributor

⚠️Warning⚠️

  • Pull requests are usually filed against the master branch for this repo, but this one is against beta. Please double check that you specified the right target!

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 20, 2018
@nikomatsakis

Copy link
Copy Markdown
ContributorAuthor

r? @nrc

@rust-highfiverust-highfive assigned nrc and unassigned davidtwcoNov 20, 2018
Nick Cameronand others added 7 commits November 20, 2018 16:14
Give each PathSegment a NodeId
Store a resolved def on hir::PathSegment
save-analysis: remove hacky, unnecessary code now that we have spans for every ident
dump data for prefix path segments
dump refs for path segments in save-analysis
Requires adding path segments to the hir map
Fix tests and rustdoc
save-analysis: handle missing field names
FIxesrust-lang/rls#1031
rebasing and reviewer changes
Primarily refactoring `(Ident, Option<NodeId>)` to `Segment`
Fix tests and assertions; add some comments
more reviewer changes
@nikomatsakisnikomatsakis mentioned this pull request Nov 20, 2018
@nikomatsakisnikomatsakis changed the title squashed form of #54145beta backport rollupNov 20, 2018
alexcrichtonand others added 3 commits November 20, 2018 16:17
This will be part of our strategy for shipping renamed versions of these
components for the Rust 2018 edition.
Closesrust-lang#55967
newpavlovand others added 6 commits November 20, 2018 16:18
Fixesrust-lang#55001, rust-lang#54744
Previously, SelectionContext would unconditionally cache the selection
result for an obligation. This worked fine for most users of
SelectionContext, but it caused an issue when used by Rustdoc's blanket
impl finder.
The issue occured when SelectionContext chose a ParamCandidate which
contained inference variables. Since inference variables can change
between calls to select(), it's not safe to cache the selection result -
the chosen candidate might not be applicable for future results, leading
to an ICE when we try to run confirmation.
This commit prevents SelectionContext from caching any ParamCandidate
that contains inference variables. This should always be completely
safe, as trait selection should never depend on a particular result
being cached.
I've also added some extra debug!() statements, which I found helpful in
tracking down this bug.
@alexcrichtonalexcrichton added this to the Rust 2018 Release milestone Nov 20, 2018
@alexcrichton

Copy link
Copy Markdown
Member

@bors: r+ p=1000

@bors

bors commented Nov 20, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 8129c41 has been approved by alexcrichton

@borsbors 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 20, 2018
@alexcrichtonalexcrichton assigned alexcrichton and unassigned nrcNov 20, 2018
@nikomatsakis

Copy link
Copy Markdown
ContributorAuthor

@bors r=alexcrichton

@bors

bors commented Nov 20, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 93704f2 has been approved by alexcrichton

@bors

bors commented Nov 20, 2018

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 93704f2 with merge 4b3a1d9...

bors added a commit that referenced this pull request Nov 20, 2018
beta backport rollup
Backports of some beta-approved PRs
- [x] #55385: NLL: cast causes failure to promote to static
- [x] #56043: remove "approx env bounds" if we already know from trait
- [x] #56003: do not propagate inferred bounds on trait objects if they involve `Self`
- [x] #55852: Rewrite `...` as `..=` as a `MachineApplicable` 2018 idiom lint
- [x] #55804: rustdoc: don't inline `pub use some_crate` unless directly asked to
- [x] #56059: Increase `Duration` approximate equal threshold to 1us
- [x] Keep resolved defs in path prefixes and emit them in save-analysis #54145
- [x] Adjust Ids of path segments in visibility modifiers #55487
- [x] save-analysis: bug fix and optimisation. #55521
- [x] save-analysis: be even more aggressive about ignorning macro-generated defs #55936
- [x] save-analysis: fallback to using path id #56060
- [x] save-analysis: Don't panic for macro-generated use globs #55879
- [x] Add temporary renames to manifests for rustfmt/clippy #56081
- [x] Revert #51601#56049
- [x] Fix stability hole with `static _` #55983
- [x] #56077
- [x] Fix Rustdoc ICE when checking blanket impls #55258
- [x] Updated RELEASES.md for 1.31.0 #55678
- [x] ~~#56061~~ #56111
- [x] Stabilize `extern_crate_item_prelude` #56032
Still running tests locally, and I plan to backport @nrc's other PRs too
(cc @petrochenkov -- thanks for the advice)
@bors

bors commented Nov 21, 2018

Copy link
Copy Markdown
Collaborator

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 4b3a1d9 to beta...

@bors
bors merged commit 93704f2 into rust-lang:betaNov 21, 2018
@CentrilCentril added the rollup A PR which is a rollup label Oct 2, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollupA PR which is a rollupS-waiting-on-borsStatus: 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.

15 participants

@nikomatsakis@rust-highfive@alexcrichton@bors@nrc@Centril@davidtwco@varkor@QuietMisdreavus@Xanewok@newpavlov@oli-obk@Aaronepower@Aaron1011@petrochenkov