Commit Graph

164823 Commits

Author SHA1 Message Date
bors
6b9b2bd315 Auto merge of #94921 - aDotInTheVoid:rustdoc-json-format-cleanup, r=CraftSpider
rustdoc-json: Clean Up json format

No semantic changes, but better names

Closes https://github.com/rust-lang/rust/issues/94198

Closes https://github.com/rust-lang/rust/issues/94889

r? `@CraftSpider`

`@rustbot` modify labels: +A-rustdoc-json +T-rustdoc +C-cleanup
2022-03-14 05:10:49 +00:00
bors
3f58828fdc Auto merge of #94773 - cjgillot:lifetime-fresh-did, r=oli-obk
Identify anonymous lifetimes by their DefId in HIR.

`ParamName::Fresh` currently identifies anonymous lifetimes by an `usize` index computed from the number of lifetimes in scope. This makes the behaviour of lowering dependent on the contents of the surrounding item in unpredictable ways.

This PR replaces this index by the `LocalDefId` of the synthetized generic lifetime parameter. This makes obvious which parameter the lifetime corresponds to.
2022-03-14 02:49:21 +00:00
Nixon Enraght-Moony
a5c0b1470c rustdoc-json-types: implementors -> implementations
Closes #94198
2022-03-14 00:05:11 +00:00
Nixon Enraght-Moony
b526d8f27c rustdoc-json-types: ty -> type_
Fixes #94889
2022-03-13 23:13:57 +00:00
bors
737ef08ea0 Auto merge of #94832 - jonhoo:default-static, r=Mark-Simulacrum
bootstrap: untangle static-libstdcpp & llvm-tools

Previously, the static-libstdcpp setting was tied to llvm-tools such
that enabling the latter always enabled the latter. This seems
unfortunate, since it is entirely reasonable for someone to want to
_not_ statically link stdc++, but _also_ want to build the llvm-tools.
This patch therefore separates the two settings such that neither
implies the other.

On its own, that would change the default behavior in a way that's
likely to surprise users. Specifically, users who build llvm-tools
_likely_ want those tools to be statically compiled against libstdc++,
since otherwise users with older GLIBCXX will be unable to run the
vended tools. So, we also flip the default for the `static-libstdcpp`
setting such that builds always link statically against libstdc++ by
default, but it's _possible_ to opt out.

See also #94719.
2022-03-13 23:06:14 +00:00
Camille GILLOT
c8c691ff88 Update comments. 2022-03-13 23:13:58 +01:00
bors
e95b10ba4a Auto merge of #94916 - matthiaskrgr:rollup-s6zedfl, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #93292 (Implement `BITS` constant for non-zero integers)
 - #94777 (Update armv7-unknown-linux-uclibceabi platform support page.)
 - #94816 (Add `Atomic*::get_mut_slice`)
 - #94844 (Reduce rustbuild bloat caused by serde_derive)
 - #94907 (Omit stdarch test crates from the rust-src component)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-03-13 20:59:29 +00:00
Matthias Krüger
c7030d3eb3
Rollup merge of #94907 - bjorn3:smaller_rust_src_component, r=Mark-Simulacrum
Omit stdarch test crates from the rust-src component

These crates aren't necessary for building the standard library. This saves 30MB of disk space.

Fixes #94906
2022-03-13 20:02:02 +01:00
Matthias Krüger
d14ba95806
Rollup merge of #94844 - bjorn3:rustbuild_cleanup, r=Mark-Simulacrum
Reduce rustbuild bloat caused by serde_derive

This reduces the size of the `.text` section from 10.1MiB (6.2MiB for just rustbuild code) to 9.3MiB (5.3MiB for just rustbuild code).

This also reduces compile time from ~6.1s for incr recompilation to ~5.6s.

r? `@Mark-Simulacrum`
2022-03-13 20:02:01 +01:00
Matthias Krüger
8dad2d172c
Rollup merge of #94816 - WaffleLapkin:atomic_get_mut_slice, r=Mark-Simulacrum
Add `Atomic*::get_mut_slice`

This PR adds the inverse of `Atomic*::from_mut_slice` introduced in #94384 with the following API:
```rust
// core::sync::atomic

impl Atomic* {
    fn get_mut_slice(this: &mut [Self]) -> &mut [*];
}
```

cc `@cuviper`

-----

For now I've used the same tracking issue as `Atomic*::from_mut_slice`, should I open a new one?
2022-03-13 20:02:00 +01:00
Matthias Krüger
3c943d0eaa
Rollup merge of #94777 - lancethepants:armv7-unknown-linux-uclibceabi, r=Mark-Simulacrum
Update armv7-unknown-linux-uclibceabi platform support page.

A few edits and fixes to the support page for the armv7-unknown-linux-uclibceabi target.
2022-03-13 20:01:59 +01:00
Matthias Krüger
2f9bc56e5a
Rollup merge of #93292 - nvzqz:nonzero-bits, r=dtolnay
Implement `BITS` constant for non-zero integers

