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

Rollup of 6 pull requests #68142

Merged
merged 25 commits into from
Jan 12, 2020
Merged

Rollup of 6 pull requests #68142

merged 25 commits into from
Jan 12, 2020

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Jan 12, 2020

Successful merges:

Failed merges:

r? @ghost

matthewjasper and others added 25 commits January 5, 2020 18:13
…item, r=alexcrichton"

This reverts commit 4ed415b, reversing
changes made to 3cce950.
Also do some cleanup of the interface.
Constify more of alloc::Layout

Making more methods of `alloc::Layout` const would allow us to compute alignment/size information for arbitrary (sized) types at compile-time, including placing the information in associated constants. While `mem::size_of` and `mem::align_of` are already const and `Layout` is solely based on those, there is no guarantee in the implementation that a const derived from these functions will be exactly the same as what `Layout` uses and is subsequently used in a call to `alloc::alloc`. Constifying `Layout` makes this possible.

First contribution to core, excuse my ignorance.
…r=oli-obk

Correctly check for opaque types in `assoc_ty_def`

Closes rust-lang#67856
Galloping search for binary_search_util

This is unlikely to improve perf much unless for synthetic benchmarks, but I figure it likely won't hurt either.
…lacrum

Move more of `rustc::lint` into `rustc_lint`

Based on rust-lang#67806.

Here we try to consolidate more of the linting infra into `rustc::lint`. Some high-level notes:

- We now store an `Lrc<dyn Any + Send + Sync>` as opposed to `Lrc<LintStore>` in the `GlobalCtxt`. This enables us to avoid referring to the type, breaking a cyclic dependency, and so we can move things from `rustc::lint` to `rustc_lint`.

- `in_derive_expansion` is, and needs to, be moved as a method on `Span`.

- We reduce the number of ways on `tcx` to emit a lint so that the developer UX is more streamlined.

- `LintLevelsBuilder` is moved to `rustc_lint::levels`, leaving behind `LintLevelMap/Set` in a purified form due to current constraints (hopefully fixable in the future after rust-lang#68133).

- `struct_lint_level` is moved to `rustc::lint` due to current dependency constraints.

- `rustc::lint::context` is moved to `rustc_lint::context`.

- The visitors in `rustc::lint` are moved to `rustc_lint::passes`.
…ns, r=Centril

Add suggestions when encountering chained comparisons

Ideally, we'd also prevent the type error, which is just extra noise, but that will require moving the error from the parser, and I think the suggestion makes things clear enough for now.

Fixes rust-lang#65659.
@Centril
Copy link
Contributor Author

Centril commented Jan 12, 2020

@bors r+ p=6 rollup=never

@bors
Copy link
Contributor

bors commented Jan 12, 2020

📌 Commit 82c19b4 has been approved by Centril

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 12, 2020
@Centril Centril added the rollup A PR which is a rollup label Jan 12, 2020
@bors
Copy link
Contributor

bors commented Jan 12, 2020

⌛ Testing commit 82c19b4 with merge 0b6c116...

bors added a commit that referenced this pull request Jan 12, 2020
Rollup of 6 pull requests

Successful merges:

 - #67494 (Constify more of alloc::Layout)
 - #67867 (Correctly check for opaque types in `assoc_ty_def`)
 - #67948 (Galloping search for binary_search_util)
 - #68045 (Move more of `rustc::lint` into `rustc_lint`)
 - #68089 (Unstabilize `Vec::remove_item`)
 - #68108 (Add suggestions when encountering chained comparisons)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Jan 12, 2020

☀️ Test successful - checks-azure
Approved by: Centril
Pushing 0b6c116 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup 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.

7 participants