Commit Graph

157100 Commits

Author SHA1 Message Date
Yuki Okushi
327d8073e2
Rollup merge of #89922 - JohnTitor:update-e0637, r=jackh726
Update E0637 description to mention `&` w/o an explicit lifetime name

Deal with https://github.com/rust-lang/rust/issues/89824#issuecomment-941598647. Another solution would be splitting the error code into two as (I think) it's a bit unclear to users why they have the same error code.
2021-10-22 19:42:46 +09:00
Yuki Okushi
91fb223f59
Rollup merge of #89895 - camsteffen:for-loop-head-span, r=davidtwco
Don't mark for loop iter expression as desugared

We typically don't mark spans of lowered things as desugared. This helps Clippy rightly discern when code is (not) from expansion. This was discovered by ``@flip1995`` at https://github.com/rust-lang/rust-clippy/pull/7789#issuecomment-939289501.
2021-10-22 19:42:45 +09:00
Yuki Okushi
62da4ab161
Rollup merge of #89665 - seanyoung:push-empty, r=m-ou-se
Ensure that pushing empty path works as before on verbatim paths

Fixes: https://github.com/rust-lang/rust/issues/89658

Signed-off-by: Sean Young <sean@mess.org>
2021-10-22 19:42:43 +09:00
Yuki Okushi
8738d5d611
Rollup merge of #89257 - aDotInTheVoid:macro-error-2, r=estebank
Give better error for `macro_rules name`

follow up to #89221

r? ``@estebank``

``@rustbot`` modify labels: +A-diagnostics +A-parser
2021-10-22 19:42:43 +09:00
Yuki Okushi
918f9cc88b
Rollup merge of #88624 - kellerkindt:master, r=JohnTitor
Stabilize feature `saturating_div` for rust 1.58.0

The tracking issue is #89381

