From 1f3c637a1d6daa06a7c0fa303993a6aa63cc841a Mon Sep 17 00:00:00 2001
From: Jeremy Kolb <kjeremy@gmail.com>
Date: Sat, 20 Feb 2021 14:59:05 -0500
Subject: [PATCH] Update tests

---
 .../test_data/clippy_pass_by_ref.txt          | 22 +++++++++++++++++++
 .../test_data/handles_macro_location.txt      |  4 ++++
 .../test_data/macro_compiler_error.txt        |  6 +++++
 .../rustc_incompatible_type_for_trait.txt     |  4 ++++
 .../test_data/rustc_mismatched_type.txt       |  4 ++++
 .../test_data/rustc_unused_variable.txt       | 10 +++++++++
 .../rustc_unused_variable_as_hint.txt         | 10 +++++++++
 .../rustc_unused_variable_as_info.txt         | 10 +++++++++
 .../rustc_wrong_number_of_parameters.txt      | 12 ++++++++++
 .../test_data/snap_multi_line_fix.txt         | 22 +++++++++++++++++++
 10 files changed, 104 insertions(+)

diff --git a/crates/rust-analyzer/src/diagnostics/test_data/clippy_pass_by_ref.txt b/crates/rust-analyzer/src/diagnostics/test_data/clippy_pass_by_ref.txt
index ce80476fbc9..23ec2efbab0 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/clippy_pass_by_ref.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/clippy_pass_by_ref.txt
@@ -2,6 +2,8 @@
     MappedRustDiagnostic {
         url: Url {
             scheme: "file",
+            username: "",
+            password: None,
             host: None,
             port: None,
             path: "/test/compiler/mir/tagset.rs",
@@ -31,6 +33,8 @@
                 CodeDescription {
                     href: Url {
                         scheme: "https",
+                        username: "",
+                        password: None,
                         host: Some(
                             Domain(
                                 "rust-lang.github.io",
@@ -55,6 +59,8 @@
                         location: Location {
                             uri: Url {
                                 scheme: "file",
+                                username: "",
+                                password: None,
                                 host: None,
                                 port: None,
                                 path: "/test/compiler/lib.rs",
@@ -78,6 +84,8 @@
                         location: Location {
                             uri: Url {
                                 scheme: "file",
+                                username: "",
+                                password: None,
                                 host: None,
                                 port: None,
                                 path: "/test/compiler/mir/tagset.rs",
@@ -107,6 +115,8 @@
     MappedRustDiagnostic {
         url: Url {
             scheme: "file",
+            username: "",
+            password: None,
             host: None,
             port: None,
             path: "/test/compiler/lib.rs",
@@ -136,6 +146,8 @@
                 CodeDescription {
                     href: Url {
                         scheme: "https",
+                        username: "",
+                        password: None,
                         host: Some(
                             Domain(
                                 "rust-lang.github.io",
@@ -160,6 +172,8 @@
                         location: Location {
                             uri: Url {
                                 scheme: "file",
+                                username: "",
+                                password: None,
                                 host: None,
                                 port: None,
                                 path: "/test/compiler/mir/tagset.rs",
@@ -189,6 +203,8 @@
     MappedRustDiagnostic {
         url: Url {
             scheme: "file",
+            username: "",
+            password: None,
             host: None,
             port: None,
             path: "/test/compiler/mir/tagset.rs",
@@ -218,6 +234,8 @@
                 CodeDescription {
                     href: Url {
                         scheme: "https",
+                        username: "",
+                        password: None,
                         host: Some(
                             Domain(
                                 "rust-lang.github.io",
@@ -242,6 +260,8 @@
                         location: Location {
                             uri: Url {
                                 scheme: "file",
+                                username: "",
+                                password: None,
                                 host: None,
                                 port: None,
                                 path: "/test/compiler/mir/tagset.rs",
@@ -281,6 +301,8 @@
                             {
                                 Url {
                                     scheme: "file",
+                                    username: "",
+                                    password: None,
                                     host: None,
                                     port: None,
                                     path: "/test/compiler/mir/tagset.rs",
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/handles_macro_location.txt b/crates/rust-analyzer/src/diagnostics/test_data/handles_macro_location.txt
index eb4a6b597b2..e5f01fb3345 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/handles_macro_location.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/handles_macro_location.txt
@@ -2,6 +2,8 @@
     MappedRustDiagnostic {
         url: Url {
             scheme: "file",
+            username: "",
+            password: None,
             host: None,
             port: None,
             path: "/test/src/main.rs",
@@ -31,6 +33,8 @@
                 CodeDescription {
                     href: Url {
                         scheme: "https",
+                        username: "",
+                        password: None,
                         host: Some(
                             Domain(
                                 "doc.rust-lang.org",
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/macro_compiler_error.txt b/crates/rust-analyzer/src/diagnostics/test_data/macro_compiler_error.txt
index bdcf2a38fda..f999848a7ff 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/macro_compiler_error.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/macro_compiler_error.txt
@@ -2,6 +2,8 @@
     MappedRustDiagnostic {
         url: Url {
             scheme: "file",
+            username: "",
+            password: None,
             host: None,
             port: None,
             path: "/test/crates/hir_def/src/path.rs",
@@ -34,6 +36,8 @@
                         location: Location {
                             uri: Url {
                                 scheme: "file",
+                                username: "",
+                                password: None,
                                 host: None,
                                 port: None,
                                 path: "/test/crates/hir_def/src/data.rs",
@@ -63,6 +67,8 @@
     MappedRustDiagnostic {
         url: Url {
             scheme: "file",
+            username: "",
+            password: None,
             host: None,
             port: None,
             path: "/test/crates/hir_def/src/data.rs",
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/rustc_incompatible_type_for_trait.txt b/crates/rust-analyzer/src/diagnostics/test_data/rustc_incompatible_type_for_trait.txt
index 19f72196dac..0d16af232e9 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/rustc_incompatible_type_for_trait.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/rustc_incompatible_type_for_trait.txt
@@ -2,6 +2,8 @@
     MappedRustDiagnostic {
         url: Url {
             scheme: "file",
+            username: "",
+            password: None,
             host: None,
             port: None,
             path: "/test/compiler/ty/list_iter.rs",
@@ -31,6 +33,8 @@
                 CodeDescription {
                     href: Url {
                         scheme: "https",
+                        username: "",
+                        password: None,
                         host: Some(
                             Domain(
                                 "doc.rust-lang.org",
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/rustc_mismatched_type.txt b/crates/rust-analyzer/src/diagnostics/test_data/rustc_mismatched_type.txt
index 15ac95d7218..31b6a12ce0c 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/rustc_mismatched_type.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/rustc_mismatched_type.txt
@@ -2,6 +2,8 @@
     MappedRustDiagnostic {
         url: Url {
             scheme: "file",
+            username: "",
+            password: None,
             host: None,
             port: None,
             path: "/test/runtime/compiler_support.rs",
@@ -31,6 +33,8 @@
                 CodeDescription {
                     href: Url {
                         scheme: "https",
+                        username: "",
+                        password: None,
                         host: Some(
                             Domain(
                                 "doc.rust-lang.org",
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable.txt b/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable.txt
index 5c282fe673c..b6acb5f423a 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable.txt
@@ -2,6 +2,8 @@
     MappedRustDiagnostic {
         url: Url {
             scheme: "file",
+            username: "",
+            password: None,
             host: None,
             port: None,
             path: "/test/driver/subcommand/repl.rs",
@@ -38,6 +40,8 @@
                         location: Location {
                             uri: Url {
                                 scheme: "file",
+                                username: "",
+                                password: None,
                                 host: None,
                                 port: None,
                                 path: "/test/driver/subcommand/repl.rs",
@@ -71,6 +75,8 @@
     MappedRustDiagnostic {
         url: Url {
             scheme: "file",
+            username: "",
+            password: None,
             host: None,
             port: None,
             path: "/test/driver/subcommand/repl.rs",
@@ -107,6 +113,8 @@
                         location: Location {
                             uri: Url {
                                 scheme: "file",
+                                username: "",
+                                password: None,
                                 host: None,
                                 port: None,
                                 path: "/test/driver/subcommand/repl.rs",
@@ -146,6 +154,8 @@
                             {
                                 Url {
                                     scheme: "file",
+                                    username: "",
+                                    password: None,
                                     host: None,
                                     port: None,
                                     path: "/test/driver/subcommand/repl.rs",
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_hint.txt b/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_hint.txt
index d36d7693d7f..d765257c44e 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_hint.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_hint.txt
@@ -2,6 +2,8 @@
     MappedRustDiagnostic {
         url: Url {
             scheme: "file",
+            username: "",
+            password: None,
             host: None,
             port: None,
             path: "/test/driver/subcommand/repl.rs",
@@ -38,6 +40,8 @@
                         location: Location {
                             uri: Url {
                                 scheme: "file",
+                                username: "",
+                                password: None,
                                 host: None,
                                 port: None,
                                 path: "/test/driver/subcommand/repl.rs",
@@ -71,6 +75,8 @@
     MappedRustDiagnostic {
         url: Url {
             scheme: "file",
+            username: "",
+            password: None,
             host: None,
             port: None,
             path: "/test/driver/subcommand/repl.rs",
@@ -107,6 +113,8 @@
                         location: Location {
                             uri: Url {
                                 scheme: "file",
+                                username: "",
+                                password: None,
                                 host: None,
                                 port: None,
                                 path: "/test/driver/subcommand/repl.rs",
@@ -146,6 +154,8 @@
                             {
                                 Url {
                                     scheme: "file",
+                                    username: "",
+                                    password: None,
                                     host: None,
                                     port: None,
                                     path: "/test/driver/subcommand/repl.rs",
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_info.txt b/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_info.txt
index 17845b711aa..6b0d948786f 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_info.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_info.txt
@@ -2,6 +2,8 @@
     MappedRustDiagnostic {
         url: Url {
             scheme: "file",
+            username: "",
+            password: None,
             host: None,
             port: None,
             path: "/test/driver/subcommand/repl.rs",
@@ -38,6 +40,8 @@
                         location: Location {
                             uri: Url {
                                 scheme: "file",
+                                username: "",
+                                password: None,
                                 host: None,
                                 port: None,
                                 path: "/test/driver/subcommand/repl.rs",
@@ -71,6 +75,8 @@
     MappedRustDiagnostic {
         url: Url {
             scheme: "file",
+            username: "",
+            password: None,
             host: None,
             port: None,
             path: "/test/driver/subcommand/repl.rs",
@@ -107,6 +113,8 @@
                         location: Location {
                             uri: Url {
                                 scheme: "file",
+                                username: "",
+                                password: None,
                                 host: None,
                                 port: None,
                                 path: "/test/driver/subcommand/repl.rs",
@@ -146,6 +154,8 @@
                             {
                                 Url {
                                     scheme: "file",
+                                    username: "",
+                                    password: None,
                                     host: None,
                                     port: None,
                                     path: "/test/driver/subcommand/repl.rs",
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/rustc_wrong_number_of_parameters.txt b/crates/rust-analyzer/src/diagnostics/test_data/rustc_wrong_number_of_parameters.txt
index f455cf25efb..f7a313cf1a6 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/rustc_wrong_number_of_parameters.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/rustc_wrong_number_of_parameters.txt
@@ -2,6 +2,8 @@
     MappedRustDiagnostic {
         url: Url {
             scheme: "file",
+            username: "",
+            password: None,
             host: None,
             port: None,
             path: "/test/compiler/ty/select.rs",
@@ -31,6 +33,8 @@
                 CodeDescription {
                     href: Url {
                         scheme: "https",
+                        username: "",
+                        password: None,
                         host: Some(
                             Domain(
                                 "doc.rust-lang.org",
@@ -55,6 +59,8 @@
                         location: Location {
                             uri: Url {
                                 scheme: "file",
+                                username: "",
+                                password: None,
                                 host: None,
                                 port: None,
                                 path: "/test/compiler/ty/select.rs",
@@ -84,6 +90,8 @@
     MappedRustDiagnostic {
         url: Url {
             scheme: "file",
+            username: "",
+            password: None,
             host: None,
             port: None,
             path: "/test/compiler/ty/select.rs",
@@ -113,6 +121,8 @@
                 CodeDescription {
                     href: Url {
                         scheme: "https",
+                        username: "",
+                        password: None,
                         host: Some(
                             Domain(
                                 "doc.rust-lang.org",
@@ -137,6 +147,8 @@
                         location: Location {
                             uri: Url {
                                 scheme: "file",
+                                username: "",
+                                password: None,
                                 host: None,
                                 port: None,
                                 path: "/test/compiler/ty/select.rs",
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/snap_multi_line_fix.txt b/crates/rust-analyzer/src/diagnostics/test_data/snap_multi_line_fix.txt
index a1996216786..a0cfb8d334a 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/snap_multi_line_fix.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/snap_multi_line_fix.txt
@@ -2,6 +2,8 @@
     MappedRustDiagnostic {
         url: Url {
             scheme: "file",
+            username: "",
+            password: None,
             host: None,
             port: None,
             path: "/test/src/main.rs",
@@ -31,6 +33,8 @@
                 CodeDescription {
                     href: Url {
                         scheme: "https",
+                        username: "",
+                        password: None,
                         host: Some(
                             Domain(
                                 "rust-lang.github.io",
@@ -55,6 +59,8 @@
                         location: Location {
                             uri: Url {
                                 scheme: "file",
+                                username: "",
+                                password: None,
                                 host: None,
                                 port: None,
                                 path: "/test/src/main.rs",
@@ -78,6 +84,8 @@
                         location: Location {
                             uri: Url {
                                 scheme: "file",
+                                username: "",
+                                password: None,
                                 host: None,
                                 port: None,
                                 path: "/test/src/main.rs",
@@ -107,6 +115,8 @@
     MappedRustDiagnostic {
         url: Url {
             scheme: "file",
+            username: "",
+            password: None,
             host: None,
             port: None,
             path: "/test/src/main.rs",
@@ -136,6 +146,8 @@
                 CodeDescription {
                     href: Url {
                         scheme: "https",
+                        username: "",
+                        password: None,
                         host: Some(
                             Domain(
                                 "rust-lang.github.io",
@@ -160,6 +172,8 @@
                         location: Location {
                             uri: Url {
                                 scheme: "file",
+                                username: "",
+                                password: None,
                                 host: None,
                                 port: None,
                                 path: "/test/src/main.rs",
@@ -189,6 +203,8 @@
     MappedRustDiagnostic {
         url: Url {
             scheme: "file",
+            username: "",
+            password: None,
             host: None,
             port: None,
             path: "/test/src/main.rs",
@@ -218,6 +234,8 @@
                 CodeDescription {
                     href: Url {
                         scheme: "https",
+                        username: "",
+                        password: None,
                         host: Some(
                             Domain(
                                 "rust-lang.github.io",
@@ -242,6 +260,8 @@
                         location: Location {
                             uri: Url {
                                 scheme: "file",
+                                username: "",
+                                password: None,
                                 host: None,
                                 port: None,
                                 path: "/test/src/main.rs",
@@ -281,6 +301,8 @@
                             {
                                 Url {
                                     scheme: "file",
+                                    username: "",
+                                    password: None,
                                     host: None,
                                     port: None,
                                     path: "/test/src/main.rs",