about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-12-19 01:13:58 +0000
committerbors <bors@rust-lang.org>2022-12-19 01:13:58 +0000
commita474ebbc4e975683a296739bd9b11b5dde83f808 (patch)
tree02bf110293be3a45b7b76a76de485813d8c4d46f /compiler/rustc_resolve/src
parent2b094b1ede1cb04095a3210eb2f40f398d4a832a (diff)
parent87a46948251c824f081323d6abf91126ac4d8cef (diff)
downloadrust-a474ebbc4e975683a296739bd9b11b5dde83f808.tar.gz
rust-a474ebbc4e975683a296739bd9b11b5dde83f808.zip
Auto merge of #105883 - matthiaskrgr:rollup-v5n53t1, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #105419 (Add tests for #41731)
 - #105447 (Add a test for #103095)
 - #105842 (print argument name in arg mismatch if possible)
 - #105863 (Update browser-ui-test version to reduce GUI tests flakyness)
 - #105867 (remove redundant fn params that were only "used" in recursion)
 - #105869 (don't clone Copy types)
 - #105873 (use &str / String literals instead of format!())
 - #105879 (Revert "Introduce lowering_arena to avoid creating AST nodes on the fly")

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_resolve/src')
-rw-r--r--compiler/rustc_resolve/src/late/diagnostics.rs8
-rw-r--r--compiler/rustc_resolve/src/lib.rs2
2 files changed, 3 insertions, 7 deletions
diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs
index 49bbe37ee43..600308b6508 100644
--- a/compiler/rustc_resolve/src/late/diagnostics.rs
+++ b/compiler/rustc_resolve/src/late/diagnostics.rs
@@ -277,11 +277,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
                 let override_suggestion =
                     if ["true", "false"].contains(&item_str.to_string().to_lowercase().as_str()) {
                         let item_typo = item_str.to_string().to_lowercase();
-                        Some((
-                            item_span,
-                            "you may want to use a bool value instead",
-                            format!("{}", item_typo),
-                        ))
+                        Some((item_span, "you may want to use a bool value instead", item_typo))
                     // FIXME(vincenzopalazzo): make the check smarter,
                     // and maybe expand with levenshtein distance checks
                     } else if item_str.as_str() == "printf" {
@@ -2324,7 +2320,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
                         let message = format!("consider introducing lifetime `{}` here", name);
                         should_continue = suggest(err, false, span, &message, sugg);
                     } else {
-                        let message = format!("consider introducing a named lifetime parameter");
+                        let message = "consider introducing a named lifetime parameter";
                         should_continue = suggest(err, false, span, &message, sugg);
                     }
                 }
diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs
index 24e4b5bdd3f..4861ee746aa 100644
--- a/compiler/rustc_resolve/src/lib.rs
+++ b/compiler/rustc_resolve/src/lib.rs
@@ -1491,7 +1491,7 @@ impl<'a> Resolver<'a> {
             label_res_map: self.label_res_map.clone(),
             lifetimes_res_map: self.lifetimes_res_map.clone(),
             extra_lifetime_params_map: self.extra_lifetime_params_map.clone(),
-            next_node_id: self.next_node_id.clone(),
+            next_node_id: self.next_node_id,
             node_id_to_def_id: self.node_id_to_def_id.clone(),
             def_id_to_node_id: self.def_id_to_node_id.clone(),
             trait_map: self.trait_map.clone(),