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 15 pull requests #74329

Closed
wants to merge 149 commits into from
Closed

Conversation

Manishearth
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

marmeladema and others added 30 commits May 30, 2020 15:02
rust-lang#5626: lint iterator.map(|x| x)

changelog: adds a new lint for iterator.map(|x| x) (see rust-lang/rust-clippy#5626)

The code also lints for result.map(|x| x) and option.map(|x| x). Also, I'm not sure if I'm checking for type adjustments correctly and I can't think of an example where .map(|x| x) would apply type adjustments.
Context: this is needed to fix rust-lang/rustfmt#4263,
which currently records the span of a const generic param incorrectly
because the location of the `const` kw is not known.

I am not sure how to add tests for this; any guidance in how to do so
would be appreciated 🙂
clone_on_copy - add machine applicability

Fix rust-lang#4826.
Change the applicability of the lint clone_on_copy. Split a test file and run rustfix on the clone_on_copy part.

changelog: clone_on_copy - add machine applicability
cmp_owned: handle when PartialEq is not implemented symmetrically

changelog: Handle asymmetrical implementations of PartialEq in [`cmp_owned`].

Fixes rust-lang#4874
Change a noun to a verb to make the sentence complete

changelog: Fixed some grammar in the documentation for `await_holding_lock`.

Just a tiny little thing I found while using clippy <3
…morse

Record span of `const` kw in GenericParamKind

Context: this is needed for a fix of rust-lang/rustfmt#4263,
which currently records the span of a const generic param incorrectly
because the location of the `const` kw is not known.

I am not sure how to add tests for this; any guidance in how to do so
would be appreciated 🙂
…arth

Rollup of 13 pull requests

Successful merges:

 - rust-lang#72620 (Omit DW_AT_linkage_name when it is the same as DW_AT_name)
 - rust-lang#72967 (Don't move cursor in search box when using arrows to navigate results)
 - rust-lang#73102 (proc_macro: Stop flattening groups with dummy spans)
 - rust-lang#73297 (Support configurable deny-warnings for all in-tree crates.)
 - rust-lang#73507 (Cleanup MinGW LLVM linkage workaround)
 - rust-lang#73588 (Fix handling of reserved registers for ARM inline asm)
 - rust-lang#73597 (Record span of `const` kw in GenericParamKind)
 - rust-lang#73629 (Make AssocOp Copy)
 - rust-lang#73681 (Update Chalk to 0.14)
 - rust-lang#73707 (Fix links in `SliceIndex` documentation)
 - rust-lang#73719 (emitter: column width defaults to 140)
 - rust-lang#73729 (disable collectionbenches for android)
 - rust-lang#73748 (Add code block to code in documentation of `List::rebase_onto`)

Failed merges:

r? @ghost
Modifies the return type for `fn entry` so that allowing
improper_ctypes_definitions is no longer necessary. This change is
derived from a similar pattern in `libstd/sys/sgx/abi/usercalls/raw.rs`
with `UsercallReturn`.
This commit modifies the Place as follow:
* remove 'ty' from ProjectionKind
* add type information into to Projection
* replace 'ty' in Place with 'base_ty'
* introduce 'ty()' in `Place` to return the final type of the `Place`
* introduce `ty_before_projection()` in `Place` to return the type of
  a `Place` before i'th projection is applied

Closes rust-lang/project-rfc-2229#5
…s, r=Manishearth,flip1995,phansch,oli-obk

Lint enabling the whole restriction group

I've added it to the `correctness` category, but I may be missing some valid use cases. In that case it could be changed to `pedantic`.

changelog: Add [`blanket_clippy_restriction_lints`] to check against enabling the whole restriction group.
Require `or_patterns` to suggest nesting them

changelog: Require `#![feature(or_patterns)]` to trigger [`unnested_or_patterns`]

Fixes rust-lang#5704
Fix the versions of packages in the multiple_crate_versions ui test by
checking in the Cargo.lock for the test package. `ansi_term 0.11`
depends on `winapi ^0.3.4`. This means means that the expected stderr for
this test would have to be updated whenever `winapi 0.3` is updated
otherwise.
…701, r=matthiaskrgr

Fix multiple_crate_versions error

Fix the versions of packages in the multiple_crate_versions ui test by
checking in the Cargo.lock for the test package. `ansi_term 0.11`
depends on `winapi ^0.3.4`. This means means that the expected stderr for
this test would have to be updated whenever `winapi 0.3` is updated
otherwise.

changelog: none
flip1995 and others added 16 commits July 14, 2020 14:59
…aumeGomez

Add Ayu theme to rustdoc

This is a port of a theme I maintain (https://github.com/Cldfire/ayu-rs) to the native rustdoc theme system. [Ayu](https://github.com/dempfi/ayu) (dark) is a richly-colored dark theme that many people enjoy using across a wide variety of environments.

Corresponds to the Ayu theme in [mdBook](https://github.com/rust-lang/mdBook).

Some screenshots:

![image](https://user-images.githubusercontent.com/13814214/79547087-6c935780-8061-11ea-8a33-38e9472e9fec.png)

![image](https://user-images.githubusercontent.com/13814214/79547150-8339ae80-8061-11ea-97be-9e13a8b275d7.png)

![image](https://user-images.githubusercontent.com/13814214/79547221-98164200-8061-11ea-9649-9b11ccbb33e3.png)

![image](https://user-images.githubusercontent.com/13814214/79547310-b419e380-8061-11ea-9965-d4f90b2280ab.png)

![image](https://user-images.githubusercontent.com/13814214/79547443-e7f50900-8061-11ea-8872-06d74010691e.png)

Note that this pull request also makes some small code changes to allow for disabling theme stylesheets, preventing the rules from all the different themes from conflicting with one another. The only stylesheet that is not disabled is `light.css`; the theming system (quite hackily) switches themes by changing the href on this stylesheet and so permanently disabling all the others works perfectly fine.
…i-obk

Constify most non-trait `Duration` methods as described in rust-lang#72440

The remaining methods could probably be made const once rust-lang#72449 lands with support for `f<32|64>::is_finite()`.
…=davidtwco

Obviate #[allow(improper_ctypes_definitions)]

Modifies the return type for `fn entry` so that allowing
improper_ctypes_definitions is no longer necessary. This change is
derived from a similar pattern in `libstd/sys/sgx/abi/usercalls/raw.rs`
with `UsercallReturn`.

cc @jethrogb
…-slice-cast, r=estebank

typeck: check for infer before type impls trait

Fixes rust-lang#73886.

This PR checks that the target type of the cast (an error related to which is being reported) does not have types to be inferred before checking if it implements the `From` trait.

r? @estebank
add (unchecked) indexing methods to raw (and NonNull) slices

This complements the existing (unstable) `len` method. Unfortunately, for non-null slices, we cannot call this method `as_ptr` as that overlaps with the existing method of the same name.

If this looks reasonable to accept, I propose to reuse the rust-lang#71146 tracking issue and rename the feature get to `slice_ptr_methods` or so.

Cc @SimonSapin
Fixes rust-lang#60639
…bertodt

Refactor Windows `parse_prefix`

These changes make me feel more readable.
See the commit messages for more details.
Remove an unwrap in layout computation

A tiny improvement.
Update llvm-project to latest origin/rustc/10.0-2020-05-05 commit

which includes LVI segfault fix when building fortanix/rust-sgx#267
And a few earlier commits.
don't mark linux kernel module targets as a unix environment

refs rust-lang#74247

r?@joshtriplett

cc: @ehuss
…ed-comments, r=Mark-Simulacrum

pprust: support multiline comments within lines

Fixes rust-lang#73626.

This PR adds support to `rustc_ast_pretty` for multiline comments that start and end within a line of source code.

Fun fact: [the commit which added this assert](rust-lang@d12ea39) was from 2011!
https://github.com/rust-lang/rust/blob/d12ea3989649616437a7c1434f5c5a6438235eb7/src/comp/pretty/pprust.rs#L1146-L1150
…nna-kruppe

Clarify the description for rfind

Changes the wording in rfind description to be clearer and the example code to illustrate the difference between
find and rfind
…itSet, r=eddyb

Use `ArrayVec` in `SparseBitSet`.

Instead of `SmallVec`, because the maximum size is known.

r? @eddyb
…ark-Simulacrum

Remove unnecessary type hints from Wake internals

While working on rust-lang#74304 I noticed we were writing out the type signature twice in some internal `Wake` impl methods; this streamlines that. Thanks!
Update Clippy

~~I'm not sure, if we can/should land this before beta is branched.~~ (Nvm, beta is already branched) The last Clippy update was 3 weeks ago: rust-lang#73660

This includes, besides other minor things:

- New lints
- One lint deprecation
- One lint was moved to pedantic
- Some FP fixes
- I think an ICE fix?

cc @Mark-Simulacrum

r? @Manishearth

---

We probably should also think of some process when and how often we should sync Clippy to the rust repo, so that we don't end up with those huge updates. Maybe every 2 weeks? Or even every week? cc @rust-lang/clippy
@Manishearth
Copy link
Member Author

@rustbot modify labels: +rollup
@bors r+ rollup=never p=5

@rustbot rustbot added the rollup A PR which is a rollup label Jul 14, 2020
@bors
Copy link
Contributor

bors commented Jul 14, 2020

📌 Commit 4c2d7ee has been approved by Manishearth

@bors
Copy link
Contributor

bors commented Jul 14, 2020

🌲 The tree is currently closed for pull requests below priority 5, this pull request will be tested once the tree is reopened

@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 Jul 14, 2020
@bors
Copy link
Contributor

bors commented Jul 14, 2020

⌛ Testing commit 4c2d7ee with merge 5be4ea7e21cfc9b8b549ef6e4706a93af53c7142...

@bors
Copy link
Contributor

bors commented Jul 14, 2020

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 14, 2020
@Manishearth
Copy link
Member Author

2020-07-14T14:33:38.8159388Z warning: the feature `const_if_match` has been stable since 1.45.0 and no longer requires an attribute to enable
2020-07-14T14:33:38.8160030Z   --> /checkout/src/test/ui/consts/duration-consts-2.rs:4:12
2020-07-14T14:33:38.8160447Z    |
2020-07-14T14:33:38.8160689Z LL | #![feature(const_if_match)]
2020-07-14T14:33:38.8160948Z    |            ^^^^^^^^^^^^^^
2020-07-14T14:33:38.8161194Z    |
2020-07-14T14:33:38.8161474Z    = note: `#[warn(stable_features)]` on by default
2020-07-14T14:33:38.8161627Z 
2020-07-14T14:33:38.8161860Z warning: 1 warning emitted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.