]> git.lizzy.rs Git - rust.git/commitdiff
Update expected test results
authorBrandon <brandondong604@hotmail.com>
Sun, 5 Dec 2021 05:26:07 +0000 (21:26 -0800)
committerBrandon <brandondong604@hotmail.com>
Sun, 5 Dec 2021 05:42:13 +0000 (21:42 -0800)
crates/rust-analyzer/src/diagnostics/test_data/clippy_pass_by_ref.txt
crates/rust-analyzer/src/diagnostics/test_data/handles_macro_location.txt
crates/rust-analyzer/src/diagnostics/test_data/macro_compiler_error.txt
crates/rust-analyzer/src/diagnostics/test_data/rustc_incompatible_type_for_trait.txt
crates/rust-analyzer/src/diagnostics/test_data/rustc_mismatched_type.txt
crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable.txt
crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_hint.txt
crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_info.txt
crates/rust-analyzer/src/diagnostics/test_data/rustc_wrong_number_of_parameters.txt
crates/rust-analyzer/src/diagnostics/test_data/snap_multi_line_fix.txt

index fd04163de9803cf5ce9aa306a7e3a5396eb66a38..4610984acb989028a79ac126def764ec1de4c81b 100644 (file)
             tags: None,
             data: None,
         },
-        fixes: [],
+        fix: None,
     },
     MappedRustDiagnostic {
         url: Url {
             tags: None,
             data: None,
         },
-        fixes: [],
+        fix: None,
     },
     MappedRustDiagnostic {
         url: Url {
             tags: None,
             data: None,
         },
-        fixes: [
-            CodeAction {
-                title: "consider passing by value instead: `self`",
-                group: None,
-                kind: Some(
-                    CodeActionKind(
-                        "quickfix",
+        fix: Some(
+            Fix {
+                ranges: [
+                    Range {
+                        start: Position {
+                            line: 41,
+                            character: 23,
+                        },
+                        end: Position {
+                            line: 41,
+                            character: 28,
+                        },
+                    },
+                ],
+                action: CodeAction {
+                    title: "consider passing by value instead: `self`",
+                    group: None,
+                    kind: Some(
+                        CodeActionKind(
+                            "quickfix",
+                        ),
                     ),
-                ),
-                edit: Some(
-                    SnippetWorkspaceEdit {
-                        changes: Some(
-                            {
-                                Url {
-                                    scheme: "file",
-                                    cannot_be_a_base: false,
-                                    username: "",
-                                    password: None,
-                                    host: None,
-                                    port: None,
-                                    path: "/test/compiler/mir/tagset.rs",
-                                    query: None,
-                                    fragment: None,
-                                }: [
-                                    TextEdit {
-                                        range: Range {
-                                            start: Position {
-                                                line: 41,
-                                                character: 23,
-                                            },
-                                            end: Position {
-                                                line: 41,
-                                                character: 28,
+                    edit: Some(
+                        SnippetWorkspaceEdit {
+                            changes: Some(
+                                {
+                                    Url {
+                                        scheme: "file",
+                                        cannot_be_a_base: false,
+                                        username: "",
+                                        password: None,
+                                        host: None,
+                                        port: None,
+                                        path: "/test/compiler/mir/tagset.rs",
+                                        query: None,
+                                        fragment: None,
+                                    }: [
+                                        TextEdit {
+                                            range: Range {
+                                                start: Position {
+                                                    line: 41,
+                                                    character: 23,
+                                                },
+                                                end: Position {
+                                                    line: 41,
+                                                    character: 28,
+                                                },
                                             },
+                                            new_text: "self",
                                         },
-                                        new_text: "self",
-                                    },
-                                ],
-                            },
-                        ),
-                        document_changes: None,
-                        change_annotations: None,
-                    },
-                ),
-                is_preferred: Some(
-                    true,
-                ),
-                data: None,
+                                    ],
+                                },
+                            ),
+                            document_changes: None,
+                            change_annotations: None,
+                        },
+                    ),
+                    is_preferred: Some(
+                        true,
+                    ),
+                    data: None,
+                },
             },
-        ],
+        ),
     },
 ]
index a7f936a703e33f871da26f79c3da6dd038f750de..989e5cf66d86af716cbba99bf2166e085e967d7a 100644 (file)
@@ -59,6 +59,6 @@
             tags: None,
             data: None,
         },
-        fixes: [],
+        fix: None,
     },
 ]
index 8bee4cfe10a739a69aba28d6849f159c984415c8..fe5cf9b3bea7b1685fa72eaff5b87964f160d5f4 100644 (file)
@@ -64,7 +64,7 @@
             tags: None,
             data: None,
         },
