Skip to content

Commit 984d29d

Browse files
committed
Auto merge of #2944 - oli-obk:rustup, r=oli-obk
Rustup
2 parents 662388e + de9dc59 commit 984d29d

File tree

491 files changed

+4496
-2744
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

491 files changed

+4496
-2744
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ contact_links:
66
- name: Feature Request
77
url: https://internals.rust-lang.org/
88
about: Please discuss language feature requests on the internals forum.
9+
- name: Clippy Bug
10+
url: https://github.com/rust-lang/rust-clippy/issues/new/choose
11+
about: Please report Clippy bugs such as false positives in the Clippy repo.

.github/workflows/ci.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ permissions:
3030
defaults:
3131
run:
3232
shell: bash
33+
concurrency:
34+
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
35+
cancel-in-progress: true
3336
jobs:
3437
pr:
35-
permissions:
36-
actions: write
3738
name: "PR - ${{ matrix.name }}"
3839
env:
3940
CI_JOB_NAME: "${{ matrix.name }}"
@@ -84,11 +85,6 @@ jobs:
8485
- name: ensure the channel matches the target branch
8586
run: src/ci/scripts/verify-channel.sh
8687
if: success() && !env.SKIP_JOB
87-
- name: configure GitHub Actions to kill the build when outdated
88-
uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
89-
with:
90-
github_token: "${{ secrets.github_token }}"
91-
if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try' && github.ref != 'refs/heads/try-perf'"
9288
- name: collect CPU statistics
9389
run: src/ci/scripts/collect-cpu-stats.sh
9490
if: success() && !env.SKIP_JOB
@@ -162,8 +158,6 @@ jobs:
162158
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
163159
if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
164160
auto:
165-
permissions:
166-
actions: write
167161
name: "auto - ${{ matrix.name }}"
168162
env:
169163
CI_JOB_NAME: "${{ matrix.name }}"
@@ -496,11 +490,6 @@ jobs:
496490
- name: ensure the channel matches the target branch
497491
run: src/ci/scripts/verify-channel.sh
498492
if: success() && !env.SKIP_JOB
499-
- name: configure GitHub Actions to kill the build when outdated
500-
uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
501-
with:
502-
github_token: "${{ secrets.github_token }}"
503-
if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try' && github.ref != 'refs/heads/try-perf'"
504493
- name: collect CPU statistics
505494
run: src/ci/scripts/collect-cpu-stats.sh
506495
if: success() && !env.SKIP_JOB
@@ -574,8 +563,6 @@ jobs:
574563
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
575564
if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
576565
try:
577-
permissions:
578-
actions: write
579566
name: "try - ${{ matrix.name }}"
580567
env:
581568
DIST_TRY_BUILD: 1
@@ -623,11 +610,6 @@ jobs:
623610
- name: ensure the channel matches the target branch
624611
run: src/ci/scripts/verify-channel.sh
625612
if: success() && !env.SKIP_JOB
626-
- name: configure GitHub Actions to kill the build when outdated
627-
uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
628-
with:
629-
github_token: "${{ secrets.github_token }}"
630-
if: "success() && !env.SKIP_JOB && github.ref != 'refs/heads/try' && github.ref != 'refs/heads/try-perf'"
631613
- name: collect CPU statistics
632614
run: src/ci/scripts/collect-cpu-stats.sh
633615
if: success() && !env.SKIP_JOB

.github/workflows/dependencies.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ env:
2525

2626
jobs:
2727
not-waiting-on-bors:
28+
if: github.repository_owner == 'rust-lang'
2829
name: skip if S-waiting-on-bors
2930
runs-on: ubuntu-latest
3031
steps:
@@ -43,6 +44,7 @@ jobs:
4344
fi
4445
4546
update:
47+
if: github.repository_owner == 'rust-lang'
4648
name: update dependencies
4749
needs: not-waiting-on-bors
4850
runs-on: ubuntu-latest
@@ -76,6 +78,7 @@ jobs:
7678
retention-days: 1
7779

7880
pr:
81+
if: github.repository_owner == 'rust-lang'
7982
name: amend PR
8083
needs: update
8184
runs-on: ubuntu-latest

Cargo.lock

Lines changed: 10 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -480,31 +480,14 @@ dependencies = [
480480
"winapi",
481481
]
482482

483-
[[package]]
484-
name = "clap"
485-
version = "3.2.20"
486-
source = "registry+https://github.com/rust-lang/crates.io-index"
487-
checksum = "23b71c3ce99b7611011217b366d923f1d0a7e07a92bb2dbf1e84508c673ca3bd"
488-
dependencies = [
489-
"atty",
490-
"bitflags",
491-
"clap_derive 3.2.18",
492-
"clap_lex 0.2.2",
493-
"indexmap",
494-
"once_cell",
495-
"strsim",
496-
"termcolor",
497-
"textwrap",
498-
]
499-
500483
[[package]]
501484
name = "clap"
502485
version = "4.2.1"
503486
source = "registry+https://github.com/rust-lang/crates.io-index"
504487
checksum = "046ae530c528f252094e4a77886ee1374437744b2bff1497aa898bbddbbb29b3"
505488
dependencies = [
506489
"clap_builder",
507-
"clap_derive 4.2.0",
490+
"clap_derive",
508491
"once_cell",
509492
]
510493

