]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoUpdate Cargo.lock (Clippy version bump)
flip1995 [Thu, 29 Jul 2021 10:17:29 +0000 (12:17 +0200)]
Update Cargo.lock (Clippy version bump)

2 years agoMerge commit '0cce3f643bfcbb92d5a1bb71858c9cbaff749d6b' into clippyup
flip1995 [Thu, 29 Jul 2021 10:16:06 +0000 (12:16 +0200)]
Merge commit '0cce3f643bfcbb92d5a1bb71858c9cbaff749d6b' into clippyup

2 years agoAuto merge of #7504 - flip1995:rename-lints, r=flip1995
bors [Thu, 29 Jul 2021 10:14:31 +0000 (10:14 +0000)]
Auto merge of #7504 - flip1995:rename-lints, r=flip1995

Rename two lints to comply with our lint naming convention

self_named_constructor -> self_named_constructors
append_instead_of_extend -> extend_with_drain

We don't need to `register_renamed` those lints, since I'll backport them to beta, so the old names won't hit stable.

changelog: none
(I'll adapt the changelog before merging #7498)

2 years agoRename two lints to comply with our lint naming convention
flip1995 [Thu, 29 Jul 2021 10:10:18 +0000 (12:10 +0200)]
Rename two lints to comply with our lint naming convention

self_named_constructor -> self_named_constructors
append_instead_of_extend -> extend_with_drain

2 years agoAuto merge of #7503 - flip1995:rustup, r=flip1995
bors [Thu, 29 Jul 2021 09:35:13 +0000 (09:35 +0000)]
Auto merge of #7503 - flip1995:rustup, r=flip1995

Rustup

r? `@ghost`

changelog: none

2 years agoBump Clippy Version -> 0.1.56
flip1995 [Thu, 29 Jul 2021 09:15:11 +0000 (11:15 +0200)]
Bump Clippy Version -> 0.1.56

2 years agoBump nightly version -> 2021-07-29
flip1995 [Thu, 29 Jul 2021 09:14:53 +0000 (11:14 +0200)]
Bump nightly version -> 2021-07-29

2 years agoMerge remote-tracking branch 'upstream/master' into rustup
flip1995 [Thu, 29 Jul 2021 09:14:25 +0000 (11:14 +0200)]
Merge remote-tracking branch 'upstream/master' into rustup

2 years agoAuto merge of #87416 - Aaron1011:query-side-effect, r=cjgillot
bors [Thu, 29 Jul 2021 02:51:19 +0000 (02:51 +0000)]
Auto merge of #87416 - Aaron1011:query-side-effect, r=cjgillot

Create `QuerySideEffects` and use it for diagnostics

The code for saving and loading diagnostics during execution is generalized to handle a new `QuerySideEffects` struct. Currently, this struct just holds diagnostics - in a follow-up PR, I plan to add support for storing attriutes marked as used during query execution.

This is a pure refactor, with no intended behavior changes.

2 years agoAuto merge of #85874 - steffahn:fix_unsound_zip_optimization, r=yaahc
bors [Thu, 29 Jul 2021 00:31:07 +0000 (00:31 +0000)]
Auto merge of #85874 - steffahn:fix_unsound_zip_optimization, r=yaahc

Remove unsound TrustedRandomAccess implementations

Removes the implementations that depend on the user-definable trait `Copy`.

Fixes #85873 in the most straightforward way.

<hr>

_Edit:_ This PR now contains additional trait infrastructure to avoid performance regressions around in-place collect, see the discussion in this thread starting from the codegen test failure at https://github.com/rust-lang/rust/pull/85874#issuecomment-872327577.

With this PR, `TrustedRandomAccess` gains additional documentation that specifically allows for and specifies the safety conditions around subtype coercions – those coercions can happen in safe Rust code with the `Zip` API’s usage of `TrustedRandomAccess`. This PR introduces a new supertrait of `TrustedRandomAccess`(currently named `TrustedRandomAccessNoCoerce`) that _doesn’t allow_ such coercions, which means it can be still be useful for optimizing cases such as in-place collect where no iterator is handed out to a user (who could do coercions) after a `get_unchecked` call; the benefit of the supertrait is that it doesn’t come with the additional safety conditions around supertraits either, so it can be implemented for more types than `TrustedRandomAccess`.

The `TrustedRandomAccess` implementations for `vec::IntoIter`, `vec_deque::IntoIter`, and `array::IntoIter` are removed as they don’t conform with the newly documented safety conditions, this way unsoundness is removed. But this PR in turn (re-)adds a `TrustedRandomAccessNoCoerce` implementation for `vec::IntoIter` to avoid performance regressions from stable in a case of in-place collecting of `Vec`s [the above-mentioned codegen test failure]. Re-introducing the (currently nightly+beta-only) impls for `VecDeque`’s and `[T; N]`’s iterators is technically possible, but goes beyond the scope of this PR (i.e. it can happen in a future PR).

2 years agoAuto merge of #87569 - JohnTitor:rollup-7ydfetw, r=JohnTitor
bors [Wed, 28 Jul 2021 22:06:51 +0000 (22:06 +0000)]
Auto merge of #87569 - JohnTitor:rollup-7ydfetw, r=JohnTitor

Rollup of 10 pull requests

Successful merges:

 - #81050 (Stabilize core::task::ready!)
 - #81363 (Remove P: Unpin bound on impl Future for Pin)
 - #86839 (Add doc aliases to fs.rs)
 - #87435 (fix example code for E0617)
 - #87451 (Add support for tuple struct field documentation)
 - #87491 (Integrate context into the memorial to Anna)
 - #87521 (Add long explanation for E0498)
 - #87527 (Don't run MIR unsafeck at all when using `-Zthir-unsafeck`)
 - #87550 (Add `CI_ONLY_WHEN_CHANNEL` and run `x86_64-gnu-stable` only on nightly)
 - #87565 (Use backticks when referring to `core::future::Ready` in panic message)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agoRollup merge of #87565 - ibraheemdev:patch-7, r=scottmcm
Yuki Okushi [Wed, 28 Jul 2021 21:11:50 +0000 (06:11 +0900)]
Rollup merge of #87565 - ibraheemdev:patch-7, r=scottmcm

Use backticks when referring to `core::future::Ready` in panic message

2 years agoRollup merge of #87550 - pietroalbini:ci-only-when-channel, r=Mark-Simulacrum
Yuki Okushi [Wed, 28 Jul 2021 21:11:49 +0000 (06:11 +0900)]
Rollup merge of #87550 - pietroalbini:ci-only-when-channel, r=Mark-Simulacrum

Add `CI_ONLY_WHEN_CHANNEL` and run `x86_64-gnu-stable` only on nightly

Backporting a commit made on #87508. cc ``@Mark-Simulacrum``

2 years agoRollup merge of #87527 - LeSeulArtichaut:no-mir-unsafeck, r=oli-obk
Yuki Okushi [Wed, 28 Jul 2021 21:11:48 +0000 (06:11 +0900)]
Rollup merge of #87527 - LeSeulArtichaut:no-mir-unsafeck, r=oli-obk

Don't run MIR unsafeck at all when using `-Zthir-unsafeck`

I don't know how I missed this :D
r? ``@oli-obk``

2 years agoRollup merge of #87521 - midgleyc:long-E0498, r=GuillaumeGomez
Yuki Okushi [Wed, 28 Jul 2021 21:11:47 +0000 (06:11 +0900)]
Rollup merge of #87521 - midgleyc:long-E0498, r=GuillaumeGomez

Add long explanation for E0498

Helps with #61137

2 years agoRollup merge of #87491 - jamesmunns:integrate-memorial, r=Mark-Simulacrum
Yuki Okushi [Wed, 28 Jul 2021 21:11:46 +0000 (06:11 +0900)]
Rollup merge of #87491 - jamesmunns:integrate-memorial, r=Mark-Simulacrum

Integrate context into the memorial to Anna

This came up after I reviewed https://github.com/rust-lang/rust/pull/87298, but I didn't propose this in time before that PR was merged.

If y'all feel this is too much churn on the file, no worries, feel free to close, but I felt this was a more fitting integration of the memorial into the test suite.

CC ``@boringcactus.``

2 years agoRollup merge of #87451 - GuillaumeGomez:tuple-struct-field-doc, r=jyn514
Yuki Okushi [Wed, 28 Jul 2021 21:11:45 +0000 (06:11 +0900)]
Rollup merge of #87451 - GuillaumeGomez:tuple-struct-field-doc, r=jyn514

Add support for tuple struct field documentation

Fixes  #42615.
This is #80320 updated to new codebase and with added tests.
Part of https://github.com/rust-lang/rust/issues/83255.

cc ```@camelid``` (since you were involved on the original PR).
r? ```@jyn514```

2 years agoRollup merge of #87435 - ibraheemdev:patch-4, r=JohnTitor
Yuki Okushi [Wed, 28 Jul 2021 21:11:44 +0000 (06:11 +0900)]
Rollup merge of #87435 - ibraheemdev:patch-4, r=JohnTitor

fix example code for E0617

Closes #86908

2 years agoRollup merge of #86839 - D1mon:patch-1, r=JohnTitor
Yuki Okushi [Wed, 28 Jul 2021 21:11:43 +0000 (06:11 +0900)]
Rollup merge of #86839 - D1mon:patch-1, r=JohnTitor

Add doc aliases to fs.rs

Add aliases for create_dir, create_dir_all, remove_dir, remove_dir_all

2 years agoRollup merge of #81363 - jonhoo:no-unpin-in-pin-future-impl, r=m-ou-se
Yuki Okushi [Wed, 28 Jul 2021 21:11:42 +0000 (06:11 +0900)]
Rollup merge of #81363 - jonhoo:no-unpin-in-pin-future-impl, r=m-ou-se

Remove P: Unpin bound on impl Future for Pin

We can safely produce a `Pin<&mut P::Target>` without moving out of the `Pin` by using `Pin::as_mut` directly.

The `Unpin` bound was originally added in #56939 following the recommendation of ``@withoutboats`` in https://github.com/rust-lang/rust/issues/55766#issue-378417538

That comment does not give explicit justification for why the bound should be added. The relevant context was:

> [ ] Remove `impl<P> Unpin for Pin<P>`
>
> This impl is not justified by our standard justification for unpin impls: there is no pointer direction between `Pin<P>` and `P`. Its usefulness is covered by the impls for pointers themselves.
>
> This futures impl (link to the impl changed in this PR) will need to change to add a `P: Unpin` bound.

The decision to remove the unconditional impl of `Unpin for Pin` is sound (these days there is just an auto-impl for when `P: Unpin`). But, I think the decision to also add the `Unpin` bound for `impl Future` may have been unnecessary. Or if that's not the case, I'd be very interested to have the argument for why written down somewhere. The bound _appears_ to not be needed, as demonstrated by the change requiring no unsafe code and by the existence of `Pin::as_mut`.

2 years agoRollup merge of #81050 - yoshuawuyts:stabilize-task-ready, r=m-ou-se
Yuki Okushi [Wed, 28 Jul 2021 21:11:41 +0000 (06:11 +0900)]
Rollup merge of #81050 - yoshuawuyts:stabilize-task-ready, r=m-ou-se

Stabilize core::task::ready!

_Tracking issue: https://github.com/rust-lang/rust/issues/70922_

This PR stabilizes the `task::ready!` macro. Similar to https://github.com/rust-lang/rust/pull/80886, this PR was waiting on https://github.com/rust-lang/rust/issues/74355 to be fixed.

The `task::ready!` API has existed in the futures ecosystem for several years, and was added on nightly last year in https://github.com/rust-lang/rust/pull/70817. The motivation for this macro is the same as it was back then: virtually every single manual future implementation makes use of this; so much so that it's one of the few things included in the [futures-core](https://docs.rs/futures-core/0.3.12/futures_core) library.

r? ``@tmandry``

cc/ ``@rust-lang/wg-async-foundations`` ``@rust-lang/libs``

## Example
```rust
use core::task::{Context, Poll};
use core::future::Future;
use core::pin::Pin;

async fn get_num() -> usize {
    42
}

pub fn do_poll(cx: &mut Context<'_>) -> Poll<()> {
    let mut f = get_num();
    let f = unsafe { Pin::new_unchecked(&mut f) };

    let num = ready!(f.poll(cx));
    // ... use num

    Poll::Ready(())
}
```

2 years agofix example code for E0617
Ibraheem Ahmed [Sat, 24 Jul 2021 17:58:08 +0000 (13:58 -0400)]
fix example code for E0617

2 years agoUse backticks when referring to `core::future::Ready` in panic message
Ibraheem Ahmed [Wed, 28 Jul 2021 20:22:34 +0000 (16:22 -0400)]
Use backticks when referring to `core::future::Ready` in panic message

2 years agoAuto merge of #87538 - RalfJung:miri, r=RalfJung
bors [Wed, 28 Jul 2021 19:25:59 +0000 (19:25 +0000)]
Auto merge of #87538 - RalfJung:miri, r=RalfJung

update Miri

Fixes https://github.com/rust-lang/rust/issues/87518
Cc `@rust-lang/miri` r? `@ghost`

2 years agoAdd some doc aliases
D1mon [Sat, 3 Jul 2021 12:31:16 +0000 (15:31 +0300)]
Add some doc aliases

Add `mkdir` to `create_dir`, `rmdir` to `remove_dir`.

2 years agoAuto merge of #87540 - JohnTitor:rollup-8xc6bl5, r=JohnTitor
bors [Wed, 28 Jul 2021 16:59:00 +0000 (16:59 +0000)]
Auto merge of #87540 - JohnTitor:rollup-8xc6bl5, r=JohnTitor

Rollup of 10 pull requests

Successful merges:

 - #87315 (Add docs for raw-dylib to unstable book)
 - #87330 (Use hashbrown's `extend_reserve()` in `HashMap`)
 - #87443 (Don't treat git repos as non-existent when `ignore_git` is set)
 - #87453 (Suggest removing unnecessary &mut as help message)
 - #87500 (Document math behind MIN/MAX consts on integers)
 - #87501 (Remove min_type_alias_impl_trait in favor of type_alias_impl_trait)
 - #87507 (SGX mutex is *not* moveable)
 - #87513 (bootstrap.py: change `git log` option to indicate desired behavior)
 - #87523 (Stop creating a reference then immediately dereferencing it.)
 - #87524 (Fix ICE in `diagnostic_hir_wf_check`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agoUpdate stable version of ready!() macro.
Mara Bos [Wed, 28 Jul 2021 14:54:53 +0000 (16:54 +0200)]
Update stable version of ready!() macro.

2 years agoadd CI_ONLY_WHEN_CHANNEL and run x86_64-gnu-stable only on nightly
Pietro Albini [Wed, 28 Jul 2021 13:18:18 +0000 (15:18 +0200)]
add CI_ONLY_WHEN_CHANNEL and run x86_64-gnu-stable only on nightly

2 years agoAuto merge of #7502 - flip1995:rollup-y3ho3w0, r=flip1995
bors [Wed, 28 Jul 2021 13:15:43 +0000 (13:15 +0000)]
Auto merge of #7502 - flip1995:rollup-y3ho3w0, r=flip1995

Rollup of 3 pull requests

Successful merges:

 - #7279 (Adapting the lint list to Clippy's new metadata format)
 - #7298 (Switch CI to new metadata collection)
 - #7420 (Update lint documentation to use markdown headlines)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

changelog: rollup

2 years agoRollup merge of #7420 - xFrednet:7172-update-lint-documentation, r=flip1995
Philipp Krones [Wed, 28 Jul 2021 13:06:27 +0000 (15:06 +0200)]
Rollup merge of #7420 - xFrednet:7172-update-lint-documentation, r=flip1995

Update lint documentation to use markdown headlines

This PR updates all lint documentation to use markdown headlines. It additionally removed the *Known problems* section for lints without any problems. I've double-checked all automatic replacements, but a second pair of eyes is definitely appreciated!

I wasn't sure when you wanted to switch to the new metadata collection tomorrow, I therefore prepared this PR today. And that's it this is a standalone PR to keep the other related PRs reviewable.

changelog:  none

r? `@flip1995`

cc: #7172

Note: This should be merged with the other metadata collection related PRs.

2 years agoRollup merge of #7298 - flip1995:ci-switch-to-monster, r=xFrednet,flip1995
Philipp Krones [Wed, 28 Jul 2021 13:06:26 +0000 (15:06 +0200)]
Rollup merge of #7298 - flip1995:ci-switch-to-monster, r=xFrednet,flip1995

Switch CI to new metadata collection

r? `@xFrednet`

Things we have to keep in mind:

- This removes the template files and the scripts used for deployment from the checkout. This was added in #5517. I don't think we ever needed those there. Not sure though.
- ~~As a result, we can't remove the python scripts yet. We have to wait until this hits a stable Clippy release.~~ I'll just break the next stable deploy and do it by hand once.
- This should be merged together with #7279. Me and `@xFrednet` will coordinate the switch
- ...?

I still have to try out some things:

- [x] Is it worth caching? Yes
- [x] ~~Is it worth to do a release build?~~ Nope
- [x] Does it actually work? With a few changes, yes
- [ ] ...?

changelog: Clippy now uses a lint to generate its documentation :tada:

2 years agoRollup merge of #7279 - xFrednet:7172-adapt-website-to-new-format, r=flip1995
Philipp Krones [Wed, 28 Jul 2021 13:06:26 +0000 (15:06 +0200)]
Rollup merge of #7279 - xFrednet:7172-adapt-website-to-new-format, r=flip1995

Adapting the lint list to Clippy's new metadata format

This is close to the end of a long living project to rewrite the lint metadata collection for Clippy. Progress on this has been tracked in #7172. This PR adds one of the last missing puzzle pieces, the actual display of all the changes that have been done in the background. A preview can be seen here: [Clippy's lint list](https://xfrednet.github.io/rust-clippy/master/index.html)

The styling has been discussed on [zulip](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Styling.20feedback.20for.20Clippy's.20lint.20list/near/239601067) but is still open to suggestion.

Side note: It has been fun working on the website where we don't have unit tests and everything is just tested by playing around. However, it's good that this chaos is contained into this one part of Clippy. :bug:

---

Closes: #1303
Closes: #4310
This actually closes fewer things than I thought it would...

changelog: Reworked Clippy's [website](https://rust-lang.github.io/rust-clippy/master/index.html):
changelog: * Added applicability information about lints
changelog: * Added a link to jump to the specific lint implementation
changelog: * Adapted some styling and improved loading time

r? `@flip1995`

2 years agoRun cargo collect-metadata in cargo dev serve
flip1995 [Wed, 28 Jul 2021 13:05:11 +0000 (15:05 +0200)]
Run cargo collect-metadata in cargo dev serve

2 years agoAdapting the lint list to Clippy's new metadata format
xFrednet [Tue, 18 May 2021 22:08:31 +0000 (00:08 +0200)]
Adapting the lint list to Clippy's new metadata format

Changes included:
    - Minimum adaption to the new `lints.json` format
    - Fixing filtering for the new `lints.json` format; hardcoding the
      lint groups in the index
    - Recreating the original doc styling for the new format
    - Fixed sytax highlighting for rust,ignore code blocks
    - Fixed markdown table extraction in the metadata collector and
      fixed lint level output
    - Adding the additional information row for lints
    - Changed the website title to Clippy's lint list
    - Flexing the website for mobile users
    - Added (?) references for lint levels and groups
    - Making deprecated lints look dead
    - Removed JS code block language extraction in favor of a rust
      implementation `rust-clippy#7352`
    - Added the suspicious lint group to the lint list
    - Remove trailing whitespaces from index.html
    - Fix code highlighting
    - Use default value if the docVersion is empty

Co-authored-by: Philipp Krones <hello@philkrones.com>
2 years agoDocumentation improvements
Frank Steffahn [Thu, 1 Jul 2021 21:01:16 +0000 (23:01 +0200)]
Documentation improvements

2 years agoMake `SpecInPlaceCollect` use `TrustedRandomAccessNoCoerce`
Frank Steffahn [Thu, 1 Jul 2021 17:12:13 +0000 (19:12 +0200)]
Make `SpecInPlaceCollect` use `TrustedRandomAccessNoCoerce`

2 years agoRemove redundant bounds on get_unchecked for vec_deque iterators, and run fmt
Frank Steffahn [Thu, 1 Jul 2021 17:04:50 +0000 (19:04 +0200)]
Remove redundant bounds on get_unchecked for vec_deque iterators, and run fmt

2 years agoAdd back TrustedRandomAccess-specialization for Vec, but only without coercions
Frank Steffahn [Thu, 1 Jul 2021 16:56:50 +0000 (18:56 +0200)]
Add back TrustedRandomAccess-specialization for Vec, but only without coercions

2 years agoChange __iterator_get_unchecked to work with TrustedRandomAccessNoCoerce
Frank Steffahn [Thu, 1 Jul 2021 16:54:02 +0000 (18:54 +0200)]
Change __iterator_get_unchecked to work with TrustedRandomAccessNoCoerce

2 years agoAdd TrustedRandomAccessNoCoerce supertrait without requirements or guarantees about...
Frank Steffahn [Thu, 1 Jul 2021 15:49:47 +0000 (17:49 +0200)]
Add TrustedRandomAccessNoCoerce supertrait without requirements or guarantees about subtype coercions

Update all the TrustedRandomAccess impls to also implement the new supertrait

2 years agoImprove documentation of TrustedRandomAccess
Frank Steffahn [Thu, 3 Jun 2021 13:53:12 +0000 (15:53 +0200)]
Improve documentation of TrustedRandomAccess

Include new details regarding coercions to a subtype.
These conditions also explain why the previously removed implementations
for {array, vec, vec_deque}::IntoIter<T> were unsound, because they introduced
an extra `T: Clone` for the TrustedRandomAccess impl, even though their parameter T
is covariant.

2 years agoRemove unsound TrustedRandomAccess implementations
Frank Steffahn [Tue, 1 Jun 2021 00:21:26 +0000 (02:21 +0200)]
Remove unsound TrustedRandomAccess implementations

Removes the implementations that depend on the user-definable trait `Copy`.

2 years agoFix last occurence of **What it does:**
flip1995 [Wed, 28 Jul 2021 11:51:16 +0000 (13:51 +0200)]
Fix last occurence of **What it does:**

2 years agoUpdate lint documentation to use markdown headlines
xFrednet [Fri, 2 Jul 2021 18:37:11 +0000 (20:37 +0200)]
Update lint documentation to use markdown headlines

2 years agoRemove old python lint doc generation scripts
flip1995 [Wed, 28 Jul 2021 12:15:34 +0000 (14:15 +0200)]
Remove old python lint doc generation scripts

2 years agoUpdate deploy CI
flip1995 [Mon, 31 May 2021 15:46:20 +0000 (17:46 +0200)]
Update deploy CI

This updates all the deploy scripts and the deploy workflow.

The deploy workflow now runs the metadata collector to collect the lint
documentation. It also changes the files that are checked out in the
deploy workflow from master and adds an explanation why we have to do
this.

2 years agoRollup merge of #87524 - FabianWolff:issue-87495, r=Aaron1011
Yuki Okushi [Wed, 28 Jul 2021 09:28:23 +0000 (18:28 +0900)]
Rollup merge of #87524 - FabianWolff:issue-87495, r=Aaron1011

Fix ICE in `diagnostic_hir_wf_check`

Fixes #87495. The [documentation for `ObligationCauseCode::WellFormed`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_infer/traits/enum.ObligationCauseCode.html#variant.WellFormed) says that

> it is always correct [...] to specify `WellFormed(None)`

instead of `WellFormed(Some(...))`, which seems to have caused the issue here, as `diagnostic_hir_wf_check` does not expect to be called with an associated constant and will ICE:

https://github.com/rust-lang/rust/blob/fd853c00e255559255885aadff9e93a1760c8728/compiler/rustc_typeck/src/hir_wf_check.rs#L131-L134

Therefore, I have changed `check_associated_item()` to pass a `WellFormed(None)` for associated constants.

r? ``@Aaron1011``

2 years agoRollup merge of #87523 - frogtd:patch-2, r=dtolnay
Yuki Okushi [Wed, 28 Jul 2021 09:28:22 +0000 (18:28 +0900)]
Rollup merge of #87523 - frogtd:patch-2, r=dtolnay

Stop creating a reference then immediately dereferencing it.

Stop creating a reference then immediately dereferencing it.

2 years agoRollup merge of #87513 - hudson-ayers:bootstrap-py-fix, r=jyn514
Yuki Okushi [Wed, 28 Jul 2021 09:28:21 +0000 (18:28 +0900)]
Rollup merge of #87513 - hudson-ayers:bootstrap-py-fix, r=jyn514

bootstrap.py: change `git log` option to indicate desired behavior

When determining which LLVM artifacts to download, bootstrap.py calls: `git log --author=bors --format=%H -n1 -m --first-parent --
src/llvm-project src/bootstrap/download-ci-llvm-stamp src/version`. However, the `-m` option has no effect, per the `git log` help:

> -m
> This option makes diff output for merge commits to be shown in the
> default format. -m will produce the output only if -p is given as
> well. The default format could be changed using log.diffMerges
> configuration parameter, which default value is separate.

Accordingly, this commit removes use of the -m option in favor of ~~`--diff-merges=off`~~ `--no-patch`, since no diff information is needed, and in fact the presence of a diff breaks the command. Tested using git 2.32, this does not change the output of the command.

The motivation for this change is that some patched versions of git change the behavior of the `-m` flag to imply `-p`, rather than to do nothing unless `-p` is passed. These patched versions of git lead to this script not working. Google's corp-provided git is one such example.

2 years agoRollup merge of #87507 - jethrogb:jb/sgx-unmoveable-mutex, r=dtolnay
Yuki Okushi [Wed, 28 Jul 2021 09:28:20 +0000 (18:28 +0900)]
Rollup merge of #87507 - jethrogb:jb/sgx-unmoveable-mutex, r=dtolnay

SGX mutex is *not* moveable

Reverts the erroneous change in #85029.

2 years agoRollup merge of #87501 - spastorino:remove-min-tait, r=oli-obk
Yuki Okushi [Wed, 28 Jul 2021 09:28:19 +0000 (18:28 +0900)]
Rollup merge of #87501 - spastorino:remove-min-tait, r=oli-obk

Remove min_type_alias_impl_trait in favor of type_alias_impl_trait

r? ``@oli-obk``

2 years agoRollup merge of #87500 - Smittyvb:min-max-docs, r=kennytm
Yuki Okushi [Wed, 28 Jul 2021 09:28:18 +0000 (18:28 +0900)]
Rollup merge of #87500 - Smittyvb:min-max-docs, r=kennytm

Document math behind MIN/MAX consts on integers

Currently the documentation for `[integer]::{MIN, MAX}` doesn't explain where the constants come from. This documents how the values of those constants are related to powers of 2.

2 years agoRollup merge of #87453 - ibraheemdev:i-68697, r=wesleywiser
Yuki Okushi [Wed, 28 Jul 2021 09:28:17 +0000 (18:28 +0900)]
Rollup merge of #87453 - ibraheemdev:i-68697, r=wesleywiser

Suggest removing unnecessary &mut as help message

Closes #68697

2 years agoRollup merge of #87443 - jyn514:submodules-take-n, r=jyn514
Yuki Okushi [Wed, 28 Jul 2021 09:28:15 +0000 (18:28 +0900)]
Rollup merge of #87443 - jyn514:submodules-take-n, r=jyn514

Don't treat git repos as non-existent when `ignore_git` is set

The new submodule handling depends on `is_git()` to be accurate to
decide whether it should handle submodules at all or not. Unfortunately,
`is_git()` treated "this directory does not have a git repository" and
"this repository should not be used for SHA/version/commit date info"
the same. This changes it to distinguish the two.

To clarify: ignore_get is set by default whenever channel == "dev", which it is by default whenever you're compiling locally. So basically everyone would hit this, not just people who had explicitly configured ignore_git.

Here's an example of an error this fixes:

```
$ x build
Updating only changed submodules
Submodules updated in 0.01 seconds
    Finished dev [unoptimized + debuginfo] target(s) in 0.17s
warning: x.py has made several changes recently you may want to look at
help: consider looking at the changes in `src/bootstrap/CHANGELOG.md`
note: to silence this warning, add `changelog-seen = 2` at the top of `config.toml`
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.16s
Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
Building LLVM for x86_64-unknown-linux-gnu
detected home dir change, cleaning out entire build directory
running: "cmake" "/home/joshua/rustc3/src/llvm-project/llvm" "-G" "Ninja" "-DLLVM_ENABLE_ASSERTIONS=OFF" "-DLLVM_TARGETS_TO_BUILD=AArch64;ARM;BPF;Hexagon;MSP430;Mips;NVPTX;PowerPC;RISCV;Sparc;SystemZ;WebAssembly;X86" "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR" "-DLLVM_INCLUDE_EXAMPLES=OFF" "-DLLVM_INCLUDE_DOCS=OFF" "-DLLVM_INCLUDE_BENCHMARKS=OFF" "-DLLVM_ENABLE_TERMINFO=OFF" "-DLLVM_ENABLE_LIBEDIT=OFF" "-DLLVM_ENABLE_BINDINGS=OFF" "-DLLVM_ENABLE_Z3_SOLVER=OFF" "-DLLVM_PARALLEL_COMPILE_JOBS=48" "-DLLVM_TARGET_ARCH=x86_64" "-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-linux-gnu" "-DLLVM_ENABLE_ZLIB=ON" "-DLLVM_ENABLE_LIBXML2=OFF" "-DLLVM_VERSION_SUFFIX=-rust-dev" "-DCMAKE_INSTALL_MESSAGE=LAZY" "-DCMAKE_C_COMPILER=gcc" "-DCMAKE_CXX_COMPILER=g++" "-DCMAKE_ASM_COMPILER=gcc" "-DCMAKE_C_FLAGS=-ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_FLAGS=-ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_INSTALL_PREFIX=/home/joshua/rustc3/build/x86_64-unknown-linux-gnu/llvm" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_BUILD_TYPE=Release"
CMake Error: The source directory "/home/joshua/rustc3/src/llvm-project/llvm" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
thread 'main' panicked at '
command did not execute successfully, got: exit status: 1

build script failed, must exit now', /home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.44/src/lib.rs:885:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
finished in 0.783 seconds
Build completed unsuccessfully in 0:00:01
```

I *believe* this regression was only introduced in https://github.com/rust-lang/rust/pull/87380, not https://github.com/rust-lang/rust/pull/82653. ``@petrochenkov`` can you check that this fixes the issue you encountered in https://github.com/rust-lang/rust/pull/82653#issuecomment-886113679 ?

r? ``@Mark-Simulacrum``

2 years agoRollup merge of #87330 - inquisitivecrystal:extend-reserve, r=JohnTitor
Yuki Okushi [Wed, 28 Jul 2021 09:28:14 +0000 (18:28 +0900)]
Rollup merge of #87330 - inquisitivecrystal:extend-reserve, r=JohnTitor

Use hashbrown's `extend_reserve()` in `HashMap`

When we added `extend_reserve()` to our implementation of `Extend` for `HashMap`, hashbrown didn't have a version we could use. Now that hashbrown has added it, we should use its version instead of implementing it ourself.

2 years agoRollup merge of #87315 - ricobbe:raw-dylib-unstable-book, r=wesleywiser
Yuki Okushi [Wed, 28 Jul 2021 09:28:13 +0000 (18:28 +0900)]
Rollup merge of #87315 - ricobbe:raw-dylib-unstable-book, r=wesleywiser

Add docs for raw-dylib to unstable book

2 years agoAuto merge of #86251 - Smittyvb:thir-tree-again, r=oli-obk
bors [Wed, 28 Jul 2021 09:01:11 +0000 (09:01 +0000)]
Auto merge of #86251 - Smittyvb:thir-tree-again, r=oli-obk

Support -Z unpretty=thir-tree again

Currently `-Z unpretty=thir-tree` is broken after some THIR refactorings. This re-implements it, making it easier to debug THIR-related issues.

We have to do analyzes before getting the THIR, since trying to create THIR from invalid HIR can ICE. But doing those analyzes requires the THIR to be built and stolen. We work around this by creating a separate query to construct the THIR tree string representation.

Closes https://github.com/rust-lang/project-thir-unsafeck/issues/8, fixes #85552.

2 years agoupdate Miri
Ralf Jung [Wed, 28 Jul 2021 08:39:38 +0000 (10:39 +0200)]
update Miri

2 years agoAuto merge of #86735 - jhpratt:rfc-3107, r=petrochenkov
bors [Wed, 28 Jul 2021 05:59:30 +0000 (05:59 +0000)]
Auto merge of #86735 - jhpratt:rfc-3107, r=petrochenkov

Implement RFC 3107: `#[derive(Default)]` on enums with a `#[default]` attribute

This PR implements RFC 3107, which permits `#[derive(Default)]` on enums where a unit variant has a `#[default]` attribute. See comments for current status.

2 years agoAuto merge of #85769 - jhpratt:stabilize-const-transmute-union, r=RalfJung
bors [Wed, 28 Jul 2021 00:53:17 +0000 (00:53 +0000)]
Auto merge of #85769 - jhpratt:stabilize-const-transmute-union, r=RalfJung

Stabilize `const_fn_transmute`, `const_fn_union`

This PR stabilizes the `const_fn_transmute` and `const_fn_union` features. It _does not_ stabilize any methods (obviously aside from `transmute`) that are blocked on only these features.

Closes #53605. Closes #51909.

2 years agoFix ICE in `diagnostic_hir_wf_check`
Fabian Wolff [Tue, 27 Jul 2021 20:24:43 +0000 (22:24 +0200)]
Fix ICE in `diagnostic_hir_wf_check`

2 years agoRemove min_tait and full_tait stderr dangling files
Santiago Pastorino [Tue, 27 Jul 2021 22:50:14 +0000 (19:50 -0300)]
Remove min_tait and full_tait stderr dangling files

2 years agoBless nll tests
Santiago Pastorino [Tue, 27 Jul 2021 22:48:54 +0000 (19:48 -0300)]
Bless nll tests

2 years agoDon't run MIR unsafeck at all when using `-Zthir-unsafeck`
LeSeulArtichaut [Tue, 27 Jul 2021 17:47:39 +0000 (19:47 +0200)]
Don't run MIR unsafeck at all when using `-Zthir-unsafeck`

2 years agoremove unneeded stringify
Smitty [Tue, 27 Jul 2021 20:37:18 +0000 (16:37 -0400)]
remove unneeded stringify

2 years agoUpdate tests
Jacob Pratt [Thu, 3 Jun 2021 07:31:27 +0000 (03:31 -0400)]
Update tests

2 years agoUpdate tests
Jacob Pratt [Thu, 3 Jun 2021 07:31:27 +0000 (03:31 -0400)]
Update tests

2 years agoUpdate range.rs
frogtd [Tue, 27 Jul 2021 20:14:48 +0000 (16:14 -0400)]
Update range.rs

Stop creating a reference then immediately dereferencing it.

2 years agoStabilize `const_fn_union`
Jacob Pratt [Thu, 3 Jun 2021 06:16:56 +0000 (02:16 -0400)]
Stabilize `const_fn_union`

2 years agoStabilize `const_fn_transmute`
Jacob Pratt [Thu, 3 Jun 2021 06:11:14 +0000 (02:11 -0400)]
Stabilize `const_fn_transmute`

2 years agoAuto merge of #80367 - camelid:check_match-combine-loop, r=Nadrieril
bors [Tue, 27 Jul 2021 19:56:18 +0000 (19:56 +0000)]
Auto merge of #80367 - camelid:check_match-combine-loop, r=Nadrieril

Combine two loops in `check_match`

Suggested by Nadrieril in
https://github.com/rust-lang/rust/pull/79051#discussion_r548778186.

Opening to get a perf run. Hopefully this code doesn't require everything in the
first loop to be done before running the second! (It shouldn't though.)

cc `@Nadrieril`

2 years agoProhibit `#[default]` in invalid places
Jacob Pratt [Sat, 17 Jul 2021 05:05:57 +0000 (01:05 -0400)]
Prohibit `#[default]` in invalid places

2 years agoIndicate E0665 is no longer emitted
Jacob Pratt [Thu, 8 Jul 2021 22:26:48 +0000 (18:26 -0400)]
Indicate E0665 is no longer emitted

2 years agoAdd machine-applicable suggestions
Jacob Pratt [Mon, 12 Jul 2021 06:26:14 +0000 (02:26 -0400)]
Add machine-applicable suggestions

This avoids the need for tools like rust-analyzer to implement these
suggestions themselves.

2 years agoPermit deriving default on enums with `#[default]`
Jacob Pratt [Wed, 30 Jun 2021 00:22:52 +0000 (20:22 -0400)]
Permit deriving default on enums with `#[default]`

2 years agoMark code as ignored due to requiring external plugin
Chris Midgley [Tue, 27 Jul 2021 18:44:50 +0000 (19:44 +0100)]
Mark code as ignored due to requiring external plugin

2 years agoAdd long explanation for E0498
Chris Midgley [Tue, 27 Jul 2021 17:06:34 +0000 (18:06 +0100)]
Add long explanation for E0498

2 years agoAuto merge of #83484 - JulianKnodt:infer, r=oli-obk,lcnr
bors [Tue, 27 Jul 2021 16:24:45 +0000 (16:24 +0000)]
Auto merge of #83484 - JulianKnodt:infer, r=oli-obk,lcnr

Add hir::GenericArg::Infer

In order to extend inference to consts, make an Infer type on hir::GenericArg.

2 years agoAuto merge of #83484 - JulianKnodt:infer, r=oli-obk,lcnr
bors [Tue, 27 Jul 2021 16:24:45 +0000 (16:24 +0000)]
Auto merge of #83484 - JulianKnodt:infer, r=oli-obk,lcnr

Add hir::GenericArg::Infer

In order to extend inference to consts, make an Infer type on hir::GenericArg.

2 years agoremove allow(unconditional_recursion)
ibraheemdev [Tue, 27 Jul 2021 16:12:59 +0000 (12:12 -0400)]
remove allow(unconditional_recursion)

2 years agoRemove min_type_alias_impl_trait feature
Santiago Pastorino [Mon, 26 Jul 2021 23:38:38 +0000 (20:38 -0300)]
Remove min_type_alias_impl_trait feature

2 years agoexistential_type was removed in favor of type_alias_impl_trait
Santiago Pastorino [Mon, 26 Jul 2021 23:32:55 +0000 (20:32 -0300)]
existential_type was removed in favor of type_alias_impl_trait

2 years agoMake all tests use type_alias_impl_trait feature instead of min
Santiago Pastorino [Mon, 26 Jul 2021 20:01:16 +0000 (17:01 -0300)]
Make all tests use type_alias_impl_trait feature instead of min

2 years agoUse type_alias_impl_trait instead of min in compiler and lib
Santiago Pastorino [Tue, 27 Jul 2021 12:14:21 +0000 (09:14 -0300)]
Use type_alias_impl_trait instead of min in compiler and lib

2 years agobootstrap.py: remove unused `git log` option
Hudson Ayers [Tue, 27 Jul 2021 13:54:51 +0000 (13:54 +0000)]
bootstrap.py: remove unused `git log` option

When determining which LLVM artifacts to download, bootstrap.py
calls: `git log --author=bors --format=%H -n1 -m --first-parent --
src/llvm-project src/bootstrap/download-ci-llvm-stamp src/version`.
However, the `-m` option has no effect, per the `git log` help:

> -m
> This option makes diff output for merge commits to be shown in the
> default format. -m will produce the output only if -p is given as
> well. The default format could be changed using log.diffMerges
> configuration parameter, which default value is separate.

Accordingly, this commit removes use of the -m option in favor of
`--no-patch`, to make clear that this command should never output
diff information, as the SHA-1 hash is the only desired output.
Tested using git 2.32, this does not change the
output of the command.

The motivation for this change is that some patched versions of git
change the behavior of the `-m` flag to imply `-p`, rather than to do
nothing unless `-p` is passed. These patched versions of git lead to
this script not working. Google's corp-provided git is one such example.

2 years agoAuto merge of #7492 - nfejzic:improve_help, r=Manishearth
bors [Tue, 27 Jul 2021 14:39:08 +0000 (14:39 +0000)]
Auto merge of #7492 - nfejzic:improve_help, r=Manishearth

Explain flags missing in cargo check in --help

This commit closes #7389. As stated in the issue, `cargo clippy --help`
provides explanation for some flags and states that the rest are same
as in `cargo check --help`, even though some clippy specific flags
exist.

This commit extends the `cargo clippy --help` with two additional flags,
  - `cargo clippy --fix`
  - `cargo clippy --no-deps`

If there are more flags which are not present in `cargo check --help`
please bring these to my attention, I will include these aswell.
For now, I noticed only the two flags mentioned above.

changelog: `cargo clippy --help` now explains additional flags missing in `cargo check --help`.

2 years agoAuto merge of #7488 - DevinR528:bantype-fix, r=camsteffen
bors [Tue, 27 Jul 2021 14:27:11 +0000 (14:27 +0000)]
Auto merge of #7488 - DevinR528:bantype-fix, r=camsteffen

Add primitive type support to disallowed_type lint

Closes #6845

changelog: Enable the banning of primitive types in [`disallowed_type`]

2 years agoAdd primitive type support to disallowed_type lint
Devin Ragotzy [Thu, 22 Jul 2021 12:40:24 +0000 (08:40 -0400)]
Add primitive type support to disallowed_type lint

Fix docs of disallowed_type

Add ability to name primitive types without import path

Move primitive resolution to clippy_utils path_to_res fn

Refactor Res matching, fix naming and docs from review

Use tcx.def_path_str when emitting the lint

2 years agoAuto merge of #87509 - JohnTitor:rollup-8iqn6cl, r=JohnTitor
bors [Tue, 27 Jul 2021 13:31:40 +0000 (13:31 +0000)]
Auto merge of #87509 - JohnTitor:rollup-8iqn6cl, r=JohnTitor

Rollup of 10 pull requests

Successful merges:

 - #86450 (Add flag to configure `large_assignments` lint)
 - #86764 (Avoid ICE on type error recovery)
 - #87354 (Update VxWork's UNIX support)
 - #87427 (get rid of NoMirFor error variant)
 - #87446 (macos current_exe using directly libc instead.)
 - #87494 (fix typo: whenver -> whenever)
 - #87497 (Add long explanation for E0544.)
 - #87499 (Remove ASCII fast path from `rustc_lexer::{is_id_continue, is_id_start}`)
 - #87502 (Update cargo)
 - #87503 (Update books)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agoAdd explanations for why we use Variant::Struct instead of Variant::Tuple for tuple...
Guillaume Gomez [Tue, 27 Jul 2021 11:52:15 +0000 (13:52 +0200)]
Add explanations for why we use Variant::Struct instead of Variant::Tuple for tuple structs in enums

2 years agoRollup merge of #87503 - ehuss:update-books, r=ehuss
Yuki Okushi [Tue, 27 Jul 2021 10:52:52 +0000 (19:52 +0900)]
Rollup merge of #87503 - ehuss:update-books, r=ehuss

Update books

## nomicon

1 commits in 7a13537f96af4b9b8e3ea296d6e5c3c7ab72ce9f..f51734eb5566c826b471977747ea3d7d6915bbe9
2021-07-05 23:34:47 -0400 to 2021-07-23 18:24:35 +0900
- Add cloning example for dot operator behaviour (rust-lang/nomicon#292)

## reference

3 commits in 82d75cf423e4a7824fb36e73ccb18519d6900610..3b7be075af5d6e402a18efff672a8a265b4596fd
2021-07-15 06:49:08 -0700 to 2021-07-26 13:20:11 -0700
- Fix typos + grammar (rust-lang/reference#1037)
- Expand on Unicode identifiers. (rust-lang/reference#1022)
- Remove incorrect apostrophe (rust-lang/reference#1076)

## book

17 commits in eac55314210519238652f12b30fec9daea61f7fe..a07036f864b37896b31eb996cd7aedb489f69a1f
2021-07-19 11:08:01 -0400 to 2021-07-26 20:19:46 -0400
- Set expectations a bit more realistically
- Snapshot of chapter 4 for nostarch
- A few small wording tweaks in ch 4
- Clarify that it's not stack/heap exactly that matters for copy/non copy, fixes rust-lang/book#2799
- Clarify a detail around move. Fixes rust-lang/book#2413.
- Clarify places that changed because of NLL. Fixes rust-lang/book#1939.
- nostarch ch3
- Small edits to chapter 3
-  (rust-lang/book#2797)
- Update ch03-03-how-functions-work.md: Pervasive -&gt; Prevalent. (rust-lang/book#2796)
- Address loop labels and continue. Fixes rust-lang/book#1392.
- Clarify behavior of integer division. Fixes rust-lang/book#2248.
- Demonstrate how scope interacts with shadowing
- Add another cross-reference to the new unit type introduction
- Introduce the unit type with tuples. Fixes rust-lang/book#1933.
- Reword sentence to not have numbers separated only by a comma
- Link directly to other installation page. Fixes rust-lang/book#1609

## rust-by-example

1 commits in 1db6bb483cc87ad3b424d9aba764fe622960a1be..0dc9cd4e89f00cb5230f120e1a083916386e422b
2021-07-15 06:17:42 -0300 to 2021-07-23 09:14:27 -0300
- Grammatical mistake: Comparison as ... as the (rust-lang/rust-by-example#1453)

## rustc-dev-guide

2 commits in 93422c21baca585dc88357ec886a48f6ddc7d665..09343d6f921d2a07c66f8c41ec3d65bf1fa52556
2021-07-13 12:45:58 -0400 to 2021-07-26 00:37:28 +0200
- Fix typo in building/bootstrapping.md (rust-lang/rustc-dev-guide#1175)
- Link directly to stabilization report comments (rust-lang/rustc-dev-guide#1173)

## edition-guide

4 commits in af696ce8ea526445590ae0ca66a8128d2a95a69a..3710b0cae783d0bcd2b42452a63b081473f5970a
2021-07-20 11:38:03 -0400 to 2021-07-26 11:34:46 -0700
- Add more consistent headings and add a migration section to reserving-syntax (rust-lang/edition-guide#263)
- reserving-syntax.md: Expand and add detail (rust-lang/edition-guide#249)
- Fix typo in or-patterns section (rust-lang/edition-guide#262)
- Fix typo (rust-lang/edition-guide#261)

2 years agoRollup merge of #87502 - ehuss:update-cargo, r=ehuss
Yuki Okushi [Tue, 27 Jul 2021 10:52:51 +0000 (19:52 +0900)]
Rollup merge of #87502 - ehuss:update-cargo, r=ehuss

Update cargo

8 commits in cebef2951ee69617852844894164b54ed478a7da..d21c22870e58499d6c31f1bef3bf1255eb021666
2021-07-22 13:01:52 +0000 to 2021-07-26 20:23:21 +0000
- Fix version string. (rust-lang/cargo#9727)
- Allow publishing from workspace root. (rust-lang/cargo#9559)
- Better msg for wrong position (rust-lang/cargo#9723)
- Stabilize the rustc-link-arg option (rust-lang/cargo#9557)
- Warning when using features in replace (rust-lang/cargo#9681)
- Refactor if let chains to matches! macro (rust-lang/cargo#9721)
- Weather is not nice today.. (rust-lang/cargo#9720)
- Update should_use_metadata function (rust-lang/cargo#9653)

2 years agoRollup merge of #87499 - ibraheemdev:patch-6, r=dtolnay
Yuki Okushi [Tue, 27 Jul 2021 10:52:50 +0000 (19:52 +0900)]
Rollup merge of #87499 - ibraheemdev:patch-6, r=dtolnay

Remove ASCII fast path from `rustc_lexer::{is_id_continue, is_id_start}`

`unicode_xid` now has a fast path built-in: https://github.com/unicode-rs/unicode-xid/commit/122b38775cf077570025c8294280f57d2004096f

2 years agoRollup merge of #87497 - midgleyc:long-E0544, r=GuillaumeGomez
Yuki Okushi [Tue, 27 Jul 2021 10:52:49 +0000 (19:52 +0900)]
Rollup merge of #87497 - midgleyc:long-E0544, r=GuillaumeGomez

Add long explanation for E0544.

Helps with #61137

2 years agoRollup merge of #87494 - midgleyc:comment-typos, r=joshtriplett
Yuki Okushi [Tue, 27 Jul 2021 10:52:48 +0000 (19:52 +0900)]
Rollup merge of #87494 - midgleyc:comment-typos, r=joshtriplett

fix typo: whenver -> whenever

Fix a typo in a comment in RefCell: "whenver" -> "whenever".

2 years agoRollup merge of #87446 - devnexen:macos_update, r=dtolnay
Yuki Okushi [Tue, 27 Jul 2021 10:52:47 +0000 (19:52 +0900)]
Rollup merge of #87446 - devnexen:macos_update, r=dtolnay

macos current_exe using directly libc instead.

2 years agoRollup merge of #87427 - RalfJung:no-mir-for, r=oli-obk
Yuki Okushi [Tue, 27 Jul 2021 10:52:46 +0000 (19:52 +0900)]
Rollup merge of #87427 - RalfJung:no-mir-for, r=oli-obk

get rid of NoMirFor error variant

The only place where we throw that error, it is very quickly caught again and turned into a different error. So raise that other error immediately.

2 years agoRollup merge of #87354 - Wind-River:2021_master, r=kennytm
Yuki Okushi [Tue, 27 Jul 2021 10:52:42 +0000 (19:52 +0900)]
Rollup merge of #87354 - Wind-River:2021_master, r=kennytm

Update VxWork's UNIX support

1. VxWorks does not provide glibc
2. VxWorks does provide `sigemptyset` and `sigaddset`

Note: these changes are concurrent to [this PR](https://github.com/rust-lang/libc/pull/2295) in libc.

2 years agoRollup merge of #86764 - estebank:issue-86756, r=pnkfelix
Yuki Okushi [Tue, 27 Jul 2021 10:52:41 +0000 (19:52 +0900)]
Rollup merge of #86764 - estebank:issue-86756, r=pnkfelix

Avoid ICE on type error recovery

Fix #86756

2 years agoRollup merge of #86450 - tmiasko:move-size-limit, r=pnkfelix
Yuki Okushi [Tue, 27 Jul 2021 10:52:40 +0000 (19:52 +0900)]
Rollup merge of #86450 - tmiasko:move-size-limit, r=pnkfelix

Add flag to configure `large_assignments` lint

The `large_assignments` lints detects moves over specified limit.  The
limit is configured through `move_size_limit = "N"` attribute placed at
the root of a crate. When attribute is absent, the lint is disabled.

Make it possible to enable the lint without making any changes to the
source code, through a new flag `-Zmove-size-limit=N`.  For example, to
detect moves exceeding 1023 bytes in a cargo crate, including all
dependencies one could use:

```
$ env RUSTFLAGS=-Zmove-size-limit=1024 cargo build -vv
```

Lint tracking issue #83518.