Commit Graph

138054 Commits

Author SHA1 Message Date
Josh Stone
48e5866d11 Initialize BTree nodes directly in the heap 2021-02-12 12:14:17 -08:00
bors
d416093209 Auto merge of #82025 - JohnTitor:rollup-cohp0gy, r=JohnTitor
Rollup of 16 pull requests

Successful merges:

 - #79983 (fix indefinite article in cell.rs)
 - #81831 (Don't display `mut` in arguments for functions documentation)
 - #81947 (Relax ItemCtxt::to_ty lifetime)
 - #81954 (RELEASES.md 1.50: Group platform support notes together)
 - #81955 (bootstrap: Locate llvm-dwp based on llvm-config bindir)
 - #81959 (Fix assosiated typo)
 - #81964 (Fix documentation not showing on localStorage error)
 - #81968 (bootstrap: fix wrong docs installation path)
 - #81990 (Make suggestion of changing mutability of arguments broader)
 - #81994 (Improve long explanation for E0542 and E0546)
 - #81997 (dist: include src/build_helper as part of the crate graph for rustc-dev)
 - #82003 (Stack probes: fix error message)
 - #82004 (clean up clean::Static struct)
 - #82011 (Fix private intra-doc warnings on associated items)
 - #82013 (Tell user how to fix CI file being not up to date)
 - #82017 (Fix typo in mod.rs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-02-12 14:40:27 +00:00
Yuki Okushi
ff8b7f20d9
Rollup merge of #82017 - eltociear:patch-8, r=jyn514
Fix typo in mod.rs

insted -> instead
2021-02-12 19:32:22 +09:00
Yuki Okushi
095b76c755
Rollup merge of #82013 - Mark-Simulacrum:better-ci-error, r=jyn514
Tell user how to fix CI file being not up to date

This hopefully should avoid future questions like in https://github.com/rust-lang/rust/pull/79979#issuecomment-776241356.
2021-02-12 19:32:21 +09:00
Yuki Okushi
6830ea1a83
Rollup merge of #82011 - jyn514:warn-private-assoc-item, r=max-heller
Fix private intra-doc warnings on associated items

The issue was that the `kind, id` override was previously only being
considered for the disambiguator check, not the privacy check. This uses
the same ID for both.

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

r? ``@max-heller``
2021-02-12 19:32:20 +09:00
Yuki Okushi
1a9d20b430
Rollup merge of #82004 - GuillaumeGomez:clean-static-struct, r=jyn514
clean up clean::Static struct

Having a `String` for the expression didn't make much sense, and even less when it's actually not used (except in json so I kept it).

r? ``@jyn514``
2021-02-12 19:32:18 +09:00
Yuki Okushi
55539cbdc0
Rollup merge of #82003 - ojeda:stack-probe-msg, r=estebank
Stack probes: fix error message
2021-02-12 19:32:17 +09:00
Yuki Okushi
71fd43117b
Rollup merge of #81997 - bnjbvr:dist-include-build-helper, r=Mark-Simulacrum
dist: include src/build_helper as part of the crate graph for rustc-dev

The build_helper dependency is used to build the compiler/rustc_llvm build script.

Since it was missing, it wasn't possible to really use rustc-dev to
build, see for instance: https://github.com/rust-analyzer/rust-analyzer/issues/7589.
2021-02-12 19:32:16 +09:00
Yuki Okushi
44d28717da
Rollup merge of #81994 - jesusprubio:improve-long-explanation-e0542-e0546, r=GuillaumeGomez
Improve long explanation for E0542 and E0546

Helps with #61137

To keep the consistency with: https://github.com/rust-lang/rust/pull/81925
2021-02-12 19:32:15 +09:00
Yuki Okushi
46aef0e375
Rollup merge of #81990 - matsujika:suggest-mut-reference, r=estebank
Make suggestion of changing mutability of arguments broader

Fix #81421

Previously rustc tries to emit the suggestion of changing mutablity unless `!trait_ref.has_infer_types_or_consts() && self.predicate_can_apply(obligation.param_env, trait_ref)` and this led to some false negatives to occur.
2021-02-12 19:32:14 +09:00
Yuki Okushi
459dda98eb
Rollup merge of #81968 - pietroalbini:fix-doc-install-path, r=Mark-Simulacrum
bootstrap: fix wrong docs installation path

