Skip to content

Commit 0d94daa

Browse files
committed
Auto merge of #69643 - Dylan-DPC:rollup-gmt6lm8, r=Dylan-DPC
Rollup of 7 pull requests Successful merges: - #69620 (doc(librustc_error_codes): add long error explanation for E0719) - #69621 (use question mark operator in a few places.) - #69626 (Toolstate: don't duplicate nightly tool list.) - #69633 (Update my mailmap entry) - #69634 (clean up E0378 explanation) - #69637 (Don't convert Results to Options just for matching.) - #69641 (Update books) Failed merges: r? @ghost
2 parents 18c275b + 50cfd43 commit 0d94daa

File tree

18 files changed

+77
-48
lines changed

18 files changed

+77
-48
lines changed

.mailmap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
# email addresses.
66
#
77

8-
Aaron Power <theaaronepower@gmail.com> Erin Power <xampprocky@gmail.com>
98
Aaron Todd <github@opprobrio.us>
109
Abhishek Chanda <abhishek.becs@gmail.com> Abhishek Chanda <abhishek@cloudscaling.com>
1110
Adolfo Ochagavía <aochagavia92@gmail.com>
@@ -84,6 +83,8 @@ Eric Holk <eric.holk@gmail.com> <eholk@mozilla.com>
8483
Eric Holmes <eric@ejholmes.net>
8584
Eric Reed <ecreed@cs.washington.edu> <ereed@mozilla.com>
8685
Erick Tryzelaar <erick.tryzelaar@gmail.com> <etryzelaar@iqt.org>
86+
Erin Power <xampprocky@gmail.com> <theaaronepower@gmail.com>
87+
Erin Power <xampprocky@gmail.com> <Aaronepower@users.noreply.github.com>
8788
Esteban Küber <esteban@kuber.com.ar> <esteban@commure.com>
8889
Esteban Küber <esteban@kuber.com.ar> <estebank@users.noreply.github.com>
8990
Esteban Küber <esteban@kuber.com.ar> <github@kuber.com.ar>

src/bootstrap/toolstate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ fn change_toolstate(
443443
if new_state != state {
444444
eprintln!("The state of `{}` has changed from `{}` to `{}`", tool, state, new_state);
445445
if new_state < state {
446-
if !["rustc-guide", "miri", "embedded-book"].contains(&tool.as_str()) {
446+
if !NIGHTLY_TOOLS.iter().any(|(name, _path)| name == tool) {
447447
regressed = true;
448448
}
449449
}

src/libcore/iter/adapters/mod.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,9 +1894,7 @@ where
18941894
let to_skip = self.n;
18951895
self.n = 0;
18961896
// nth(n) skips n+1
1897-
if self.iter.nth(to_skip - 1).is_none() {
1898-
return None;
1899-
}
1897+
self.iter.nth(to_skip - 1)?;
19001898
}
19011899
self.iter.nth(n)
19021900
}
@@ -1916,9 +1914,7 @@ where
19161914
fn last(mut self) -> Option<I::Item> {
19171915
if self.n > 0 {
19181916
// nth(n) skips n+1
1919-
if self.iter.nth(self.n - 1).is_none() {
1920-
return None;
1921-
}
1917+
self.iter.nth(self.n - 1)?;
19221918
}
19231919
self.iter.last()
19241920
}

src/librustc/hir/map/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,8 @@ impl<'hir> Map<'hir> {
338338
Node::Variant(_) => DefKind::Variant,
339339
Node::Ctor(variant_data) => {
340340
// FIXME(eddyb) is this even possible, if we have a `Node::Ctor`?
341-
if variant_data.ctor_hir_id().is_none() {
342-
return None;
343-
}
341+
variant_data.ctor_hir_id()?;
342+
344343
let ctor_of = match self.find(self.get_parent_node(hir_id)) {
345344
Some(Node::Item(..)) => def::CtorOf::Struct,
346345
Some(Node::Variant(..)) => def::CtorOf::Variant,

src/librustc/ty/instance.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,7 @@ impl<'tcx> Instance<'tcx> {
115115
}
116116

117117
// If this a non-generic instance, it cannot be a shared monomorphization.
118-
if self.substs.non_erasable_generics().next().is_none() {
119-
return None;
120-
}
118+
self.substs.non_erasable_generics().next()?;
121119

122120
match self.def {
123121
InstanceDef::Item(def_id) => tcx

src/librustc_error_codes/error_codes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ E0714: include_str!("./error_codes/E0714.md"),
395395
E0715: include_str!("./error_codes/E0715.md"),
396396
E0716: include_str!("./error_codes/E0716.md"),
397397
E0718: include_str!("./error_codes/E0718.md"),
398+
E0719: include_str!("./error_codes/E0719.md"),
398399
E0720: include_str!("./error_codes/E0720.md"),
399400
E0723: include_str!("./error_codes/E0723.md"),
400401
E0725: include_str!("./error_codes/E0725.md"),
@@ -605,7 +606,6 @@ E0748: include_str!("./error_codes/E0748.md"),
605606
E0710, // an unknown tool name found in scoped lint
606607
E0711, // a feature has been declared with conflicting stability attributes
607608
E0717, // rustc_promotable without stability attribute
608-
E0719, // duplicate values for associated type binding
609609
// E0721, // `await` keyword
610610
E0722, // Malformed `#[optimize]` attribute
611611
E0724, // `#[ffi_returns_twice]` is only allowed in foreign functions

0 commit comments

Comments
 (0)