This seems like a reasonable simple change(?). The feature `saturating_div` was added as part of the ongoing effort to implement a `Saturating` integer type (see #87921). The implementation has been discussed [here](https://github.com/rust-lang/rust/pull/87921#issuecomment-899357720) and [here](https://github.com/rust-lang/rust/pull/87921#discussion_r691888556). It extends the list of saturating operations on integer types (like `saturating_add`, `saturating_sub`, `saturating_mul`, ...) by the function `fn saturating_div(self, rhs: Self) -> Self`.

The stabilization of the feature `saturating_int_impl` (for the `Saturating` type) needs to have this stabilized first.

Closes #89381
2021-10-22 19:42:42 +09:00
Yuki Okushi
d91e9b7d77
Rollup merge of #87537 - Wilfred:improve-min-heap-docs, r=Mark-Simulacrum
Clarify undefined behaviour in binary heap, btree and hashset docs

Previously, it wasn't clear whether "This could include" was referring to logic errors, or undefined behaviour. Tweak wording to clarify this sentence does not relate to UB.
2021-10-22 19:42:41 +09:00
Jethro Beekman
4a439769ec Implement split_array and split_array_mut 2021-10-22 09:58:24 +02:00
Caleb Sander
afcee19d88 Make RSplit<T, P>: Clone not require T: Clone
This addresses a TODO comment. The behavior of #[derive(Clone)]
*does* result in a T: Clone requirement.

Add a manual Clone implementation, matching Split and SplitInclusive.
2021-10-21 21:25:59 -07:00
Noah Lev
1da8659fa6 Remove unused impl of GetDefId for Typedef 2021-10-21 19:56:33 -07:00
Noah Lev
b987fd78c2 Fix docs for inline::build_impl
Based on looking at the source code, it looks like the `did` needs to be
for an impl, not functions in an impl.
2021-10-21 19:54:14 -07:00
bors
68a698baf6 Auto merge of #90126 - flip1995:clippyup, r=Manishearth
Update Clippy

r? `@Manishearth`

This adds a new dep to Clippy: [indoc](https://crates.io/crates/indoc)

And transitively: [unindent](https://crates.io/crates/unindent)
2021-10-21 23:31:13 +00:00
Caleb Cartwright
170214fa16 fix doc issue in rustfmt 2021-10-21 17:22:54 -05:00
Camille GILLOT
6f6fa8b954 Use SortedMap in HIR. 2021-10-21 23:08:57 +02:00
AlexApps99
361c978fbd
Added docs to internal_macro const 2021-10-22 10:07:35 +13:00
Hans Kratz
3e6a69534f Time out docker load after 10 minutes, kill after 12 due to CI hangs. 2021-10-21 23:07:23 +02:00
AlexApps99
23d033e177
Added const versions of common numeric operations
# Conflicts:
#	library/core/src/lib.rs
2021-10-22 10:03:18 +13:00
lcnr
22e1798975 ignore potential_query_instability in rustdoc 2021-10-21 21:14:34 +02:00
Camille GILLOT
0a5666b838 Do not depend on the stored value when trying to cache on disk. 2021-10-21 20:00:45 +02:00
Hudson Ayers
b802629311 add tests for -Zlocation-detail 2021-10-21 10:44:22 -07:00
Hudson Ayers
8090f67fb7 document the unstable location-detail flag 2021-10-21 10:44:13 -07:00
Hudson Ayers
e1d94b8fd1 Configure saved panic locations based on location-detail flag 2021-10-21 10:41:19 -07:00
Michael Watzko
0dba9d0e42 Stabilize feature saturating_div for rust 1.58 2021-10-21 18:08:03 +02:00
bors
547a6ffee0 Auto merge of #90130 - Mark-Simulacrum:revert-namebinding, r=oli-obk
Revert "resolve: Use NameBinding for local variables and generic parameters"

This reverts commit 6162529a01, that is, PR #89100.

Reverting per performance regression noted post-merge on that PR (https://github.com/rust-lang/rust/pull/89100#issuecomment-948065457).
2021-10-21 15:45:00 +00:00
Wilfred Hughes
04c1ec51f1 Clarify undefined behaviour for binary heap, btree and hashset
Previously, it wasn't clear whether "This could include" was referring
to logic errors, or undefined behaviour. Tweak wording to clarify this
sentence does not relate to UB.
2021-10-21 09:30:46 -04:00
Mark Rousskov
9296efe3ef Print step timings for try builds 2021-10-21 09:16:16 -04:00
Mark Rousskov
7552af2f6f Revert "Auto merge of #89100 - petrochenkov:localbind, r=cjgillot"
This reverts commit 6162529a01.
2021-10-21 09:09:24 -04:00
Josh Triplett
d50832ba09 triagebot: Treat I-*nominated like I-nominated
rustbot doesn't allow unauthenticated users to set `I-nominated`; apply
the same permissions to the new `I-*nominated` labels.
2021-10-21 15:07:36 +02:00
Yuki Okushi
3b2dd702fc
Do not mention a reexported item if it's private 2021-10-21 20:25:45 +09:00
flip1995
8d5f69de3b
Update Cargo.lock 2021-10-21 13:13:17 +02:00
flip1995
9af8e378b9
Merge commit '91496c2ac6abf6454c413bb23e8becf6b6dc20ea' into clippyup 2021-10-21 13:11:36 +02:00
Hans Kratz
5c8fca585c CI: Enable overflow checks for test (non-dist) builds 2021-10-21 13:10:52 +02:00
bors
91496c2ac6 Auto merge of #7853 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

changelog: none
2021-10-21 10:23:11 +00:00
flip1995
8e48333bf1
Bump nightly version -> 2021-10-21 2021-10-21 12:19:46 +02:00
flip1995
122233091a
Bump Clippy Version -> 0.1.58 2021-10-21 12:19:32 +02:00
flip1995
085181e29d
Merge remote-tracking branch 'upstream/master' into rustup 2021-10-21 12:18:12 +02:00
samlich
ab44e46345
Add test for issue #78561 2021-10-21 10:11:33 +00:00
Hans Kratz
838e673d3b Debug output before loading docker images as that might hang. 2021-10-21 11:40:32 +02:00
Hans Kratz
e1e273fb64 CI: make cache download attempt time out after 10 minutes 2021-10-21 11:39:57 +02:00
Tomasz Miąsko
74c6636d27 Verify that only NeedsNonConstDrop expects promoteds 2021-10-21 11:14:41 +02:00
bors
535262cc8c Auto merge of #7852 - surechen:fix_typo, r=xFrednet
Fix typo for invalid_null_ptr_usage and missing_inline_in_public_items.

Fix typo for invalid_null_ptr_usage and missing_inline_in_public_items.

changelog: none
2021-10-21 09:08:22 +00:00
bors
e015ef5b26 Auto merge of #90119 - JohnTitor:rollup-e5t6khz, r=JohnTitor
Rollup of 14 pull requests

Successful merges:

 - #86984 (Reject octal zeros in IPv4 addresses)
 - #87440 (Remove unnecessary condition in Barrier::wait())
 - #88644 (`AbstractConst` private fields)
 - #89292 (Stabilize CString::from_vec_with_nul[_unchecked])
 - #90010 (Avoid overflow in `VecDeque::with_capacity_in()`.)
 - #90029 (Add test for debug logging during incremental compilation)
 - #90031 (config: add the option to enable LLVM tests)
 - #90048 (Add test for line-number setting)
 - #90071 (Remove hir::map::blocks and use FnKind instead)
 - #90074 (2229 migrations small cleanup)
 - #90077 (Make `From` impls of NonZero integer const.)
 - #90097 (Add test for duplicated sidebar entries for reexported macro)
 - #90098 (Add test to ensure that the missing_doc_code_examples is not triggered on foreign trait implementations)
 - #90099 (Fix MIRI UB in `Vec::swap_remove`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-10-21 08:04:19 +00:00
surechen
abb7ae9a79 Fix typo for INVALID_NULL_PTR_USAGE and MISSING_INLINE_IN_PUBLIC_ITEMS. 2021-10-21 14:33:43 +08:00
Yuki Okushi
3680ecd8a6
Rollup merge of #90099 - SkiFire13:fix-vec-swap-remove, r=dtolnay
Fix MIRI UB in `Vec::swap_remove`

Fixes #90055

I find it weird that `Vec::swap_remove` read the last element to the stack just to immediately put it back in the `Vec` in place of the one at index `index`. It seems much more natural to me to just read the element at position `index` and then move the last element in its place. I guess this might also slightly improve codegen.
2021-10-21 14:11:13 +09:00
Yuki Okushi
68a5680fc5
Rollup merge of #90098 - GuillaumeGomez:add-test-foreign-impl-missing-doc-code-examples, r=jyn514
Add test to ensure that the missing_doc_code_examples is not triggered on foreign trait implementations

Fixes #76450.

r? ````@jyn514````
2021-10-21 14:11:12 +09:00
Yuki Okushi
759a8aee31
Rollup merge of #90097 - GuillaumeGomez:duplicated-sidebar-entry-reexported-macro, r=notriddle
Add test for duplicated sidebar entries for reexported macro

Fixes #90015.

r? ````@notriddle````
2021-10-21 14:11:11 +09:00
Yuki Okushi
e4cfaa1a7e
Rollup merge of #90077 - woppopo:const_nonzero_from, r=oli-obk
Make `From` impls of NonZero integer const.

I also changed the feature gate added to `From` impls of Atomic integer to `const_num_from_num` from `const_convert`.

Tracking issue: #87852
2021-10-21 14:11:10 +09:00
Yuki Okushi
371fd4f1c0
Rollup merge of #90074 - klensy:upvar-all, r=wesleywiser
2229 migrations small cleanup

This removes needless `format!`'ing of empty string and replaces `vec!` with const strings with const array.
2021-10-21 14:11:09 +09:00
Yuki Okushi
afdd0c3ade
Rollup merge of #90071 - cjgillot:no-blocks, r=oli-obk
Remove hir::map::blocks and use FnKind instead

The principal tool is `FnLikeNode`, which is not often used and can be easily implemented using `rustc_hir::intravisit::FnKind`.
2021-10-21 14:11:08 +09:00
Yuki Okushi
47a1f67a8d
Rollup merge of #90048 - GuillaumeGomez:line-number-setting, r=jsha
Add test for line-number setting

The first commit updates the version of the package to be able to have multi-line commands (which looks much nicer for this test).

r? ````@jsha````
2021-10-21 14:11:08 +09:00
Yuki Okushi
632f06d8eb
Rollup merge of #90031 - durin42:allow-llvm-tests, r=Mark-Simulacrum
config: add the option to enable LLVM tests

I'm working on some LLVM patches in concert with a Rust patch, and it's
helping me quite a bit to have this as an option. It doesn't seem that
hard, so I figured I'd formalize it in x.py and send it upstream.
2021-10-21 14:11:07 +09:00