This PR fixes https://github.com/rust-lang/rust/issues/81967, a regression introduced by https://github.com/rust-lang/rust/pull/80797. The commit has already been backported to stable 1.50.0.

r? ``````@Mark-Simulacrum``````
2021-02-12 19:32:13 +09:00
Yuki Okushi
0f47e192bd
Rollup merge of #81964 - lovasoa:patch-1, r=GuillaumeGomez
Fix documentation not showing on localStorage error

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

The [documentation for setItem](https://developer.mozilla.org/en-US/docs/Web/API/Storage/setItem) specifies:

> developers should make sure to always catch possible exceptions from setItem()
2021-02-12 19:32:13 +09:00
Yuki Okushi
0b7fc80e45
Rollup merge of #81959 - therealprof:fix-typo, r=oli-obk
Fix assosiated typo

Introduced in d3c4dbd85d, noticed only
after the fact, sorry. 😅

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
2021-02-12 19:32:12 +09:00
Yuki Okushi
67403da1eb
Rollup merge of #81955 - dtolnay:dwp, r=Mark-Simulacrum
bootstrap: Locate llvm-dwp based on llvm-config bindir

Fixes #81949.

Tested by successfully building 1.50.0 pre-release, which is where I originally hit the issue (https://internals.rust-lang.org/t/rust-1-50-0-pre-release-testing/14012/4?u=dtolnay). Tested both with and without prebuilt LLVM. The check for dry_run is necessary in the non-prebuilt case because the llvm-config built by bootstrap won't exist yet.
2021-02-12 19:32:11 +09:00
Yuki Okushi
2a76add29f
Rollup merge of #81954 - joshtriplett:release-notes-group-platform-notes, r=XAMPPRocky
RELEASES.md 1.50: Group platform support notes together

Move the note about dropping cloudabi next to the other platform support
changes.
2021-02-12 19:32:09 +09:00
Yuki Okushi
c07260d534
Rollup merge of #81947 - camsteffen:to-ty, r=jyn514
Relax ItemCtxt::to_ty lifetime

Tiny simplification by relaxing a lifetime.
2021-02-12 19:32:08 +09:00
Yuki Okushi
327762f088
Rollup merge of #81831 - LeSeulArtichaut:81289-mut-arg, r=camelid
Don't display `mut` in arguments for functions documentation

Fixes #81289 by reverting #80799, as requested in https://github.com/rust-lang/rust/pull/81328#issuecomment-766364413.
Supersedes #81328.
r? ``@camelid`` cc ``@jyn514``
2021-02-12 19:32:07 +09:00
Yuki Okushi
0b6876cbe7
Rollup merge of #79983 - petar-dambovaliev:master, r=Dylan-DPC
fix indefinite article in cell.rs
2021-02-12 19:32:06 +09:00
bors
a118ee2c13 Auto merge of #81486 - ssomers:btree_separate_drop, r=Mark-Simulacrum
BTreeMap: disentangle Drop implementation from IntoIter

No longer require every `BTreeMap` to dig up its last leaf edge before dying. This speeds up the `clone_` benchmarks by 25% for normal keys and values (far less for huge values).

r? `@Mark-Simulacrum`
2021-02-12 06:34:21 +00:00
Ikko Ashimine
c8eeb340bc
Fix typo in mod.rs
insted -> instead
2021-02-12 13:47:21 +09:00
Mark Rousskov
a35550774b Tell user how to fix CI file being not up to date 2021-02-11 19:57:59 -05:00
Joshua Nelson
67fb96c537 Fix private intra-doc warnings on associated items
The issue was that the `kind, id` override was previously only being
considered for the disambiguator check, not the privacy check. This uses
the same ID for both.
2021-02-11 19:26:00 -05:00
Guillaume Gomez
583563d86d clean up clean::Static struct 2021-02-11 20:37:36 +01:00
Miguel Ojeda
0df8ddee53 Stack probes: fix error message
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-02-11 20:33:16 +01:00
bors
e9920ef774 Auto merge of #81760 - tmiasko:debug-borrow, r=pnkfelix
Borrow builder only once in debug derive
2021-02-11 16:46:08 +00:00
Benjamin Bouvier
f492b257e7 dist: include src/build_helper as part of the crate graph for rustc-dev.
Since it was missing, it wasn't possible to really use rustc-dev to
build, see for instance: https://github.com/rust-analyzer/rust-analyzer/issues/7589.
2021-02-11 17:45:54 +01:00
Jesus Rubio
a99d869e6c Improve long explanation for E0542 and E0546 2021-02-11 16:26:07 +01:00
bors
26e5bcd220 Auto merge of #81350 - tmiasko:instrument-debug, r=lcnr
Reduce log level used by tracing instrumentation from info to debug

Restore log level to debug to avoid make info log level overly verbose (the uses of instrument attribute modified there, were for the most part a replacement for `debug!`;  one use was novel).
2021-02-11 13:44:00 +00:00
Hirochika Matsumoto
e03f09730f Make suggestion of changing mutability of arguments broader 2021-02-11 17:03:03 +09:00
bors
2918062d1d Auto merge of #81129 - bugadani:lighter-move-errors, r=petrochenkov
Borrowck: don't calculate unused info when reporting move errors
2021-02-11 07:50:02 +00:00
bors
1efd804983 Auto merge of #81126 - oxalica:retain-early-drop, r=m-ou-se
Optimize Vec::retain

Use `copy_non_overlapping` instead of `swap` to reduce memory writes, like what we've done in #44355 and `String::retain`.
#48065 already tried to do this optimization but it is reverted in #67300 due to bad codegen of `DrainFilter::drop`.

This PR re-implement the drop-then-move approach. I did a [benchmark](https://gist.github.com/oxalica/3360eec9376f22533fcecff02798b698) on small-no-drop, small-need-drop, large-no-drop elements with different predicate functions. It turns out that the new implementation is >20% faster in average for almost all cases. Only 2/24 cases are slower by 3% and 5%. See the link above for more detail.

I think regression in may-panic cases is due to drop-guard preventing some optimization. If it's permitted to leak elements when predicate function of element's `drop` panic, the new implementation should be almost always faster than current one.
I'm not sure if we should leak on panic, since there is indeed an issue (#52267) complains about it before.
2021-02-11 04:40:57 +00:00
bors
9ce7268bcf Auto merge of #80860 - camelid:nodeid-docs, r=sanxiyn
Document `NodeId`
2021-02-11 00:51:45 +00:00
bors
178108bf81 Auto merge of #80762 - petrochenkov:visclean, r=varkor
resolve: Cleanup visibility resolution for enum variants and trait items

by always delegating it to `fn resolve_visibility`.

Also remove some special treatment of visibility on enum variants and trait items remaining from pre-`pub(restricted)` times.
2021-02-10 21:48:07 +00:00
Vadim Petrochenkov
8e74842089 resolve: Remove visibility hacks for enum variants and trait items
Special treatment like this was necessary before `pub(restricted)` had been implemented and only two visibilities existed - `pub` and non-`pub`.
Now it's no longer necessary and the desired behavior follows from `pub(restricted)`-style visibilities naturally assigned to enum variants and trait items.
2021-02-10 22:46:44 +03:00
Vadim Petrochenkov
b4b6b62e70 resolve: Cleanup visibility resolution in enums and traits 2021-02-10 22:46:44 +03:00
Pietro Albini
5034b504b4
bootstrap: fix wrong docs installation path 2021-02-10 18:46:40 +01:00
LeSeulArtichaut
089ee27dd0 Do not ICE on range patterns in function arguments 2021-02-10 16:41:48 +01:00
LeSeulArtichaut
793e88ad16 Add regression test for #81289 2021-02-10 16:41:09 +01:00
Ophir LOJKINE
16f0ccda86
Fix getCurrentValue 2021-02-10 14:55:53 +01:00
Ophir LOJKINE
f13bbea124
Catch errors on localStorage setting failure
Fixes https://github.com/rust-lang/rust/issues/81928

“Ask forgiveness not permission”  : this makes the code both simpler and more robust
2021-02-10 14:53:22 +01:00
bors
07194ffcd2 Auto merge of #79804 - tmiasko:improper-ctypes-no-niche, r=pnkfelix
Types with a hidden niche are not known to be non-null

Fixes #79787.
2021-02-10 12:56:09 +00:00
bors
218bf8d765 Auto merge of #81768 - calebcartwright:bump-rls-rustfmt, r=Xanewok
update RLS and rustfmt

Fixes #81582 and fixes #81583

r? `@Xanewok`

I was originally surprised by the size of lockfile diff, though after looking at the RLS changes it makes a bit more sense to me now
2021-02-10 10:00:01 +00:00
Daniel Egger
a6d413715c Fix assosiated typo
Introduced in d3c4dbd85d, noticed only
after the fact, sorry. 😅

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
2021-02-10 09:36:26 +01:00
Dániel Buga
3c1d792f49 Only initialize what is used 2021-02-10 09:20:41 +01:00
bors
6523b721c3 Auto merge of #81929 - pietroalbini:pgo-bootstrap, r=Mark-Simulacrum
Allow unstable features in some PGO benchmarks

Some of the benchmarks we're using for PGO require unstable features (such as compiling the standard library and some rustc-perf benchmarks), breaking CI on the beta and stable branches. For the past two releases we cherry-picked a commit directly onto the beta branch that unconditionally sets `RUSTC_BOOTSTRAP=1`, and this PR backports a similar change to the master branch.

The difference between this commit and the one we backported previously (483c1a83ca7cf53fd8f3432edb32cbe70ba39d45) is that this is more scoped in which benchmarks we allow unstable features, to prevent unintentionally enabling unstable features.

r? `@Mark-Simulacrum`
2021-02-10 07:10:43 +00:00
David Tolnay
d3fea13ae0
bootstrap: Locate llvm-dwp based on llvm-config bindir 2021-02-09 20:39:54 -08:00
Josh Triplett
883988b350 RELEASES.md 1.50: Group platform support notes together
Move the note about dropping cloudabi next to the other platform support
changes.
2021-02-09 19:45:32 -08:00
bors
f7534b566c Auto merge of #81952 - JohnTitor:rollup-i28kgfb, r=JohnTitor
Rollup of 11 pull requests

Successful merges:

 - #79849 (Clarify docs regarding sleep of zero duration)
 - #80438 (Add `Box::into_inner`.)
 - #81466 (Add suggest mut method for loop)
 - #81687 (Make Vec::split_at_spare_mut public)
 - #81904 (Bump stabilization version for const int methods)
 - #81909 ([compiler/rustc_typeck/src/check/expr.rs] Remove unnecessary refs in pattern matching)
 - #81910 (Use format string in bootstrap panic instead of a string directly)
 - #81913 (Rename HIR UnOp variants)
 - #81925 (Add long explanation for E0547)
 - #81926 (add suggestion to use the `async_recursion` crate)
 - #81951 (Update cargo)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-02-10 03:30:17 +00:00
Yuki Okushi
77114af9ca
Rollup merge of #81951 - ehuss:update-cargo, r=ehuss
Update cargo

5 commits in 34170fcd6e0947808a1ac63ac85ffc0da7dace2f..ab64d1393b5b77c66b6534ef5023a1b89ee7bf64
2021-02-04 15:52:52 +0000 to 2021-02-10 00:19:10 +0000
- Allow `true` and `false` as options for `strip` option (rust-lang/cargo#9153)
- Change git dependencies to use `HEAD` by default (rust-lang/cargo#9133)
- appendix auth gcm link to new repo (which is xplat) (rust-lang/cargo#9152)
- Fix warnings of the new non_fmt_panic lint (rust-lang/cargo#9148)
- Fix panic with doc collision orphan. (rust-lang/cargo#9142)
2021-02-10 12:24:32 +09:00
Yuki Okushi
2e8e591a16
Rollup merge of #81926 - henryboisdequin:fix-81907, r=estebank
add suggestion to use the `async_recursion` crate

Closes #81907

CC `@estebank`
2021-02-10 12:24:30 +09:00