Skip to content

Commit ab10908

Browse files
committed
Auto merge of #106409 - matthiaskrgr:rollup-b58z1hz, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #104552 (warn newer available version of the x tool) - #105681 (some fixes/improvements to mir::visit module) - #106005 (Test the borrowck behavior of if-let guards) - #106356 (clean: Remove `ctor_kind` from `VariantStruct`.) - #106365 (Grammar : Missing "is" in format specifier diagnostic) - #106388 (rustdoc: remove legacy box-sizing CSS) - #106392 (`has_overflow` only if value is *not* within limit) - #106402 (Fix dupe word typos) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 312c9a3 + e2f7108 commit ab10908

File tree

51 files changed

+756
-110
lines changed

Some content is hidden

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

51 files changed

+756
-110
lines changed

Cargo.lock

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4805,18 +4805,18 @@ checksum = "1ef965a420fe14fdac7dd018862966a4c14094f900e1650bbc71ddd7d580c8af"
48054805

48064806
[[package]]
48074807
name = "semver"
4808-
version = "1.0.12"
4808+
version = "1.0.14"
48094809
source = "registry+https://github.com/rust-lang/crates.io-index"
4810-
checksum = "a2333e6df6d6598f2b1974829f853c2b4c5f4a6e503c10af918081aa6f8564e1"
4810+
checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4"
48114811
dependencies = [
48124812
"serde",
48134813
]
48144814

