Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a804c4b

Browse files
committedOct 5, 2021
Auto merge of rust-lang#89545 - workingjubilee:rollup-ooxf3p2, r=workingjubilee
Rollup of 15 pull requests Successful merges: - rust-lang#87993 (Stabilize try_reserve) - rust-lang#88090 (Perform type inference in range pattern) - rust-lang#88780 (Added abs_diff for integer types.) - rust-lang#89270 (path.push() should work as expected on windows verbatim paths) - rust-lang#89413 (Correctly handle supertraits for min_specialization) - rust-lang#89456 (Update to the final LLVM 13.0.0 release) - rust-lang#89466 (Fix bug with query modifier parsing) - rust-lang#89473 (Fix extra `non_snake_case` warning for shorthand field bindings) - rust-lang#89474 (rustdoc: Improve doctest pass's name and module's name) - rust-lang#89478 (Fixed numerus of error message) - rust-lang#89480 (Add test for issue 89118.) - rust-lang#89487 (Try to recover from a `=>` -> `=` or `->` typo in a match arm) - rust-lang#89494 (Deny `where` clauses on `auto` traits) - rust-lang#89511 (:arrow_up: rust-analyzer) - rust-lang#89536 (update Miri) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 003d8d3 + 2ae8ced commit a804c4b

File tree

81 files changed

+787
-297
lines changed

Some content is hidden

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

81 files changed

+787
-297
lines changed
 

‎compiler/rustc_query_impl/src/plumbing.rs

+13-13
Original file line numberDiff line numberDiff line change
@@ -253,53 +253,53 @@ macro_rules! handle_cycle_error {
253253
$error.emit();
254254
Value::from_cycle_error($tcx)
255255
}};
256-
([fatal_cycle $($rest:tt)*][$tcx:expr, $error:expr]) => {{
256+
([(fatal_cycle) $($rest:tt)*][$tcx:expr, $error:expr]) => {{
257257
$error.emit();
258258
$tcx.sess.abort_if_errors();
259259
unreachable!()
260260
}};
261-
([cycle_delay_bug $($rest:tt)*][$tcx:expr, $error:expr]) => {{
261+
([(cycle_delay_bug) $($rest:tt)*][$tcx:expr, $error:expr]) => {{
262262
$error.delay_as_bug();
263263
Value::from_cycle_error($tcx)
264264
}};
265-
([$other:ident $(($($other_args:tt)*))* $(, $($modifiers:tt)*)*][$($args:tt)*]) => {
266-
handle_cycle_error!([$($($modifiers)*)*][$($args)*])
265+
([$other:tt $($modifiers:tt)*][$($args:tt)*]) => {
266+
handle_cycle_error!([$($modifiers)*][$($args)*])
267267
};
268268
}
269269

270270
macro_rules! is_anon {
271271
([]) => {{
272272
false
273273
}};
274-
([anon $($rest:tt)*]) => {{
274+
([(anon) $($rest:tt)*]) => {{
275275
true
276276
}};
277-
([$other:ident $(($($other_args:tt)*))* $(, $($modifiers:tt)*)*]) => {
278-
is_anon!([$($($modifiers)*)*])
277+
([$other:tt $($modifiers:tt)*]) => {
278+
is_anon!([$($modifiers)*])
279279
};
280280
}
281281

282282
macro_rules! is_eval_always {
283283
([]) => {{
284284
false
285285
}};
286-
([eval_always $($rest:tt)*]) => {{
286+
([(eval_always) $($rest:tt)*]) => {{
287287
true
288288
}};
289-
([$other:ident $(($($other_args:tt)*))* $(, $($modifiers:tt)*)*]) => {
290-
is_eval_always!([$($($modifiers)*)*])
289+
([$other:tt $($modifiers:tt)*]) => {
290+
is_eval_always!([$($modifiers)*])
291291
};
292292
}
293293

294294
macro_rules! hash_result {
295295
([][$hcx:expr, $result:expr]) => {{
296296
dep_graph::hash_result($hcx, &$result)
297297
}};
298-
([no_hash $($rest:tt)*][$hcx:expr, $result:expr]) => {{
298+
([(no_hash) $($rest:tt)*][$hcx:expr, $result:expr]) => {{
299299
None
300300
}};
301-
([$other:ident $(($($other_args:tt)*))* $(, $($modifiers:tt)*)*][$($args:tt)*]) => {
302-
hash_result!([$($($modifiers)*)*][$($args)*])
301+
([$other:tt $($modifiers:tt)*][$($args:tt)*]) => {
302+
hash_result!([$($modifiers)*][$($args)*])
303303
};
304304
}
305305

‎compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ use crate::traits::normalize_projection_type;
1010
use rustc_data_structures::fx::FxHashSet;
1111
use rustc_data_structures::stack::ensure_sufficient_stack;
1212
use rustc_data_structures::sync::Lrc;
13-
use rustc_errors::{error_code, struct_span_err, Applicability, DiagnosticBuilder, Style};
13+
use rustc_errors::{
14+
error_code, pluralize, struct_span_err, Applicability, DiagnosticBuilder, Style,
15+
};
1416
use rustc_hir as hir;
1517
use rustc_hir::def::DefKind;
1618
use rustc_hir::def_id::DefId;
@@ -2273,7 +2275,11 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
22732275
parent_trait_ref = child_trait_ref;
22742276
}
22752277
if count > 0 {
2276-
err.note(&format!("{} redundant requirements hidden", count));
2278+
err.note(&format!(
2279+
"{} redundant requirement{} hidden",
2280+
count,
2281+
pluralize!(count)
2282+
));
22772283
err.note(&format!(
22782284
"required because of the requirements on the impl of `{}` for `{}`",
22792285
parent_trait_ref.print_only_trait_path(),
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.