From 1f3c637a1d6daa06a7c0fa303993a6aa63cc841a Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Sat, 20 Feb 2021 14:59:05 -0500 Subject: Update tests --- .../diagnostics/test_data/clippy_pass_by_ref.txt | 22 ++++++++++++++++++++++ .../test_data/handles_macro_location.txt | 4 ++++ .../diagnostics/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 ++++++++++ .../test_data/rustc_unused_variable_as_hint.txt | 10 ++++++++++ .../test_data/rustc_unused_variable_as_info.txt | 10 ++++++++++ .../test_data/rustc_wrong_number_of_parameters.txt | 12 ++++++++++++ .../diagnostics/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 ce80476fb..23ec2efba 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 eb4a6b597..e5f01fb33 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 bdcf2a38f..f999848a7 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 19f72196d..0d16af232 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 15ac95d72..31b6a12ce 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 5c282fe67..b6acb5f42 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 d36d7693d..d765257c4 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 17845b711..6b0d94878 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 f455cf25e..f7a313cf1 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 a19962167..a0cfb8d33 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", -- cgit v1.2.3