-        fixes: [],
+        fix: None,
     },
     MappedRustDiagnostic {
         url: Url {
             tags: None,
             data: None,
         },
-        fixes: [],
+        fix: None,
     },
     MappedRustDiagnostic {
         url: Url {
             tags: None,
             data: None,
         },
-        fixes: [],
+        fix: None,
     },
 ]
index afc562a0e2bee18f012f5f390075af1b1cc710d6..dc36aa761c0663124f2a2ea93dc655c7211a6b31 100644 (file)
@@ -59,6 +59,6 @@
             tags: None,
             data: None,
         },
-        fixes: [],
+        fix: None,
     },
 ]
index 05074a914b53c0ccc79f3f0722ba4ffae3289add..d557196c2bd2455b890be4363636e8e585f75c64 100644 (file)
@@ -59,6 +59,6 @@
             tags: None,
             data: None,
         },
-        fixes: [],
+        fix: None,
     },
 ]
index 3ded70411d353c7c6c4aaf081e17d25bf42f8c06..46d44192c5cd92b05869a5fcdc8e82e105e9e093 100644 (file)
@@ -72,7 +72,7 @@
             ),
             data: None,
         },
-        fixes: [],
+        fix: None,
     },
     MappedRustDiagnostic {
         url: Url {
             tags: None,
             data: None,
         },
-        fixes: [
-            CodeAction {
-                title: "consider prefixing with an underscore: `_foo`",
-                group: None,
-                kind: Some(
-                    CodeActionKind(
-                        "quickfix",
+        fix: Some(
+            Fix {
+                ranges: [
+                    Range {
+                        start: Position {
+                            line: 290,
+                            character: 8,
+                        },
+                        end: Position {
+                            line: 290,
+                            character: 11,
+                        },
+                    },
+                ],
+                action: CodeAction {
+                    title: "consider prefixing with an underscore: `_foo`",
+                    group: None,
+                    kind: Some(
+                        CodeActionKind(
+                            "quickfix",
+                        ),
                     ),
-                ),
-                edit: Some(
-                    SnippetWorkspaceEdit {
-                        changes: Some(
-                            {
-                                Url {
-                                    scheme: "file",
-                                    cannot_be_a_base: false,
-                                    username: "",
-                                    password: None,
-                                    host: None,
-                                    port: None,
-                                    path: "/test/driver/subcommand/repl.rs",
-                                    query: None,
-                                    fragment: None,
-                                }: [
-                                    TextEdit {
-                                        range: Range {
-                                            start: Position {
-                                                line: 290,
-                                                character: 8,
-                                            },
-                                            end: Position {
-                                                line: 290,
-                                                character: 11,
+                    edit: Some(
+                        SnippetWorkspaceEdit {
+                            changes: Some(
+                                {
+                                    Url {
+                                        scheme: "file",
+                                        cannot_be_a_base: false,
+                                        username: "",
+                                        password: None,
+                                        host: None,
+                                        port: None,
+                                        path: "/test/driver/subcommand/repl.rs",
+                                        query: None,
+                                        fragment: None,
+                                    }: [
+                                        TextEdit {
+                                            range: Range {
+                                                start: Position {
+                                                    line: 290,
+                                                    character: 8,
+                                                },
+                                                end: Position {
+                                                    line: 290,
+                                                    character: 11,
+                                                },
                                             },
+                                            new_text: "_foo",
                                         },
-                                        new_text: "_foo",
-                                    },
-                                ],
-                            },
-                        ),
-                        document_changes: None,
-                        change_annotations: None,
-                    },
-                ),
-                is_preferred: Some(
-                    true,
-                ),
-                data: None,
+                                    ],
+                                },
+                            ),
+                            document_changes: None,
+                            change_annotations: None,
+                        },
+                    ),
+                    is_preferred: Some(
+                        true,
+                    ),
+                    data: None,
+                },
             },
-        ],
+        ),
     },
 ]
index 0993aa1af14bce2e6372b5fbe53cbd3fe4738f46..b595487e8f3630e5cb9b48b4143c09758824949a 100644 (file)
@@ -72,7 +72,7 @@
             ),
             data: None,
         },
-        fixes: [],
+        fix: None,
     },
     MappedRustDiagnostic {
         url: Url {
             tags: None,
             data: None,
         },
-        fixes: [
-            CodeAction {
-                title: "consider prefixing with an underscore: `_foo`",
-                group: None,
-                kind: Some(
-                    CodeActionKind(
-                        "quickfix",
+        fix: Some(
+            Fix {
+                ranges: [
+                    Range {
+                        start: Position {
+                            line: 290,
+                            character: 8,
+                        },
+                        end: Position {
+                            line: 290,
+                            character: 11,
+                        },
+                    },
+                ],
+                action: CodeAction {
+                    title: "consider prefixing with an underscore: `_foo`",
+                    group: None,
+                    kind: Some(
+                        CodeActionKind(
+                            "quickfix",
+                        ),
                     ),
-                ),
-                edit: Some(
-                    SnippetWorkspaceEdit {
-                        changes: Some(
-                            {
-                                Url {
-                                    scheme: "file",
-                                    cannot_be_a_base: false,
-                                    username: "",
-                                    password: None,
-                                    host: None,
-                                    port: None,
-                                    path: "/test/driver/subcommand/repl.rs",
-                                    query: None,
-                                    fragment: None,
-                                }: [
-                                    TextEdit {
-                                        range: Range {
-                                            start: Position {
-                                                line: 290,
-                                                character: 8,
-                                            },
-                                            end: Position {
-                                                line: 290,
-                                                character: 11,
+                    edit: Some(
+                        SnippetWorkspaceEdit {
+                            changes: Some(
+                                {
+                                    Url {
+                                        scheme: "file",
+                                        cannot_be_a_base: false,
+                                        username: "",
+                                        password: None,
+                                        host: None,
+                                        port: None,
+                                        path: "/test/driver/subcommand/repl.rs",
+                                        query: None,
+                                        fragment: None,
+                                    }: [
+                                        TextEdit {
+                                            range: Range {
+                                                start: Position {
+                                                    line: 290,
+                                                    character: 8,
+                                                },
+                                                end: Position {
+                                                    line: 290,
+                                                    character: 11,
+                                                },
                                             },
+                                            new_text: "_foo",
                                         },
-                                        new_text: "_foo",
-                                    },
-                                ],
-                            },
-                        ),
-                        document_changes: None,
-                        change_annotations: None,
-                    },
-                ),
-                is_preferred: Some(
-                    true,
-                ),
-                data: None,
+                                    ],
+                                },
+                            ),
+                            document_changes: None,
+                            change_annotations: None,
+                        },
+                    ),
+                    is_preferred: Some(
+                        true,
+                    ),
+                    data: None,
+                },
             },
-        ],
+        ),
     },
 ]
index d7a974ae57974230cd1d3bdc2b331334e481aa75..3ee50392a7fce99418cf0453947ef08150a2deaf 100644 (file)
@@ -72,7 +72,7 @@
             ),
             data: None,
         },
-        fixes: [],
+        fix: None,
     },
     MappedRustDiagnostic {
         url: Url {
             tags: None,
             data: None,
         },
-        fixes: [
-            CodeAction {
-                title: "consider prefixing with an underscore: `_foo`",
-                group: None,
-                kind: Some(
-                    CodeActionKind(
-                        "quickfix",
+        fix: Some(
+            Fix {
+                ranges: [
+                    Range {
+                        start: Position {
+                            line: 290,
+                            character: 8,
+                        },
+                        end: Position {
+                            line: 290,
+                            character: 11,
+                        },
+                    },
+                ],
+                action: CodeAction {
+                    title: "consider prefixing with an underscore: `_foo`",
+                    group: None,
+                    kind: Some(
+                        CodeActionKind(
+                            "quickfix",
+                        ),
                     ),
-                ),
-                edit: Some(
-                    SnippetWorkspaceEdit {
-                        changes: Some(
-                            {
-                                Url {
-                                    scheme: "file",
-                                    cannot_be_a_base: false,
-                                    username: "",
-                                    password: None,
-                                    host: None,
-                                    port: None,
-                                    path: "/test/driver/subcommand/repl.rs",
-                                    query: None,
-                                    fragment: None,
-                                }: [
-                                    TextEdit {
-                                        range: Range {
-                                            start: Position {
-                                                line: 290,
-                                                character: 8,
-                                            },
-                                            end: Position {
-                                                line: 290,
-                                                character: 11,
+                    edit: Some(
+                        SnippetWorkspaceEdit {
+                            changes: Some(
+                                {
+                                    Url {
+                                        scheme: "file",
+                                        cannot_be_a_base: false,
+                                        username: "",
+                                        password: None,
+                                        host: None,
+                                        port: None,
+                                        path: "/test/driver/subcommand/repl.rs",
+                                        query: None,
+                                        fragment: None,
+                                    }: [
+                                        TextEdit {
+                                            range: Range {
+                                                start: Position {
+                                                    line: 290,
+                                                    character: 8,
+                                                },
+                                                end: Position {
+                                                    line: 290,
+                                                    character: 11,
+                                                },
                                             },
+                                            new_text: "_foo",
                                         },
-                                        new_text: "_foo",
-                                    },
-                                ],
-                            },
-                        ),
-                        document_changes: None,
-                        change_annotations: None,
-                    },
-                ),
-                is_preferred: Some(
-                    true,
-                ),
-                data: None,
+                                    ],
+                                },
+                            ),
+                            document_changes: None,
+                            change_annotations: None,
+                        },
+                    ),
+                    is_preferred: Some(
+                        true,
+                    ),
+                    data: None,
+                },
             },
-        ],
+        ),
     },
 ]
index 5ea27a152752d7b954451a12705afd1e52493a22..8ec92888ce1155c8cd66651e6767c0fd24369acd 100644 (file)
@@ -88,7 +88,7 @@
             tags: None,
             data: None,
         },
-        fixes: [],
+        fix: None,
     },
     MappedRustDiagnostic {
         url: Url {
             tags: None,
             data: None,
         },
-        fixes: [],
+        fix: None,
     },
 ]
