Commit Graph

219378 Commits

Author SHA1 Message Date
Guillaume Gomez
5db516b809 Fix eslint errors 2023-03-08 12:49:34 -07:00
Michael Howell
f916681d8d Only load one CSS theme by default
To avoid generating a FOUC at startup, this commit uses `document.write` to
load the stylesheet initially.

Co-Authored-By: Guillaume Gomez <guillaume1.gomez@gmail.com>
2023-03-08 12:49:34 -07:00
Ayush Singh
d75dae2df2
Consider target_family as pal
Currently tidy does not consider code in target_family as
platform-specific. I think this is erroneous and should be fixed.

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-03-09 01:03:07 +05:30
Guillaume Gomez
7e932db368 Improve rustdoc-gui/tester.js code a bit 2023-03-08 20:07:56 +01:00
Weihang Lo
8ac95bbc5c
Update cargo
2 commits in 1334b059c6dcceab3c10c81413f79bb832c8d9d..7d3033d2e59383fd76193daf9423c3d141972a7d
2023-03-07 19:21:50 +0000 to 2023-03-08 17:05:08 +0000

- Revert "rust-lang/cargo#11738" - Use test name for dir when running tests (rust-lang/cargo#11812)
- Update CHANGELOG for 1.68 backports (rust-lang/cargo#11810)
2023-03-08 18:23:34 +00:00
León Orell Valerian Liehr
a74e651e36
clean-up: remove unused return value in typeck 2023-03-08 19:18:22 +01:00
Pietro Albini
aff9b72375 move clippy tests back to their intended directory 2023-03-08 14:17:16 +01:00
Pietro Albini
1d442af994
move clippy tests back to their intended directory 2023-03-08 14:17:16 +01:00
bors
7c306f6dcd Auto merge of #108121 - aliemjay:resolve-var-region, r=lcnr
always resolve to universal regions if possible

`RegionConstraintCollector::opportunistic_resolve_var`, which is used in canonicalization and projection logic, doesn't resolve the region var to an equal universal region. So if we have equated `'static == '1 == '2`, it doesn't resolve `'1` or `'2` to `'static`. Now it does!

Addresses review comment https://github.com/rust-lang/rust/pull/107376#discussion_r1093233687.

r? `@lcnr`
2023-03-08 12:33:21 +00:00
yifei
204ba3224e fix: evaluate with wrong obligation stack 2023-03-08 20:12:46 +08:00
Ali MJ Al-Nasrawy
0b232d022f prefer universal from lower universe
In case a variable is unified with two universal regions from different
universes, use the one with the lower universe as it has a higher chance
of being compatible with the variable.
2023-03-08 15:10:37 +03:00
Pietro Albini
ead8b96281
set LIBC_CHECK_CFG=1 when building Rust code in bootstrap 2023-03-08 12:14:19 +01:00
Ali MJ Al-Nasrawy
228f40820d address review comment 2023-03-08 14:07:01 +03:00
bors
56fbfe56c1 Auto merge of #10448 - samueltardieu:issue-10444, r=llogiq
Add new `redundant_async_block` lint

Fixes #10444

changelog: [`redundant_async_block`]: new lint to detect `async { future.await }`
2023-03-08 10:15:29 +00:00
bors
60445fda58 Auto merge of #108534 - Mark-Simulacrum:compression, r=pietroalbini
Import rust-installer & adjust compression settings

This brings in rust-lang/rust-installer#123, which enables a larger compression window (8 -> 64MB) amongst other changes to the xz compression settings. The net effect should be smaller compressed tarballs which will decrease bandwidth usage for
static.rust-lang.org, download times, and decompression time.

This comes at the cost of higher baseline requirements for running rustup to use these files, which we believe should be largely acceptable (running rustc is likely to use at least this much memory) but if we get specific reports we may explore options to decrease impact (e.g., using the gzip tarballs automatically in rustup).

To simplify iteration on compression settings this also imports the rust-lang/rust-installer submodule, it is now hosted fully inside rust-lang/rust. Once we land this I'll file a followup to add a note to that repo and we can subsequently archive it.

--

CI times for dist-x86_64-linux builds:

* threads=6, master - 2h 50m
* threads=1, new - 3h 40m
* threads=6, new - 2h 50m
2023-03-08 09:52:12 +00:00
Samuel Tardieu
d5429eab8a Add new redundant_async_block lint 2023-03-08 10:48:54 +01:00
bors
5eefbb39a9 Auto merge of #10466 - samueltardieu:popular-crates, r=llogiq
Add the `popular-crates` binary

This program downloads crates info from <https://crates.io/> and builds a TOML file that can be fed to `lintcheck`.

I have been asked, on various pull requests, what the result of `lintcheck` was. However, the default configuration file for lintcheck is limited. This `popular-crates` program allows building a recent list of the recently most downloaded crates from <https://crates.io> and feed it to `lintcheck`. Using it, it was easy to test two new lints against the 500 recently most downloaded crates to ensure that there was no regression.

changelog: none
2023-03-08 09:19:39 +00:00
bors
216aefbe30 Auto merge of #10362 - unexge:missing-assert-message-lint, r=llogiq
Add `missing_assert_message` lint

Fixes https://github.com/rust-lang/rust-clippy/issues/6207.

changelog: new lint: [`missing_assert_message`]: A new lint for checking assertions that doesn't have a custom panic message.
[#10362](https://github.com/rust-lang/rust-clippy/pull/10362)
<!-- changelog_checked -->

r? `@llogiq`
2023-03-08 09:07:15 +00:00
unexge
b554ff4cd8 Add Known problems section
Co-authored-by: Weihang Lo <me@weihanglo.tw>
2023-03-08 08:52:19 +00:00
unexge
87f58a1a4f Use late lint pass for missing_assert_message lint
Co-authored-by: Weihang Lo <me@weihanglo.tw>
2023-03-08 08:52:17 +00:00
unexge
682d52cf7c Update assertion macro parsing logic for Rust 1.52 changes
Co-authored-by: Weihang Lo <me@weihanglo.tw>
2023-03-08 08:51:52 +00:00
unexge
e7065efc76 Revert tests/ui/filter_map_next_fixable.rs
Co-authored-by: Weihang Lo <me@weihanglo.tw>
2023-03-08 08:51:52 +00:00
unexge
b4b2b1235a Revert "Dogfood missing_assert_message on Clippy"
This reverts commit ec653570ad50d11ecc3b5649dd28e29ed96199d3.
2023-03-08 08:51:50 +00:00
unexge
6fac73b987 Move lint to restriction category
Co-authored-by: Weihang Lo <me@weihanglo.tw>
2023-03-08 08:51:26 +00:00
unexge
4eb6ccc973 Update lint description and add help section
Co-authored-by: Weihang Lo <me@weihanglo.tw>
2023-03-08 08:51:26 +00:00
Burak
099d610640 Apply suggestions from code review
Co-authored-by: llogiq <bogusandre@gmail.com>
2023-03-08 08:51:26 +00:00
Burak Varlı
8f3ac65227 Dogfood missing_assert_message on Clippy
Co-authored-by: Weihang Lo <me@weihanglo.tw>
2023-03-08 08:51:24 +00:00
Burak Varlı
ea2547b8c6 Add missing_assert_message lint
Co-authored-by: Weihang Lo <me@weihanglo.tw>
2023-03-08 08:50:21 +00:00
Samuel "Sam" Tardieu
ce3415e87b Add the popular-crates binary
This program downloads crates info from https://crates.io/ and builds
a TOML file that can be fed to `lintcheck`.
2023-03-08 09:43:28 +01:00
Kazu Hirata
057d6ed147 Remove an extraneous include
SymbolWrapper.cpp doesn't use std::optional or llvm::Optional, so this
patch removes the extraneous include.  Note that llvm/ADT/Optional.h
has been deprecated upstream.  This patch ensures that
SymbolWrapper.cpp continues to compile even after the upcoming removal
of Optional.h.
2023-03-07 22:46:39 -08:00
bors
9b60e6c68f Auto merge of #108312 - michaelwoerister:hash-set-not-hash-stable, r=eholk
Do not implement HashStable for HashSet (MCP 533)

This PR removes all occurrences of `HashSet` in query results, replacing it either with `FxIndexSet` or with `UnordSet`, and then removes the `HashStable` implementation of `HashSet`. This is part of implementing [MCP 533](https://github.com/rust-lang/compiler-team/issues/533), that is, removing the `HashStable` implementations of all collection types with unstable iteration order.

The changes are mostly mechanical. The only place where additional sorting is happening is in Miri's override implementation of the `exported_symbols` query.
2023-03-08 06:07:11 +00:00
bors
5331d05334 Auto merge of #108312 - michaelwoerister:hash-set-not-hash-stable, r=eholk
Do not implement HashStable for HashSet (MCP 533)

This PR removes all occurrences of `HashSet` in query results, replacing it either with `FxIndexSet` or with `UnordSet`, and then removes the `HashStable` implementation of `HashSet`. This is part of implementing [MCP 533](https://github.com/rust-lang/compiler-team/issues/533), that is, removing the `HashStable` implementations of all collection types with unstable iteration order.

The changes are mostly mechanical. The only place where additional sorting is happening is in Miri's override implementation of the `exported_symbols` query.
2023-03-08 06:07:11 +00:00
Nicholas Nethercote
be60bcb28a Rename MapInPlace as FlatMapInPlace.
After removing the `map_in_place` method, which isn't much use because
modifying every element in a collection such as a `Vec` can be done
trivially with iteration.
2023-03-08 15:53:56 +11:00
Michael Goulet
64eea3c47a Tweak E0740 2023-03-08 01:58:15 +00:00
Michael Goulet
08e5a77b06 Don't report E0740 for type error 2023-03-08 01:55:32 +00:00
Michael Goulet
8a99ffc344 Suppress copy impl error when post-normalized type references errors 2023-03-08 00:12:33 +00:00
Michael Goulet
0f4255ece2 Dedup copy field errors for identical types 2023-03-08 00:00:19 +00:00
Michael Goulet
a439c0293c may not => cannot 2023-03-08 00:00:18 +00:00
Weihang Lo
e52e040fba
Update cargo
23 commits in 9880b408a3af50c08fab3dbf4aa2a972df71e951..c1334b059c6dcceab3c10c81413f79bb832c8d9d
2023-02-28 19:39:39 +0000 to 2023-03-07 19:21:50 +0000

- Add `CARGO_PKG_README` (rust-lang/cargo#11645)
- path dependency: fix cargo-util version (rust-lang/cargo#11807)
- Adding display of which target failed to compile (rust-lang/cargo#11636)
- Fix `CARGO_CFG_` vars for configs defined both with and without value (rust-lang/cargo#11790)
- Breaking endless loop on cyclic features in added dependency in cargo-add (rust-lang/cargo#11805)
- Enhance the doc of timing report with graphs (rust-lang/cargo#11798)
- Make `sparse` the default protocol for crates.io (rust-lang/cargo#11791)
- Use sha2 to calculate SHA256 (rust-lang/cargo#11795)
- gitoxide progress bar fixes (rust-lang/cargo#11800)
- Check publish_to_alt_registry publish content (rust-lang/cargo#11799)
- chore: fix missing files in autolabel trigger_files (rust-lang/cargo#11797)
- chore: Update base64 (rust-lang/cargo#11796)
- Fix some doc typos (rust-lang/cargo#11794)
- chore(ci): Enforce cargo-deny in CI (rust-lang/cargo#11761)
- Some cleanup for unstable docs (rust-lang/cargo#11793)
- gitoxide integration: fetch (rust-lang/cargo#11448)
- patch can conflict on not activated packages (rust-lang/cargo#11770)
- fix(toml): Provide a way to show unused manifest keys for dependencies (rust-lang/cargo#11630)
- Improve error for missing crate in --offline mode for sparse index (rust-lang/cargo#11783)
- feat(resolver): `-Zdirect-minimal-versions` (rust-lang/cargo#11688)
- feat: Use test name for dir when running tests (rust-lang/cargo#11738)
- Jobserver cleanup (rust-lang/cargo#11764)
- Fix help string for  "--charset" option of "cargo tree" (rust-lang/cargo#11785)

Note that some 3rd-party licensing allowed list changed due to the
introducion of `gix` dependency
2023-03-07 22:19:16 +00:00
bors
38b9655311 Auto merge of #108877 - matthiaskrgr:rollup-7gwgvgc, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #108460 (migrate `rustc_hir_analysis` to session diagnostic [Part Two])
 - #108581 (Add a new config flag, dist.include-mingw-linker.)
 - #108583 (Account for binders correctly when adding default RPITIT method assumption)
 - #108783 (Sync rustc_codegen_gcc 2023/03/04)
 - #108793 (Append to existing `PYTHONPATH` in compiletest instead of overwriting)
 - #108822 (Remove references to PassManagerBuilder)
 - #108866 (Force to use the stage 2 compiler  when config.download_rustc is set)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-03-07 22:07:56 +00:00
David Mládek
536905278f Include async functions in the len_without_is_empty
Co-authored-by: Akshay <nerdy@peppe.rs>
2023-03-07 22:04:11 +01:00
Celina G. Val
5eaeb71b9f Change item collection to be on demand 2023-03-07 12:47:25 -08:00
Guillaume Gomez
c0c93be7ce Addr regression test for #108679 2023-03-07 21:20:21 +01:00
Guillaume Gomez
4c2b135fc4 Fix invalid inlining of reexport of reexport of private item 2023-03-07 21:20:21 +01:00
Giacomo Pasini
153bfa06e5
remove leftover comment 2023-03-07 20:01:22 +01:00
Matthias Krüger
b0ec35362f
Rollup merge of #108866 - Kohei316:master, r=ozkanonur
Force to use the stage 2 compiler  when config.download_rustc is set

Fixes #108768
2023-03-07 19:57:46 +01:00
Matthias Krüger
85c475a839
Rollup merge of #108822 - nikic:legacy-pm-removal-2, r=cuviper
Remove references to PassManagerBuilder

This is a legacy PM concept that we no longer use.
2023-03-07 19:57:46 +01:00
Matthias Krüger
c4453ccb82
Rollup merge of #108793 - clubby789:pythonpath-compiletest, r=compiler-errors
Append to existing `PYTHONPATH` in compiletest instead of overwriting

Fixes #108779
2023-03-07 19:57:45 +01:00
Matthias Krüger
c21a640c5a
Rollup merge of #108783 - antoyo:sync-cg_gcc-2023-03-04, r=cjgillot
Sync rustc_codegen_gcc 2023/03/04

Hi.
This sync all the changes from rustc_codegen_gcc.
Thanks for the review.
2023-03-07 19:57:45 +01:00
Matthias Krüger
63635880f6
Rollup merge of #108583 - compiler-errors:rpitit-default-method-with-nested-rpitits, r=spastorino
Account for binders correctly when adding default RPITIT method assumption

As of #108203, we install extra projection predicates into the param-env of a default trait method when it has return-position `impl Trait` (or is async).

The implementation didn't account for the fact that it's walking into and out of binders, so we just need to shift all the debruijn indices accordingly when constructing the projection predicates.

Fixes #108579

r? types
2023-03-07 19:57:44 +01:00