Skip to content

Commit 1b2e4a9

Browse files
committed
Auto merge of #3154 - rust-lang:rustup-2023-11-04, r=RalfJung
Automatic Rustup
2 parents 1a08886 + 5b18703 commit 1b2e4a9

File tree

770 files changed

+7326
-6533
lines changed

Some content is hidden

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

770 files changed

+7326
-6533
lines changed

.github/workflows/ci.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ jobs:
5757
os: ubuntu-20.04-4core-16gb
5858
env: {}
5959
- name: x86_64-gnu-llvm-15
60+
env:
61+
ENABLE_GCC_CODEGEN: "1"
6062
os: ubuntu-20.04-16core-64gb
61-
env: {}
6263
- name: x86_64-gnu-tools
6364
os: ubuntu-20.04-16core-64gb
6465
env: {}

Cargo.lock

+15-21
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,7 @@ name = "clippy"
556556
version = "0.1.75"
557557
dependencies = [
558558
"anstream",
559+
"clippy_config",
559560
"clippy_lints",
560561
"clippy_utils",
561562
"color-print",
@@ -578,6 +579,16 @@ dependencies = [
578579
"walkdir",
579580
]
580581

582+
[[package]]
583+
name = "clippy_config"
584+
version = "0.1.75"
585+
dependencies = [
586+
"rustc-semver",
587+
"serde",
588+
"toml 0.7.5",
589+
"walkdir",
590+
]
591+
581592
[[package]]
582593
name = "clippy_dev"
583594
version = "0.0.1"
@@ -597,6 +608,7 @@ version = "0.1.75"
597608
dependencies = [
598609
"arrayvec",
599610
"cargo_metadata 0.15.4",
611+
"clippy_config",
600612
"clippy_utils",
601613
"declare_clippy_lint",
602614
"if_chain",
@@ -621,10 +633,10 @@ name = "clippy_utils"
621633
version = "0.1.75"
622634
dependencies = [
623635
"arrayvec",
636+
"clippy_config",
624637
"if_chain",
625638
"itertools",
626639
"rustc-semver",
627-
"serde",
628640
]
629641

630642
[[package]]
@@ -2465,9 +2477,9 @@ dependencies = [
24652477

24662478
[[package]]
24672479
name = "minifier"
2468-
version = "0.2.3"
2480+
version = "0.3.0"
24692481
source = "registry+https://github.com/rust-lang/crates.io-index"
2470-
checksum = "5394aa376422b4b2b6c02fd9cfcb657e4ec544ae98e43d7d5d785fd0d042fd6d"
2482+
checksum = "95bbbf96b9ac3482c2a25450b67a15ed851319bc5fabf3b40742ea9066e84282"
24712483

24722484
[[package]]
24732485
name = "minimal-lexical"
@@ -3512,7 +3524,6 @@ dependencies = [
35123524
"rustc_span",
35133525
"rustc_target",
35143526
"thin-vec",
3515-
"tracing",
35163527
]
35173528

35183529
[[package]]
@@ -3785,7 +3796,6 @@ dependencies = [
37853796
"rustc_monomorphize",
37863797
"rustc_parse",
37873798
"rustc_passes",
3788-
"rustc_plugin_impl",
37893799
"rustc_privacy",
37903800
"rustc_query_system",
37913801
"rustc_resolve",
@@ -4074,7 +4084,6 @@ dependencies = [
40744084
"rustc_monomorphize",
40754085
"rustc_parse",
40764086
"rustc_passes",
4077-
"rustc_plugin_impl",
40784087
"rustc_privacy",
40794088
"rustc_query_impl",
40804089
"rustc_query_system",
@@ -4384,21 +4393,6 @@ dependencies = [
43844393
"tracing",
43854394
]
43864395

4387-
[[package]]
4388-
name = "rustc_plugin_impl"
4389-
version = "0.0.0"
4390-
dependencies = [
4391-
"libloading 0.7.4",
4392-
"rustc_ast",
4393-
"rustc_errors",
4394-
"rustc_fluent_macro",
4395-
"rustc_lint",
4396-
"rustc_macros",
4397-
"rustc_metadata",
4398-
"rustc_session",
4399-
"rustc_span",
4400-
]
4401-
44024396
[[package]]
44034397
name = "rustc_privacy"
44044398
version = "0.0.0"

compiler/rustc_ast_lowering/src/expr.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ use rustc_hir as hir;
1515
use rustc_hir::def::Res;
1616
use rustc_hir::definitions::DefPathData;
1717
use rustc_session::errors::report_lit_error;
18-
use rustc_span::source_map::{respan, DesugaringKind, Span, Spanned};
18+
use rustc_span::source_map::{respan, Spanned};
1919
use rustc_span::symbol::{sym, Ident, Symbol};
2020
use rustc_span::DUMMY_SP;
21+
use rustc_span::{DesugaringKind, Span};
2122
use thin_vec::{thin_vec, ThinVec};
2223

2324
impl<'hir> LoweringContext<'_, 'hir> {

compiler/rustc_ast_lowering/src/item.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ use rustc_hir::PredicateOrigin;
1616
use rustc_index::{Idx, IndexSlice, IndexVec};
1717
use rustc_middle::ty::{ResolverAstLowering, TyCtxt};
1818
use rustc_span::edit_distance::find_best_match_for_name;
19-
use rustc_span::source_map::DesugaringKind;
2019
use rustc_span::symbol::{kw, sym, Ident};
21-
use rustc_span::{Span, Symbol};
20+
use rustc_span::{DesugaringKind, Span, Symbol};
2221
use rustc_target::spec::abi;
2322
use smallvec::{smallvec, SmallVec};
2423
use thin_vec::ThinVec;

compiler/rustc_ast_lowering/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,8 @@ use rustc_middle::{
7171
};
7272
use rustc_session::parse::{add_feature_diagnostics, feature_err};
7373
use rustc_span::hygiene::MacroKind;
74-
use rustc_span::source_map::DesugaringKind;
7574
use rustc_span::symbol::{kw, sym, Ident, Symbol};
76-
use rustc_span::{Span, DUMMY_SP};
75+
use rustc_span::{DesugaringKind, Span, DUMMY_SP};
7776
use smallvec::SmallVec;
7877
use std::collections::hash_map::Entry;
7978
use thin_vec::ThinVec;

compiler/rustc_ast_passes/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@ rustc_session = { path = "../rustc_session" }
1919
rustc_span = { path = "../rustc_span" }
2020
rustc_target = { path = "../rustc_target" }
2121
thin-vec = "0.2.12"
22-
tracing = "0.1"
2322
# tidy-alphabetical-end

compiler/rustc_ast_passes/src/ast_validation.rs

+45-53
Original file line numberDiff line numberDiff line change
@@ -1442,62 +1442,54 @@ fn deny_equality_constraints(
14421442
let mut err = errors::EqualityInWhere { span: predicate.span, assoc: None, assoc2: None };
14431443

14441444
// Given `<A as Foo>::Bar = RhsTy`, suggest `A: Foo<Bar = RhsTy>`.
1445-
if let TyKind::Path(Some(qself), full_path) = &predicate.lhs_ty.kind {
1446-
if let TyKind::Path(None, path) = &qself.ty.kind {
1447-
match &path.segments[..] {
1448-
[PathSegment { ident, args: None, .. }] => {
1449-
for param in &generics.params {
1450-
if param.ident == *ident {
1451-
let param = ident;
1452-
match &full_path.segments[qself.position..] {
1453-
[PathSegment { ident, args, .. }] => {
1454-
// Make a new `Path` from `foo::Bar` to `Foo<Bar = RhsTy>`.
1455-
let mut assoc_path = full_path.clone();
1456-
// Remove `Bar` from `Foo::Bar`.
1457-
assoc_path.segments.pop();
1458-
let len = assoc_path.segments.len() - 1;
1459-
let gen_args = args.as_deref().cloned();
1460-
// Build `<Bar = RhsTy>`.
1461-
let arg = AngleBracketedArg::Constraint(AssocConstraint {
1462-
id: rustc_ast::node_id::DUMMY_NODE_ID,
1463-
ident: *ident,
1464-
gen_args,
1465-
kind: AssocConstraintKind::Equality {
1466-
term: predicate.rhs_ty.clone().into(),
1467-
},
1468-
span: ident.span,
1469-
});
1470-
// Add `<Bar = RhsTy>` to `Foo`.
1471-
match &mut assoc_path.segments[len].args {
1472-
Some(args) => match args.deref_mut() {
1473-
GenericArgs::Parenthesized(_) => continue,
1474-
GenericArgs::AngleBracketed(args) => {
1475-
args.args.push(arg);
1476-
}
1477-
},
1478-
empty_args => {
1479-
*empty_args = Some(
1480-
AngleBracketedArgs {
1481-
span: ident.span,
1482-
args: thin_vec![arg],
1483-
}
1484-
.into(),
1485-
);
1486-
}
1487-
}
1488-
err.assoc = Some(errors::AssociatedSuggestion {
1489-
span: predicate.span,
1490-
ident: *ident,
1491-
param: *param,
1492-
path: pprust::path_to_string(&assoc_path),
1493-
})
1494-
}
1495-
_ => {}
1496-
};
1445+
if let TyKind::Path(Some(qself), full_path) = &predicate.lhs_ty.kind
1446+
&& let TyKind::Path(None, path) = &qself.ty.kind
1447+
&& let [PathSegment { ident, args: None, .. }] = &path.segments[..]
1448+
{
1449+
for param in &generics.params {
1450+
if param.ident == *ident
1451+
&& let [PathSegment { ident, args, .. }] = &full_path.segments[qself.position..]
1452+
{
1453+
// Make a new `Path` from `foo::Bar` to `Foo<Bar = RhsTy>`.
1454+
let mut assoc_path = full_path.clone();
1455+
// Remove `Bar` from `Foo::Bar`.
1456+
assoc_path.segments.pop();
1457+
let len = assoc_path.segments.len() - 1;
1458+
let gen_args = args.as_deref().cloned();
1459+
// Build `<Bar = RhsTy>`.
1460+
let arg = AngleBracketedArg::Constraint(AssocConstraint {
1461+
id: rustc_ast::node_id::DUMMY_NODE_ID,
1462+
ident: *ident,
1463+
gen_args,
1464+
kind: AssocConstraintKind::Equality {
1465+
term: predicate.rhs_ty.clone().into(),
1466+
},
1467+
span: ident.span,
1468+
});
1469+
// Add `<Bar = RhsTy>` to `Foo`.
1470+
match &mut assoc_path.segments[len].args {
1471+
Some(args) => match args.deref_mut() {
1472+
GenericArgs::Parenthesized(_) => continue,
1473+
GenericArgs::AngleBracketed(args) => {
1474+
args.args.push(arg);
14971475
}
1476+
},
1477+
empty_args => {
1478+
*empty_args = Some(
1479+
AngleBracketedArgs {
1480+
span: ident.span,
1481+
args: thin_vec![arg],
1482+
}
1483+
.into(),
1484+
);
14981485
}
14991486
}
1500-
_ => {}
1487+
err.assoc = Some(errors::AssociatedSuggestion {
1488+
span: predicate.span,
1489+
ident: *ident,
1490+
param: param.ident,
1491+
path: pprust::path_to_string(&assoc_path),
1492+
})
15011493
}
15021494
}
15031495
}

0 commit comments

Comments
 (0)