index f77abde5155c5797441fd8c6457fcf829732f87c..d7987f65eda6b344d2503e748390fb1ef2dd25ab 100644 (file)
             tags: None,
             data: None,
         },
-        fixes: [],
+        fix: None,
     },
     MappedRustDiagnostic {
         url: Url {
             tags: None,
             data: None,
         },
-        fixes: [],
+        fix: None,
     },
     MappedRustDiagnostic {
         url: Url {
             tags: None,
             data: None,
         },
-        fixes: [
-            CodeAction {
-                title: "return the expression directly: `(0..10).collect()`",
-                group: None,
-                kind: Some(
-                    CodeActionKind(
-                        "quickfix",
+        fix: Some(
+            Fix {
+                ranges: [
+                    Range {
+                        start: Position {
+                            line: 2,
+                            character: 4,
+                        },
+                        end: Position {
+                            line: 2,
+                            character: 30,
+                        },
+                    },
+                    Range {
+                        start: Position {
+                            line: 3,
+                            character: 4,
+                        },
+                        end: Position {
+                            line: 3,
+                            character: 5,
+                        },
+                    },
+                ],
+                action: CodeAction {
+                    title: "return the expression directly: `(0..10).collect()`",
+                    group: None,
+                    kind: Some(
+                        CodeActionKind(
+                            "quickfix",
+                        ),
                     ),
-                ),
-                edit: Some(
-                    SnippetWorkspaceEdit {
-                        changes: Some(
-                            {
-                                Url {
-                                    scheme: "file",
-                                    cannot_be_a_base: false,
-                                    username: "",
-                                    password: None,
-                                    host: None,
-                                    port: None,
-                                    path: "/test/src/main.rs",
-                                    query: None,
-                                    fragment: None,
-                                }: [
-                                    TextEdit {
-                                        range: Range {
-                                            start: Position {
-                                                line: 2,
-                                                character: 4,
-                                            },
-                                            end: Position {
-                                                line: 2,
-                                                character: 30,
+                    edit: Some(
+                        SnippetWorkspaceEdit {
+                            changes: Some(
+                                {
+                                    Url {
+                                        scheme: "file",
+                                        cannot_be_a_base: false,
+                                        username: "",
+                                        password: None,
+                                        host: None,
+                                        port: None,
+                                        path: "/test/src/main.rs",
+                                        query: None,
+                                        fragment: None,
+                                    }: [
+                                        TextEdit {
+                                            range: Range {
+                                                start: Position {
+                                                    line: 2,
+                                                    character: 4,
+                                                },
+                                                end: Position {
+                                                    line: 2,
+                                                    character: 30,
+                                                },
                                             },
+                                            new_text: "",
                                         },
-                                        new_text: "",
-                                    },
-                                    TextEdit {
-                                        range: Range {
-                                            start: Position {
-                                                line: 3,
-                                                character: 4,
-                                            },
-                                            end: Position {
-                                                line: 3,
-                                                character: 5,
+                                        TextEdit {
+                                            range: Range {
+                                                start: Position {
+                                                    line: 3,
+                                                    character: 4,
+                                                },
+                                                end: Position {
+                                                    line: 3,
+                                                    character: 5,
+                                                },
                                             },
+                                            new_text: "(0..10).collect()",
                                         },
-                                        new_text: "(0..10).collect()",
-                                    },
-                                ],
-                            },
-                        ),
-                        document_changes: None,
-                        change_annotations: None,
-                    },
-                ),
-                is_preferred: Some(
-                    true,
-                ),
-                data: None,
+                                    ],
+                                },
+                            ),
+                            document_changes: None,
+                            change_annotations: None,
+                        },
+                    ),
+                    is_preferred: Some(
+                        true,
+                    ),
+                    data: None,
+                },
             },
-        ],
+        ),
     },
 ]