48154815
[[package]]
48164816
name = "serde"
4817-
version = "1.0.147"
4817+
version = "1.0.152"
48184818
source = "registry+https://github.com/rust-lang/crates.io-index"
4819-
checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965"
4819+
checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb"
48204820
dependencies = [
48214821
"serde_derive",
48224822
]
@@ -4833,9 +4833,9 @@ dependencies = [
48334833

48344834
[[package]]
48354835
name = "serde_derive"
4836-
version = "1.0.147"
4836+
version = "1.0.152"
48374837
source = "registry+https://github.com/rust-lang/crates.io-index"
4838-
checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852"
4838+
checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e"
48394839
dependencies = [
48404840
"proc-macro2",
48414841
"quote",
@@ -4853,9 +4853,9 @@ dependencies = [
48534853

48544854
[[package]]
48554855
name = "serde_json"
4856-
version = "1.0.85"
4856+
version = "1.0.91"
48574857
source = "registry+https://github.com/rust-lang/crates.io-index"
4858-
checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44"
4858+
checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883"
48594859
dependencies = [
48604860
"indexmap",
48614861
"itoa",
@@ -5133,9 +5133,9 @@ dependencies = [
51335133

51345134
[[package]]
51355135
name = "syn"
5136-
version = "1.0.102"
5136+
version = "1.0.107"
51375137
source = "registry+https://github.com/rust-lang/crates.io-index"
5138-
checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1"
5138+
checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5"
51395139
dependencies = [
51405140
"proc-macro2",
51415141
"quote",
@@ -5309,6 +5309,7 @@ dependencies = [
53095309
"lazy_static",
53105310
"miropt-test-tools",
53115311
"regex",
5312+
"semver",
53125313
"termcolor",
53135314
"walkdir",
53145315
]

compiler/rustc_builtin_macros/src/format.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ fn report_missing_placeholders(
638638
if show_doc_note {
639639
diag.note(concat!(
640640
stringify!($kind),
641-
" formatting not supported; see the documentation for `std::fmt`",
641+
" formatting is not supported; see the documentation for `std::fmt`",
642642
));
643643
}
644644
if suggestions.len() > 0 {

compiler/rustc_lint/src/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,7 +1392,7 @@ declare_lint! {
13921392
///
13931393
/// The attribute must be used in conjunction with the
13941394
/// [`closure_track_caller` feature flag]. Otherwise, the `#[track_caller]`
1395-
/// annotation will function as as no-op.
1395+
/// annotation will function as a no-op.
13961396
///
13971397
/// [`closure_track_caller` feature flag]: https://doc.rust-lang.org/beta/unstable-book/language-features/closure-track-caller.html
13981398
UNGATED_ASYNC_FN_TRACK_CALLER,

compiler/rustc_lint/src/early.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ macro_rules! lint_callback { ($cx:expr, $f:ident, $($args:expr),*) => ({
2929
$cx.pass.$f(&$cx.context, $($args),*);
3030
}) }
3131

32-
/// Implements the AST traversal for early lint passes. `T` provides the the
32+
/// Implements the AST traversal for early lint passes. `T` provides the
3333
/// `check_*` methods.
3434
pub struct EarlyContextAndPass<'a, T: EarlyLintPass> {
3535
context: EarlyContext<'a>,

compiler/rustc_lint/src/late.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ macro_rules! lint_callback { ($cx:expr, $f:ident, $($args:expr),*) => ({
4040
$cx.pass.$f(&$cx.context, $($args),*);
4141
}) }
4242

43-
/// Implements the AST traversal for late lint passes. `T` provides the the
43+
/// Implements the AST traversal for late lint passes. `T` provides the
4444
/// `check_*` methods.
4545
pub struct LateContextAndPass<'tcx, T: LateLintPass<'tcx>> {
4646
context: LateContext<'tcx>,

compiler/rustc_middle/src/mir/visit.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
//! ## Overview
44
//!
55
//! There are two visitors, one for immutable and one for mutable references,
6-
//! but both are generated by the following macro. The code is written according
7-
//! to the following conventions:
6+
//! but both are generated by the `make_mir_visitor` macro.
7+
//! The code is written according to the following conventions:
88
//!
99
//! - introduce a `visit_foo` and a `super_foo` method for every MIR type
1010
//! - `visit_foo`, by default, calls `super_foo`
1111
//! - `super_foo`, by default, destructures the `foo` and calls `visit_foo`
1212
//!
13-
//! This allows you as a user to override `visit_foo` for types are
14-
//! interested in, and invoke (within that method) call
13+
//! This allows you to override `visit_foo` for types you are
14+
//! interested in, and invoke (within that method call)
1515
//! `self.super_foo` to get the default behavior. Just as in an OO
1616
//! language, you should never call `super` methods ordinarily except
1717
//! in that circumstance.

compiler/rustc_trait_selection/src/solve/overflow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl OverflowData {
3636

3737
#[inline]
3838
pub(super) fn has_overflow(&self, depth: usize) -> bool {
39-
self.current_limit.value_within_limit(depth + self.additional_depth)
39+
!self.current_limit.value_within_limit(depth + self.additional_depth)
4040
}
4141

4242
/// Updating the current limit when hitting overflow.

src/bootstrap/bootstrap.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -934,8 +934,7 @@ def main():
934934
if len(sys.argv) > 1 and sys.argv[1] == 'help':
935935
sys.argv = [sys.argv[0], '-h'] + sys.argv[2:]
936936

937-
help_triggered = (
938-
'-h' in sys.argv) or ('--help' in sys.argv) or (len(sys.argv) == 1)
937+
help_triggered = len(sys.argv) == 1 or any(x in ["-h", "--help", "--version"] for x in sys.argv)
939938
try:
940939
bootstrap(help_triggered)
941940
if not help_triggered:

src/librustdoc/clean/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1960,7 +1960,6 @@ pub(crate) fn clean_variant_def<'tcx>(variant: &ty::VariantDef, cx: &mut DocCont
19601960
variant.fields.iter().map(|field| clean_middle_field(field, cx)).collect(),
19611961
),
19621962
None => VariantKind::Struct(VariantStruct {
1963-
ctor_kind: None,
19641963
fields: variant.fields.iter().map(|field| clean_middle_field(field, cx)).collect(),
19651964
}),
19661965
};
@@ -1985,7 +1984,6 @@ fn clean_variant_data<'tcx>(
19851984

19861985
let kind = match variant {
19871986
hir::VariantData::Struct(..) => VariantKind::Struct(VariantStruct {
1988-
ctor_kind: None,
19891987
fields: variant.fields().iter().map(|x| clean_field(x, cx)).collect(),
19901988
}),
19911989
hir::VariantData::Tuple(..) => {

src/librustdoc/clean/types.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2111,7 +2111,6 @@ impl Union {
21112111
/// only as a variant in an enum.
21122112
#[derive(Clone, Debug)]
21132113
pub(crate) struct VariantStruct {
2114-
pub(crate) ctor_kind: Option<CtorKind>,
21152114
pub(crate) fields: Vec<Item>,
21162115
}
21172116

0 commit comments

Comments
 (0)