@@ -517,7 +500,7 @@ dependencies = [
517500
"anstream",
518501
"anstyle",
519502
"bitflags",
520-
"clap_lex 0.4.1",
503+
"clap_lex",
521504
"once_cell",
522505
"strsim",
523506
"terminal_size",
@@ -529,20 +512,7 @@ version = "4.0.7"
529512
source = "registry+https://github.com/rust-lang/crates.io-index"
530513
checksum = "10861370d2ba66b0f5989f83ebf35db6421713fd92351790e7fdd6c36774c56b"
531514
dependencies = [
532-
"clap 4.2.1",
533-
]
534-
535-
[[package]]
536-
name = "clap_derive"
537-
version = "3.2.18"
538-
source = "registry+https://github.com/rust-lang/crates.io-index"
539-
checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65"
540-
dependencies = [
541-
"heck",
542-
"proc-macro-error",
543-
"proc-macro2",
544-
"quote",
545-
"syn 1.0.102",
515+
"clap",
546516
]
547517

548518
[[package]]
@@ -557,15 +527,6 @@ dependencies = [
557527
"syn 2.0.8",
558528
]
559529

560-
[[package]]
561-
name = "clap_lex"
562-
version = "0.2.2"
563-
source = "registry+https://github.com/rust-lang/crates.io-index"
564-
checksum = "5538cd660450ebeb4234cfecf8f2284b844ffc4c50531e66d584ad5b91293613"
565-
dependencies = [
566-
"os_str_bytes",
567-
]
568-
569530
[[package]]
570531
name = "clap_lex"
571532
version = "0.4.1"
@@ -576,7 +537,7 @@ checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1"
576537
name = "clippy"
577538
version = "0.1.72"
578539
dependencies = [
579-
"clap 4.2.1",
540+
"clap",
580541
"clippy_lints",
581542
"clippy_utils",
582543
"compiletest_rs",
@@ -605,7 +566,7 @@ name = "clippy_dev"
605566
version = "0.0.1"
606567
dependencies = [
607568
"aho-corasick",
608-
"clap 4.2.1",
569+
"clap",
609570
"indoc",
610571
"itertools",
611572
"opener",
@@ -1749,7 +1710,7 @@ name = "installer"
17491710
version = "0.0.0"
17501711
dependencies = [
17511712
"anyhow",
1752-
"clap 3.2.20",
1713+
"clap",
17531714
"flate2",
17541715
"num_cpus",
17551716
"rayon",
@@ -1869,7 +1830,7 @@ name = "jsondoclint"
18691830
version = "0.1.0"
18701831
dependencies = [
18711832
"anyhow",
1872-
"clap 4.2.1",
1833+
"clap",
18731834
"fs-err",
18741835
"rustc-hash",
18751836
"rustdoc-json-types",
@@ -2086,7 +2047,7 @@ dependencies = [
20862047
"ammonia",
20872048
"anyhow",
20882049
"chrono",
2089-
"clap 4.2.1",
2050+
"clap",
20902051
"clap_complete",
20912052
"elasticlunr-rs",
20922053
"env_logger 0.10.0",
@@ -2370,12 +2331,6 @@ dependencies = [
23702331
"vcpkg",
23712332
]
23722333

2373-
[[package]]
2374-
name = "os_str_bytes"
2375-
version = "6.0.0"
2376-
source = "registry+https://github.com/rust-lang/crates.io-index"
2377-
checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64"
2378-
23792334
[[package]]
23802335
name = "owo-colors"
23812336
version = "3.5.0"
@@ -2617,30 +2572,6 @@ version = "0.1.1"
26172572
source = "registry+https://github.com/rust-lang/crates.io-index"
26182573
checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
26192574

2620-
[[package]]
2621-
name = "proc-macro-error"
2622-
version = "1.0.4"
2623-
source = "registry+https://github.com/rust-lang/crates.io-index"
2624-
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
2625-
dependencies = [
2626-
"proc-macro-error-attr",
2627-
"proc-macro2",
2628-
"quote",
2629-
"syn 1.0.102",
2630-
"version_check",
2631-
]
2632-
2633-
[[package]]
2634-
name = "proc-macro-error-attr"
2635-
version = "1.0.4"
2636-
source = "registry+https://github.com/rust-lang/crates.io-index"
2637-
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
2638-
dependencies = [
2639-
"proc-macro2",
2640-
"quote",
2641-
"version_check",
2642-
]
2643-
26442575
[[package]]
26452576
name = "proc-macro-hack"
26462577
version = "0.5.19"
@@ -2897,7 +2828,7 @@ dependencies = [
28972828
name = "rustbook"
28982829
version = "0.1.0"
28992830
dependencies = [
2900-
"clap 4.2.1",
2831+
"clap",
29012832
"env_logger 0.10.0",
29022833
"mdbook",
29032834
]
@@ -4346,7 +4277,7 @@ dependencies = [
43464277
"anyhow",
43474278
"bytecount",
43484279
"cargo_metadata",
4349-
"clap 4.2.1",
4280+
"clap",
43504281
"diff",
43514282
"dirs",
43524283
"env_logger 0.10.0",
@@ -4874,12 +4805,6 @@ dependencies = [
48744805
"term",
48754806
]
48764807

4877-
[[package]]
4878-
name = "textwrap"
4879-
version = "0.15.0"
4880-
source = "registry+https://github.com/rust-lang/crates.io-index"
4881-
checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb"
4882-
48834808
[[package]]
48844809
name = "thin-vec"
48854810
version = "0.2.12"

README.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,13 @@ format:
3333
```
3434

3535
This is how the documentation and examples assume you are running `x.py`.
36-
Some alternative ways are:
37-
38-
```sh
39-
# On a Unix shell if you don't have the necessary `python3` command
40-
./x <subcommand> [flags]
41-
42-
# On the Windows Command Prompt (if .py files are configured to run Python)
43-
x.py <subcommand> [flags]
44-
45-
# You can also run Python yourself, e.g.:
46-
python x.py <subcommand> [flags]
47-
```
36+
See the [rustc dev guide][rustcguidebuild] if this does not work on your platform.
4837

4938
More information about `x.py` can be found by running it with the `--help` flag
5039
or reading the [rustc dev guide][rustcguidebuild].
5140

5241
[gettingstarted]: https://rustc-dev-guide.rust-lang.org/getting-started.html
53-
[rustcguidebuild]: https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html
42+
[rustcguidebuild]: https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#what-is-xpy
5443

5544
### Dependencies
5645

compiler/rustc_ast_lowering/src/expr.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
277277
ExprKind::Yeet(sub_expr) => self.lower_expr_yeet(e.span, sub_expr.as_deref()),
278278
ExprKind::Become(sub_expr) => {
279279
let sub_expr = self.lower_expr(sub_expr);
280-
281-
// FIXME(explicit_tail_calls): Use `hir::ExprKind::Become` once we implemented it
282-
hir::ExprKind::Ret(Some(sub_expr))
280+
hir::ExprKind::Become(sub_expr)
283281
}
284282
ExprKind::InlineAsm(asm) => {
285283
hir::ExprKind::InlineAsm(self.lower_inline_asm(e.span, asm))

compiler/rustc_ast_passes/src/ast_validation.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -623,13 +623,12 @@ impl<'a> AstValidator<'a> {
623623
fn maybe_lint_missing_abi(&mut self, span: Span, id: NodeId) {
624624
// FIXME(davidtwco): This is a hack to detect macros which produce spans of the
625625
// call site which do not have a macro backtrace. See #61963.
626-
let is_macro_callsite = self
626+
if self
627627
.session
628628
.source_map()
629629
.span_to_snippet(span)
630-
.map(|snippet| snippet.starts_with("#["))
631-
.unwrap_or(true);
632-
if !is_macro_callsite {
630+
.is_ok_and(|snippet| !snippet.starts_with("#["))
631+
{
633632
self.lint_buffer.buffer_lint_with_diagnostic(
634633
MISSING_ABI,
635634
id,

compiler/rustc_ast_passes/src/errors.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,6 @@ pub struct ForbiddenLifetimeBound {
7777
pub spans: Vec<Span>,
7878
}
7979

80-
#[derive(Diagnostic)]
81-
#[diag(ast_passes_forbidden_non_lifetime_param)]
82-
pub struct ForbiddenNonLifetimeParam {
83-
#[primary_span]
84-
pub spans: Vec<Span>,
85-
}
86-
8780
#[derive(Diagnostic)]
8881
#[diag(ast_passes_fn_param_too_many)]
8982
pub struct FnParamTooMany {

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,8 +678,8 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
678678
let tcx = self.infcx.tcx;
679679

680680
// Find out if the predicates show that the type is a Fn or FnMut
681-
let find_fn_kind_from_did = |(pred, _): (ty::Predicate<'tcx>, _)| {
682-
if let ty::PredicateKind::Clause(ty::ClauseKind::Trait(pred)) = pred.kind().skip_binder()
681+
let find_fn_kind_from_did = |(pred, _): (ty::Clause<'tcx>, _)| {
682+
if let ty::ClauseKind::Trait(pred) = pred.kind().skip_binder()
683683
&& pred.self_ty() == ty
684684
{
685685
if Some(pred.def_id()) == tcx.lang_items().fn_trait() {
@@ -705,7 +705,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
705705
ty::Alias(ty::Opaque, ty::AliasTy { def_id, substs, .. }) => tcx
706706
.explicit_item_bounds(def_id)
707707
.subst_iter_copied(tcx, substs)
708-
.find_map(|(clause, span)| find_fn_kind_from_did((clause.as_predicate(), span))),
708+
.find_map(|(clause, span)| find_fn_kind_from_did((clause, span))),
709709
ty::Closure(_, substs) => match substs.as_closure().kind() {
710710
ty::ClosureKind::Fn => Some(hir::Mutability::Not),
711711
ty::ClosureKind::FnMut => Some(hir::Mutability::Mut),

0 commit comments

Comments
 (0)