This adds the associated [`BITS`](https://doc.rust-lang.org/stable/std/primitive.usize.html#associatedconstant.BITS) constant to `NonZero{U,I}{8,16,32,64,128,size}`.

This is useful when a type alias refers to either a regular or non-zero integer.
2022-03-13 20:01:58 +01:00
bjorn3
90f8aefe71 Mark cold blocks 2022-03-13 19:36:40 +01:00
bors
21b0325c68 Auto merge of #94738 - Urgau:rustbuild-check-cfg-values, r=Mark-Simulacrum
Enable conditional checking of values in the Rust codebase

This pull-request enable conditional checking of (well known) values in the Rust codebase.

Well known values were added in https://github.com/rust-lang/rust/pull/94362. All the `target_*` values are taken from all the built-in targets which is why some extra values were needed do be added as they are not (yet ?) defined in any built-in targets.

r? `@Mark-Simulacrum`
2022-03-13 18:34:00 +00:00
bjorn3
a303273d00 Fix definition of Box in ssa-analysis-regression-50041.rs
The Box in liballoc always has a field for the allocator. It is quite
hard to support both the old and new definition of Box in cg_clif so
this change uses the new definition in this test too.
2022-03-13 19:29:03 +01:00
bjorn3
7eb454124f Update list of ignores rustc tests 2022-03-13 19:24:57 +01:00
bjorn3
a48fea6dda Add and remove some fixmes 2022-03-13 17:58:02 +01:00
bjorn3
fef517eae7 Remove almost all remaining feature gates
Only rustc_private is still enabled as cg_clif by definition needs to
use internal rustc api's.
2022-03-13 17:55:55 +01:00
bjorn3
cd5e75a691 Omit stdarch test crates from the rust-src component
These crates aren't necessary for building the standard library. This
saves 30MB of disk space.

Fixes #94906
2022-03-13 17:38:59 +01:00
bjorn3
a0163f7487 Remove FieldName enum 2022-03-13 17:35:02 +01:00
bors
e2e492c10e Auto merge of #8422 - buttercrab:only_used_in_recursion, r=llogiq
new lint: `only_used_in_recursion`

changed:
- added `only_used_in_recursion`.
- fixed code that variables are only used in recursion.
- this would not lint when `unused_variable`

This fixes: #8390

-----

changelog: add lint [`only_used_in_recursion`]
2022-03-13 16:11:25 +00:00
bors
ebed06fcba Auto merge of #94704 - Kobzol:llvm-pgo-update-suite, r=Mark-Simulacrum
Gather LLVM PGO profiles from `rustc-perf` suite on real-world crates

This PR expands the benchmark suite used to gather LLVM PGO profiles in CI from `libcore` to several real-world crates. I hand-picked a few crates, but the list is up for debate.

Previous results that we got from running `syn,cargo,serde` looked pretty [good](https://perf.rust-lang.org/compare.html?start=2631aeef823a9e16d31f999d3f07001e5fcc4b3d&end=abf097afa10dde1aa3d8a1d422724a46aab79bf3).

Running `libcore` + `rustc-perf` with some number of crates is repeated now (and for BOLT it will also be needed), so maybe we can extract it to a bash function?

r? `@Mark-Simulacrum`
2022-03-13 15:53:14 +00:00
Jaeyong Sung
800f66de2b
add clearing return vars 2022-03-14 00:13:57 +09:00
bors
75b616e92f Auto merge of #8471 - J-ZhengLi:master-issue7040, r=llogiq
new lint that detects useless match expression

fixes #7040

changelog: Add new  lint [`needless_match`] under complexity lint group
2022-03-13 14:49:56 +00:00
bjorn3
cfc1a2cd68 Remove decl_macro usage
This reduces the amount of unstable features used by cg_clif
2022-03-13 15:19:48 +01:00
bjorn3
e937265673 Rustup to rustc 1.61.0-nightly (f103b2969 2022-03-12) 2022-03-13 15:04:33 +01:00
bjorn3
6e42ca187f Sync from rust 4800c7816e 2022-03-13 14:39:10 +01:00
bjorn3
dca8ff5b25 Prevent duplicate monomorphization of deserialization impls
This reduces binary size from 9.7MiB (5.8MiB for just rustbuild code)
to 9.3MiB (5.3MiB for just rustbuild code).

This doesn't reduce compile time in a statistically significant way.
2022-03-13 14:34:49 +01:00
bjorn3
a0b4d2136d Use trimmed down deserialization impl for config
This reduces binary size from 10.1MiB (6.2MiB for just rustbuild code)
to 9.7MiB (5.8MiB for just rustbuild code).

This also reduces compile time from ~6.1s for incr recompilation to ~5.6s.

There is still a lot of
unnecessary code due to the toml crate monomorphizing every
deserialization impl 5 times.
2022-03-13 14:31:12 +01:00
bjorn3
88609e5126 Rename derive_merge macro to define_config and move Deserialize impl into it 2022-03-13 14:31:12 +01:00
bors
b2763cc4cf Auto merge of #94899 - workingjubilee:bump-simd-clamp, r=workingjubilee
Bump portable-simd to shadow Ord

Yon usual bump.
Summary for reference:
- We are moving away from the subjective "directional" nomenclature, so `horizontal_*` becomes `reduce_*`, et cetera.
- In addition, `Simd<Int, N>` now has methods which shadow Ord's methods directly, making those methods behave like the already "overloaded" float methods do.
2022-03-13 13:30:18 +00:00
bors
4800c7816e Auto merge of #94897 - camelid:query-doc-hidden, r=cjgillot
Queryify `is_doc_hidden`

It came up hot on some profiling of rustdoc I did, so hopefully turning
it into a query will help.
2022-03-13 11:12:01 +00:00
bors
7eac19c30c Auto merge of #94320 - GuillaumeGomez:sidebar-display, r=jsha
Fix sidebar elements display

The bug can be seen more easily when the javascript is disabled:

![Screenshot from 2022-02-24 12-18-28](https://user-images.githubusercontent.com/3050060/155514578-cbefd3dd-f006-47e9-bc76-7c26d7e823e8.png)

r? `@jsha`
2022-03-13 07:56:08 +00:00
bors
617e8c7bf9 Auto merge of #94862 - pierwill:bootstrap-useless, r=Dylan-DPC
Remove unneeded conversions in bootstrapping code

Fixes warnings from `clippy::useless_conversion` in `src/bootstrap`.
2022-03-13 05:37:56 +00:00
bors
791447cfec Auto merge of #94898 - RalfJung:miri, r=RalfJung
update Miri

Fixes https://github.com/rust-lang/rust/issues/94871
2022-03-13 02:27:30 +00:00
Jubilee Young
2b1f249ecf Use reduce_sum in as_simd example 2022-03-12 16:43:38 -08:00
Ralf Jung
ea0b3ab673 update Miri 2022-03-12 19:30:26 -05:00
Jubilee Young
aabaf8430c Sync portable-simd to rust-lang/portable-simd@72df4c4505 2022-03-12 16:09:37 -08:00
bors
aea21fee1c Auto merge of #94895 - matthiaskrgr:rollup-9hue5qk, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #94867 (Add regression test for `<i32 as Iterator>::count`)
 - #94886 (Update browser-ui-test version used in CI)
 - #94894 (Remove needless use of `Into`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-03-13 00:01:32 +00:00
Jubilee
72df4c4505
portable-simd#261: Rename horizontal_* to reduce_* 2022-03-12 15:34:58 -08:00
Ralf Jung
49043f4434
rust-lang/portable-simd#262: also implement clamp for integer vectors
* add test from issue rust-lang/portable-simd#253
2022-03-12 15:32:28 -08:00
Noah Lev
f39d0fc100 Queryify is_doc_hidden
It came up hot on some profiling of rustdoc I did, so hopefully turning
it into a query will help.
2022-03-12 14:27:51 -08:00
Matthias Krüger
7d456f7bad
Rollup merge of #94894 - camelid:into, r=nagisa
Remove needless use of `Into`
2022-03-12 22:56:02 +01:00
Matthias Krüger
c738243bd3
Rollup merge of #94886 - GuillaumeGomez:update-browser-ui-test, r=notriddle
Update browser-ui-test version used in CI

I realized that the extension of `assert-text*` commands was generated not completely valid (it stopped at first "success" and moved instead of running all checks). It was fixed in [this PR](https://github.com/GuillaumeGomez/browser-UI-test/pull/280).

We don't use this feature currently in the rustdoc GUI tests, but just in case...

r? ``@notriddle``
2022-03-12 22:56:02 +01:00
Matthias Krüger
6cfb44486c
Rollup merge of #94867 - notriddle:notriddle/i32-count-regression-test, r=Dylan-DPC
Add regression test for `<i32 as Iterator>::count`

Closes #84495
2022-03-12 22:56:01 +01:00
bors
bbbd48fa6d Auto merge of #90358 - DevinR528:omitted-field-fix, r=jackh726
Fix exposing fields marked unstable or doc hidden

Closes https://github.com/rust-lang/rust/issues/89837

Work towards https://github.com/rust-lang/rust/issues/89554

Filter fields that are marked `doc(hidden)` or are unstable with that feature turned off. This brings structs and enums into alignment behavior-wise when emitting warning/errors about pattern exhaustiveness/reachability.

cc `@Nadrieril`
2022-03-12 21:34:30 +00:00
Noah Lev
cc5cf86bfb Remove needless use of Into 2022-03-12 13:00:12 -08:00
Devin Ragotzy
492d8d7293 Fix rebase conflicts with stderr files 2022-03-12 15:38:44 -05:00
Devin Ragotzy
c0e76d6999 Format reordered imports in tyck/pat 2022-03-12 15:16:11 -05:00
Devin Ragotzy
7ffb29d03c Only filter doc(hidden) fields/variants when not crate local 2022-03-12 15:16:11 -05:00