]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/test.rs
Rollup merge of #68312 - varkor:issue-67753-regression, r=Centril
[rust.git] / src / librustdoc / test.rs
index b5731ff0fec21cafc04f668f810958eeffe1c522..05d41415689813e42a00df41028d3a020a953042 100644 (file)
@@ -704,7 +704,7 @@ fn add_test(&mut self, test: String, config: LangString, line: usize) {
         debug!("creating test {}: {}", name, test);
         self.tests.push(testing::TestDescAndFn {
             desc: testing::TestDesc {
-                name: testing::DynTestName(name.clone()),
+                name: testing::DynTestName(name),
                 ignore: match config.ignore {
                     Ignore::All => true,
                     Ignore::None => false,
@@ -905,8 +905,8 @@ fn nested_visit_map(&mut self) -> intravisit::NestedVisitorMap<'_, Self::Map> {
     }
 
     fn visit_item(&mut self, item: &'hir hir::Item) {
-        let name = if let hir::ItemKind::Impl(.., ref ty, _) = item.kind {
-            self.map.hir_to_pretty_string(ty.hir_id)
+        let name = if let hir::ItemKind::Impl { ref self_ty, .. } = item.kind {
+            self.map.hir_to_pretty_string(self_ty.hir_id)
         } else {
             item.ident.to_string()
         };