about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLukas Wirth <lukastw97@gmail.com>2022-08-25 21:06:35 +0200
committerLukas Wirth <lukastw97@gmail.com>2022-08-25 21:07:24 +0200
commit5b6aefe56532b1766e5fde76deeabf79e1ceb94e (patch)
tree0ebd5d6bb4c4ecd951bce479b39e9a73c2af2a7b
parent0c9375b829034b342c78b324b3aab3a497838055 (diff)
downloadrust-5b6aefe56532b1766e5fde76deeabf79e1ceb94e.tar.gz
rust-5b6aefe56532b1766e5fde76deeabf79e1ceb94e.zip
Update test fixtures
-rw-r--r--crates/project-model/src/tests.rs674
-rw-r--r--crates/stdx/src/hash.rs1
2 files changed, 338 insertions, 337 deletions
diff --git a/crates/project-model/src/tests.rs b/crates/project-model/src/tests.rs
index 8d0fa757c2e..9ccb6e9101e 100644
--- a/crates/project-model/src/tests.rs
+++ b/crates/project-model/src/tests.rs
@@ -185,10 +185,10 @@ fn cargo_hello_world_project_model_with_wildcard_overrides() {
                         is_proc_macro: false,
                     },
                     CrateId(
-                        2,
+                        1,
                     ): CrateData {
                         root_file_id: FileId(
-                            3,
+                            2,
                         ),
                         edition: Edition2018,
                         version: Some(
@@ -197,9 +197,9 @@ fn cargo_hello_world_project_model_with_wildcard_overrides() {
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "an_example",
+                                    "hello_world",
                                 ),
-                                canonical_name: "an-example",
+                                canonical_name: "hello-world",
                             },
                         ),
                         cfg_options: CfgOptions(
@@ -260,77 +260,85 @@ fn cargo_hello_world_project_model_with_wildcard_overrides() {
                         is_proc_macro: false,
                     },
                     CrateId(
-                        4,
+                        2,
                     ): CrateData {
                         root_file_id: FileId(
-                            5,
+                            3,
                         ),
-                        edition: Edition2015,
+                        edition: Edition2018,
                         version: Some(
-                            "0.2.98",
+                            "0.1.0",
                         ),
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "libc",
+                                    "an_example",
                                 ),
-                                canonical_name: "libc",
+                                canonical_name: "an-example",
                             },
                         ),
                         cfg_options: CfgOptions(
                             [
                                 "debug_assertions",
-                                "feature=default",
-                                "feature=std",
                             ],
                         ),
                         potential_cfg_options: CfgOptions(
                             [
                                 "debug_assertions",
-                                "feature=align",
-                                "feature=const-extern-fn",
-                                "feature=default",
-                                "feature=extra_traits",
-                                "feature=rustc-dep-of-std",
-                                "feature=std",
-                                "feature=use_std",
                             ],
                         ),
                         env: Env {
                             entries: {
                                 "CARGO_PKG_LICENSE": "",
                                 "CARGO_PKG_VERSION_MAJOR": "0",
-                                "CARGO_MANIFEST_DIR": "$ROOT$.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.98",
-                                "CARGO_PKG_VERSION": "0.2.98",
+                                "CARGO_MANIFEST_DIR": "$ROOT$hello-world",
+                                "CARGO_PKG_VERSION": "0.1.0",
                                 "CARGO_PKG_AUTHORS": "",
-                                "CARGO_CRATE_NAME": "libc",
+                                "CARGO_CRATE_NAME": "hello_world",
                                 "CARGO_PKG_LICENSE_FILE": "",
                                 "CARGO_PKG_HOMEPAGE": "",
                                 "CARGO_PKG_DESCRIPTION": "",
-                                "CARGO_PKG_NAME": "libc",
-                                "CARGO_PKG_VERSION_PATCH": "98",
+                                "CARGO_PKG_NAME": "hello-world",
+                                "CARGO_PKG_VERSION_PATCH": "0",
                                 "CARGO": "cargo",
                                 "CARGO_PKG_REPOSITORY": "",
-                                "CARGO_PKG_VERSION_MINOR": "2",
+                                "CARGO_PKG_VERSION_MINOR": "1",
                                 "CARGO_PKG_VERSION_PRE": "",
                             },
                         },
-                        dependencies: [],
+                        dependencies: [
+                            Dependency {
+                                crate_id: CrateId(
+                                    0,
+                                ),
+                                name: CrateName(
+                                    "hello_world",
+                                ),
+                                prelude: true,
+                            },
+                            Dependency {
+                                crate_id: CrateId(
+                                    4,
+                                ),
+                                name: CrateName(
+                                    "libc",
+                                ),
+                                prelude: true,
+                            },
+                        ],
                         proc_macro: Err(
                             "crate has not (yet) been built",
                         ),
                         origin: CratesIo {
-                            repo: Some(
-                                "https://github.com/rust-lang/libc",
-                            ),
+                            repo: None,
                         },
                         is_proc_macro: false,
                     },
                     CrateId(
-                        1,
+                        3,
                     ): CrateData {
                         root_file_id: FileId(
-                            2,
+                            4,
                         ),
                         edition: Edition2018,
                         version: Some(
@@ -339,9 +347,9 @@ fn cargo_hello_world_project_model_with_wildcard_overrides() {
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "hello_world",
+                                    "it",
                                 ),
-                                canonical_name: "hello-world",
+                                canonical_name: "it",
                             },
                         ),
                         cfg_options: CfgOptions(
@@ -402,77 +410,69 @@ fn cargo_hello_world_project_model_with_wildcard_overrides() {
                         is_proc_macro: false,
                     },
                     CrateId(
-                        3,
+                        4,
                     ): CrateData {
                         root_file_id: FileId(
-                            4,
+                            5,
                         ),
-                        edition: Edition2018,
+                        edition: Edition2015,
                         version: Some(
-                            "0.1.0",
+                            "0.2.98",
                         ),
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "it",
+                                    "libc",
                                 ),
-                                canonical_name: "it",
+                                canonical_name: "libc",
                             },
                         ),
                         cfg_options: CfgOptions(
                             [
                                 "debug_assertions",
+                                "feature=default",
+                                "feature=std",
                             ],
                         ),
                         potential_cfg_options: CfgOptions(
                             [
                                 "debug_assertions",
+                                "feature=align",
+                                "feature=const-extern-fn",
+                                "feature=default",
+                                "feature=extra_traits",
+                                "feature=rustc-dep-of-std",
+                                "feature=std",
+                                "feature=use_std",
                             ],
                         ),
                         env: Env {
                             entries: {
                                 "CARGO_PKG_LICENSE": "",
                                 "CARGO_PKG_VERSION_MAJOR": "0",
-                                "CARGO_MANIFEST_DIR": "$ROOT$hello-world",
-                                "CARGO_PKG_VERSION": "0.1.0",
+                                "CARGO_MANIFEST_DIR": "$ROOT$.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.98",
+                                "CARGO_PKG_VERSION": "0.2.98",
                                 "CARGO_PKG_AUTHORS": "",
-                                "CARGO_CRATE_NAME": "hello_world",
+                                "CARGO_CRATE_NAME": "libc",
                                 "CARGO_PKG_LICENSE_FILE": "",
                                 "CARGO_PKG_HOMEPAGE": "",
                                 "CARGO_PKG_DESCRIPTION": "",
-                                "CARGO_PKG_NAME": "hello-world",
-                                "CARGO_PKG_VERSION_PATCH": "0",
+                                "CARGO_PKG_NAME": "libc",
+                                "CARGO_PKG_VERSION_PATCH": "98",
                                 "CARGO": "cargo",
                                 "CARGO_PKG_REPOSITORY": "",
-                                "CARGO_PKG_VERSION_MINOR": "1",
+                                "CARGO_PKG_VERSION_MINOR": "2",
                                 "CARGO_PKG_VERSION_PRE": "",
                             },
                         },
-                        dependencies: [
-                            Dependency {
-                                crate_id: CrateId(
-                                    0,
-                                ),
-                                name: CrateName(
-                                    "hello_world",
-                                ),
-                                prelude: true,
-                            },
-                            Dependency {
-                                crate_id: CrateId(
-                                    4,
-                                ),
-                                name: CrateName(
-                                    "libc",
-                                ),
-                                prelude: true,
-                            },
-                        ],
+                        dependencies: [],
                         proc_macro: Err(
                             "crate has not (yet) been built",
                         ),
                         origin: CratesIo {
-                            repo: None,
+                            repo: Some(
+                                "https://github.com/rust-lang/libc",
+                            ),
                         },
                         is_proc_macro: false,
                     },
@@ -567,10 +567,10 @@ fn cargo_hello_world_project_model_with_selective_overrides() {
                         is_proc_macro: false,
                     },
                     CrateId(
-                        2,
+                        1,
                     ): CrateData {
                         root_file_id: FileId(
-                            3,
+                            2,
                         ),
                         edition: Edition2018,
                         version: Some(
@@ -579,9 +579,9 @@ fn cargo_hello_world_project_model_with_selective_overrides() {
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "an_example",
+                                    "hello_world",
                                 ),
-                                canonical_name: "an-example",
+                                canonical_name: "hello-world",
                             },
                         ),
                         cfg_options: CfgOptions(
@@ -644,77 +644,87 @@ fn cargo_hello_world_project_model_with_selective_overrides() {
                         is_proc_macro: false,
                     },
                     CrateId(
-                        4,
+                        2,
                     ): CrateData {
                         root_file_id: FileId(
-                            5,
+                            3,
                         ),
-                        edition: Edition2015,
+                        edition: Edition2018,
                         version: Some(
-                            "0.2.98",
+                            "0.1.0",
                         ),
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "libc",
+                                    "an_example",
                                 ),
-                                canonical_name: "libc",
+                                canonical_name: "an-example",
                             },
                         ),
                         cfg_options: CfgOptions(
                             [
                                 "debug_assertions",
-                                "feature=default",
-                                "feature=std",
+                                "test",
                             ],
                         ),
                         potential_cfg_options: CfgOptions(
                             [
                                 "debug_assertions",
-                                "feature=align",
-                                "feature=const-extern-fn",
-                                "feature=default",
-                                "feature=extra_traits",
-                                "feature=rustc-dep-of-std",
-                                "feature=std",
-                                "feature=use_std",
+                                "test",
                             ],
                         ),
                         env: Env {
                             entries: {
                                 "CARGO_PKG_LICENSE": "",
                                 "CARGO_PKG_VERSION_MAJOR": "0",
-                                "CARGO_MANIFEST_DIR": "$ROOT$.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.98",
-                                "CARGO_PKG_VERSION": "0.2.98",
+                                "CARGO_MANIFEST_DIR": "$ROOT$hello-world",
+                                "CARGO_PKG_VERSION": "0.1.0",
                                 "CARGO_PKG_AUTHORS": "",
-                                "CARGO_CRATE_NAME": "libc",
+                                "CARGO_CRATE_NAME": "hello_world",
                                 "CARGO_PKG_LICENSE_FILE": "",
                                 "CARGO_PKG_HOMEPAGE": "",
                                 "CARGO_PKG_DESCRIPTION": "",
-                                "CARGO_PKG_NAME": "libc",
-                                "CARGO_PKG_VERSION_PATCH": "98",
+                                "CARGO_PKG_NAME": "hello-world",
+                                "CARGO_PKG_VERSION_PATCH": "0",
                                 "CARGO": "cargo",
                                 "CARGO_PKG_REPOSITORY": "",
-                                "CARGO_PKG_VERSION_MINOR": "2",
+                                "CARGO_PKG_VERSION_MINOR": "1",
                                 "CARGO_PKG_VERSION_PRE": "",
                             },
                         },
-                        dependencies: [],
+                        dependencies: [
+                            Dependency {
+                                crate_id: CrateId(
+                                    0,
+                                ),
+                                name: CrateName(
+                                    "hello_world",
+                                ),
+                                prelude: true,
+                            },
+                            Dependency {
+                                crate_id: CrateId(
+                                    4,
+                                ),
+                                name: CrateName(
+                                    "libc",
+                                ),
+                                prelude: true,
+                            },
+                        ],
                         proc_macro: Err(
                             "crate has not (yet) been built",
                         ),
                         origin: CratesIo {
-                            repo: Some(
-                                "https://github.com/rust-lang/libc",
-                            ),
+                            repo: None,
                         },
                         is_proc_macro: false,
                     },
                     CrateId(
-                        1,
+                        3,
                     ): CrateData {
                         root_file_id: FileId(
-                            2,
+                            4,
                         ),
                         edition: Edition2018,
                         version: Some(
@@ -723,9 +733,9 @@ fn cargo_hello_world_project_model_with_selective_overrides() {
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "hello_world",
+                                    "it",
                                 ),
-                                canonical_name: "hello-world",
+                                canonical_name: "it",
                             },
                         ),
                         cfg_options: CfgOptions(
@@ -788,79 +798,69 @@ fn cargo_hello_world_project_model_with_selective_overrides() {
                         is_proc_macro: false,
                     },
                     CrateId(
-                        3,
+                        4,
                     ): CrateData {
                         root_file_id: FileId(
-                            4,
+                            5,
                         ),
-                        edition: Edition2018,
+                        edition: Edition2015,
                         version: Some(
-                            "0.1.0",
+                            "0.2.98",
                         ),
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "it",
+                                    "libc",
                                 ),
-                                canonical_name: "it",
+                                canonical_name: "libc",
                             },
                         ),
                         cfg_options: CfgOptions(
                             [
                                 "debug_assertions",
-                                "test",
+                                "feature=default",
+                                "feature=std",
                             ],
                         ),
                         potential_cfg_options: CfgOptions(
                             [
                                 "debug_assertions",
-                                "test",
+                                "feature=align",
+                                "feature=const-extern-fn",
+                                "feature=default",
+                                "feature=extra_traits",
+                                "feature=rustc-dep-of-std",
+                                "feature=std",
+                                "feature=use_std",
                             ],
                         ),
                         env: Env {
                             entries: {
                                 "CARGO_PKG_LICENSE": "",
                                 "CARGO_PKG_VERSION_MAJOR": "0",
-                                "CARGO_MANIFEST_DIR": "$ROOT$hello-world",
-                                "CARGO_PKG_VERSION": "0.1.0",
+                                "CARGO_MANIFEST_DIR": "$ROOT$.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.98",
+                                "CARGO_PKG_VERSION": "0.2.98",
                                 "CARGO_PKG_AUTHORS": "",
-                                "CARGO_CRATE_NAME": "hello_world",
+                                "CARGO_CRATE_NAME": "libc",
                                 "CARGO_PKG_LICENSE_FILE": "",
                                 "CARGO_PKG_HOMEPAGE": "",
                                 "CARGO_PKG_DESCRIPTION": "",
-                                "CARGO_PKG_NAME": "hello-world",
-                                "CARGO_PKG_VERSION_PATCH": "0",
+                                "CARGO_PKG_NAME": "libc",
+                                "CARGO_PKG_VERSION_PATCH": "98",
                                 "CARGO": "cargo",
                                 "CARGO_PKG_REPOSITORY": "",
-                                "CARGO_PKG_VERSION_MINOR": "1",
+                                "CARGO_PKG_VERSION_MINOR": "2",
                                 "CARGO_PKG_VERSION_PRE": "",
                             },
                         },
-                        dependencies: [
-                            Dependency {
-                                crate_id: CrateId(
-                                    0,
-                                ),
-                                name: CrateName(
-                                    "hello_world",
-                                ),
-                                prelude: true,
-                            },
-                            Dependency {
-                                crate_id: CrateId(
-                                    4,
-                                ),
-                                name: CrateName(
-                                    "libc",
-                                ),
-                                prelude: true,
-                            },
-                        ],
+                        dependencies: [],
                         proc_macro: Err(
                             "crate has not (yet) been built",
                         ),
                         origin: CratesIo {
-                            repo: None,
+                            repo: Some(
+                                "https://github.com/rust-lang/libc",
+                            ),
                         },
                         is_proc_macro: false,
                     },
@@ -946,10 +946,10 @@ fn cargo_hello_world_project_model() {
                         is_proc_macro: false,
                     },
                     CrateId(
-                        2,
+                        1,
                     ): CrateData {
                         root_file_id: FileId(
-                            3,
+                            2,
                         ),
                         edition: Edition2018,
                         version: Some(
@@ -958,9 +958,9 @@ fn cargo_hello_world_project_model() {
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "an_example",
+                                    "hello_world",
                                 ),
-                                canonical_name: "an-example",
+                                canonical_name: "hello-world",
                             },
                         ),
                         cfg_options: CfgOptions(
@@ -1023,77 +1023,87 @@ fn cargo_hello_world_project_model() {
                         is_proc_macro: false,
                     },
                     CrateId(
-                        4,
+                        2,
                     ): CrateData {
                         root_file_id: FileId(
-                            5,
+                            3,
                         ),
-                        edition: Edition2015,
+                        edition: Edition2018,
                         version: Some(
-                            "0.2.98",
+                            "0.1.0",
                         ),
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "libc",
+                                    "an_example",
                                 ),
-                                canonical_name: "libc",
+                                canonical_name: "an-example",
                             },
                         ),
                         cfg_options: CfgOptions(
                             [
                                 "debug_assertions",
-                                "feature=default",
-                                "feature=std",
+                                "test",
                             ],
                         ),
                         potential_cfg_options: CfgOptions(
                             [
                                 "debug_assertions",
-                                "feature=align",
-                                "feature=const-extern-fn",
-                                "feature=default",
-                                "feature=extra_traits",
-                                "feature=rustc-dep-of-std",
-                                "feature=std",
-                                "feature=use_std",
+                                "test",
                             ],
                         ),
                         env: Env {
                             entries: {
                                 "CARGO_PKG_LICENSE": "",
                                 "CARGO_PKG_VERSION_MAJOR": "0",
-                                "CARGO_MANIFEST_DIR": "$ROOT$.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.98",
-                                "CARGO_PKG_VERSION": "0.2.98",
+                                "CARGO_MANIFEST_DIR": "$ROOT$hello-world",
+                                "CARGO_PKG_VERSION": "0.1.0",
                                 "CARGO_PKG_AUTHORS": "",
-                                "CARGO_CRATE_NAME": "libc",
+                                "CARGO_CRATE_NAME": "hello_world",
                                 "CARGO_PKG_LICENSE_FILE": "",
                                 "CARGO_PKG_HOMEPAGE": "",
                                 "CARGO_PKG_DESCRIPTION": "",
-                                "CARGO_PKG_NAME": "libc",
-                                "CARGO_PKG_VERSION_PATCH": "98",
+                                "CARGO_PKG_NAME": "hello-world",
+                                "CARGO_PKG_VERSION_PATCH": "0",
                                 "CARGO": "cargo",
                                 "CARGO_PKG_REPOSITORY": "",
-                                "CARGO_PKG_VERSION_MINOR": "2",
+                                "CARGO_PKG_VERSION_MINOR": "1",
                                 "CARGO_PKG_VERSION_PRE": "",
                             },
                         },
-                        dependencies: [],
+                        dependencies: [
+                            Dependency {
+                                crate_id: CrateId(
+                                    0,
+                                ),
+                                name: CrateName(
+                                    "hello_world",
+                                ),
+                                prelude: true,
+                            },
+                            Dependency {
+                                crate_id: CrateId(
+                                    4,
+                                ),
+                                name: CrateName(
+                                    "libc",
+                                ),
+                                prelude: true,
+                            },
+                        ],
                         proc_macro: Err(
                             "crate has not (yet) been built",
                         ),
                         origin: CratesIo {
-                            repo: Some(
-                                "https://github.com/rust-lang/libc",
-                            ),
+                            repo: None,
                         },
                         is_proc_macro: false,
                     },
                     CrateId(
-                        1,
+                        3,
                     ): CrateData {
                         root_file_id: FileId(
-                            2,
+                            4,
                         ),
                         edition: Edition2018,
                         version: Some(
@@ -1102,9 +1112,9 @@ fn cargo_hello_world_project_model() {
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "hello_world",
+                                    "it",
                                 ),
-                                canonical_name: "hello-world",
+                                canonical_name: "it",
                             },
                         ),
                         cfg_options: CfgOptions(
@@ -1167,79 +1177,69 @@ fn cargo_hello_world_project_model() {
                         is_proc_macro: false,
                     },
                     CrateId(
-                        3,
+                        4,
                     ): CrateData {
                         root_file_id: FileId(
-                            4,
+                            5,
                         ),
-                        edition: Edition2018,
+                        edition: Edition2015,
                         version: Some(
-                            "0.1.0",
+                            "0.2.98",
                         ),
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "it",
+                                    "libc",
                                 ),
-                                canonical_name: "it",
+                                canonical_name: "libc",
                             },
                         ),
                         cfg_options: CfgOptions(
                             [
                                 "debug_assertions",
-                                "test",
+                                "feature=default",
+                                "feature=std",
                             ],
                         ),
                         potential_cfg_options: CfgOptions(
                             [
                                 "debug_assertions",
-                                "test",
+                                "feature=align",
+                                "feature=const-extern-fn",
+                                "feature=default",
+                                "feature=extra_traits",
+                                "feature=rustc-dep-of-std",
+                                "feature=std",
+                                "feature=use_std",
                             ],
                         ),
                         env: Env {
                             entries: {
                                 "CARGO_PKG_LICENSE": "",
                                 "CARGO_PKG_VERSION_MAJOR": "0",
-                                "CARGO_MANIFEST_DIR": "$ROOT$hello-world",
-                                "CARGO_PKG_VERSION": "0.1.0",
+                                "CARGO_MANIFEST_DIR": "$ROOT$.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.98",
+                                "CARGO_PKG_VERSION": "0.2.98",
                                 "CARGO_PKG_AUTHORS": "",
-                                "CARGO_CRATE_NAME": "hello_world",
+                                "CARGO_CRATE_NAME": "libc",
                                 "CARGO_PKG_LICENSE_FILE": "",
                                 "CARGO_PKG_HOMEPAGE": "",
                                 "CARGO_PKG_DESCRIPTION": "",
-                                "CARGO_PKG_NAME": "hello-world",
-                                "CARGO_PKG_VERSION_PATCH": "0",
+                                "CARGO_PKG_NAME": "libc",
+                                "CARGO_PKG_VERSION_PATCH": "98",
                                 "CARGO": "cargo",
                                 "CARGO_PKG_REPOSITORY": "",
-                                "CARGO_PKG_VERSION_MINOR": "1",
+                                "CARGO_PKG_VERSION_MINOR": "2",
                                 "CARGO_PKG_VERSION_PRE": "",
                             },
                         },
-                        dependencies: [
-                            Dependency {
-                                crate_id: CrateId(
-                                    0,
-                                ),
-                                name: CrateName(
-                                    "hello_world",
-                                ),
-                                prelude: true,
-                            },
-                            Dependency {
-                                crate_id: CrateId(
-                                    4,
-                                ),
-                                name: CrateName(
-                                    "libc",
-                                ),
-                                prelude: true,
-                            },
-                        ],
+                        dependencies: [],
                         proc_macro: Err(
                             "crate has not (yet) been built",
                         ),
                         origin: CratesIo {
-                            repo: None,
+                            repo: Some(
+                                "https://github.com/rust-lang/libc",
+                            ),
                         },
                         is_proc_macro: false,
                     },
@@ -1301,19 +1301,53 @@ fn rust_project_hello_world_project_model() {
                         is_proc_macro: false,
                     },
                     CrateId(
-                        10,
+                        1,
                     ): CrateData {
                         root_file_id: FileId(
-                            11,
+                            2,
                         ),
                         edition: Edition2018,
                         version: None,
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "unwind",
+                                    "core",
                                 ),
-                                canonical_name: "unwind",
+                                canonical_name: "core",
+                            },
+                        ),
+                        cfg_options: CfgOptions(
+                            [],
+                        ),
+                        potential_cfg_options: CfgOptions(
+                            [],
+                        ),
+                        env: Env {
+                            entries: {},
+                        },
+                        dependencies: [],
+                        proc_macro: Err(
+                            "no proc macro loaded for sysroot crate",
+                        ),
+                        origin: Lang(
+                            Core,
+                        ),
+                        is_proc_macro: false,
+                    },
+                    CrateId(
+                        2,
+                    ): CrateData {
+                        root_file_id: FileId(
+                            3,
+                        ),
+                        edition: Edition2018,
+                        version: None,
+                        display_name: Some(
+                            CrateDisplayName {
+                                crate_name: CrateName(
+                                    "panic_abort",
+                                ),
+                                canonical_name: "panic_abort",
                             },
                         ),
                         cfg_options: CfgOptions(
@@ -1335,19 +1369,19 @@ fn rust_project_hello_world_project_model() {
                         is_proc_macro: false,
                     },
                     CrateId(
-                        7,
+                        3,
                     ): CrateData {
                         root_file_id: FileId(
-                            8,
+                            4,
                         ),
                         edition: Edition2018,
                         version: None,
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "std_detect",
+                                    "panic_unwind",
                                 ),
-                                canonical_name: "std_detect",
+                                canonical_name: "panic_unwind",
                             },
                         ),
                         cfg_options: CfgOptions(
@@ -1413,19 +1447,19 @@ fn rust_project_hello_world_project_model() {
                         is_proc_macro: false,
                     },
                     CrateId(
-                        1,
+                        5,
                     ): CrateData {
                         root_file_id: FileId(
-                            2,
+                            6,
                         ),
                         edition: Edition2018,
                         version: None,
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "core",
+                                    "profiler_builtins",
                                 ),
-                                canonical_name: "core",
+                                canonical_name: "profiler_builtins",
                             },
                         ),
                         cfg_options: CfgOptions(
@@ -1442,24 +1476,24 @@ fn rust_project_hello_world_project_model() {
                             "no proc macro loaded for sysroot crate",
                         ),
                         origin: Lang(
-                            Core,
+                            Other,
                         ),
                         is_proc_macro: false,
                     },
                     CrateId(
-                        11,
+                        6,
                     ): CrateData {
                         root_file_id: FileId(
-                            12,
+                            7,
                         ),
                         edition: Edition2018,
                         version: None,
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "hello_world",
+                                    "std",
                                 ),
-                                canonical_name: "hello_world",
+                                canonical_name: "std",
                             },
                         ),
                         cfg_options: CfgOptions(
@@ -1474,6 +1508,15 @@ fn rust_project_hello_world_project_model() {
                         dependencies: [
                             Dependency {
                                 crate_id: CrateId(
+                                    0,
+                                ),
+                                name: CrateName(
+                                    "alloc",
+                                ),
+                                prelude: true,
+                            },
+                            Dependency {
+                                crate_id: CrateId(
                                     1,
                                 ),
                                 name: CrateName(
@@ -1483,19 +1526,46 @@ fn rust_project_hello_world_project_model() {
                             },
                             Dependency {
                                 crate_id: CrateId(
-                                    0,
+                                    2,
                                 ),
                                 name: CrateName(
-                                    "alloc",
+                                    "panic_abort",
                                 ),
                                 prelude: true,
                             },
                             Dependency {
                                 crate_id: CrateId(
-                                    6,
+                                    3,
                                 ),
                                 name: CrateName(
-                                    "std",
+                                    "panic_unwind",
+                                ),
+                                prelude: true,
+                            },
+                            Dependency {
+                                crate_id: CrateId(
+                                    5,
+                                ),
+                                name: CrateName(
+                                    "profiler_builtins",
+                                ),
+                                prelude: true,
+                            },
+                            Dependency {
+                                crate_id: CrateId(
+                                    7,
+                                ),
+                                name: CrateName(
+                                    "std_detect",
+                                ),
+                                prelude: true,
+                            },
+                            Dependency {
+                                crate_id: CrateId(
+                                    8,
+                                ),
+                                name: CrateName(
+                                    "term",
                                 ),
                                 prelude: true,
                             },
@@ -1506,31 +1576,40 @@ fn rust_project_hello_world_project_model() {
                                 name: CrateName(
                                     "test",
                                 ),
-                                prelude: false,
+                                prelude: true,
+                            },
+                            Dependency {
+                                crate_id: CrateId(
+                                    10,
+                                ),
+                                name: CrateName(
+                                    "unwind",
+                                ),
+                                prelude: true,
                             },
                         ],
                         proc_macro: Err(
-                            "no proc macro dylib present",
+                            "no proc macro loaded for sysroot crate",
+                        ),
+                        origin: Lang(
+                            Std,
                         ),
-                        origin: CratesIo {
-                            repo: None,
-                        },
                         is_proc_macro: false,
                     },
                     CrateId(
-                        8,
+                        7,
                     ): CrateData {
                         root_file_id: FileId(
-                            9,
+                            8,
                         ),
                         edition: Edition2018,
                         version: None,
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "term",
+                                    "std_detect",
                                 ),
-                                canonical_name: "term",
+                                canonical_name: "std_detect",
                             },
                         ),
                         cfg_options: CfgOptions(
@@ -1552,19 +1631,19 @@ fn rust_project_hello_world_project_model() {
                         is_proc_macro: false,
                     },
                     CrateId(
-                        5,
+                        8,
                     ): CrateData {
                         root_file_id: FileId(
-                            6,
+                            9,
                         ),
                         edition: Edition2018,
                         version: None,
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "profiler_builtins",
+                                    "term",
                                 ),
-                                canonical_name: "profiler_builtins",
+                                canonical_name: "term",
                             },
                         ),
                         cfg_options: CfgOptions(
@@ -1586,19 +1665,19 @@ fn rust_project_hello_world_project_model() {
                         is_proc_macro: false,
                     },
                     CrateId(
-                        2,
+                        9,
                     ): CrateData {
                         root_file_id: FileId(
-                            3,
+                            10,
                         ),
                         edition: Edition2018,
                         version: None,
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "panic_abort",
+                                    "test",
                                 ),
-                                canonical_name: "panic_abort",
+                                canonical_name: "test",
                             },
                         ),
                         cfg_options: CfgOptions(
@@ -1615,24 +1694,24 @@ fn rust_project_hello_world_project_model() {
                             "no proc macro loaded for sysroot crate",
                         ),
                         origin: Lang(
-                            Other,
+                            Test,
                         ),
                         is_proc_macro: false,
                     },
                     CrateId(
-                        9,
+                        10,
                     ): CrateData {
                         root_file_id: FileId(
-                            10,
+                            11,
                         ),
                         edition: Edition2018,
                         version: None,
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "test",
+                                    "unwind",
                                 ),
-                                canonical_name: "test",
+                                canonical_name: "unwind",
                             },
                         ),
                         cfg_options: CfgOptions(
@@ -1649,24 +1728,24 @@ fn rust_project_hello_world_project_model() {
                             "no proc macro loaded for sysroot crate",
                         ),
                         origin: Lang(
-                            Test,
+                            Other,
                         ),
                         is_proc_macro: false,
                     },
                     CrateId(
-                        6,
+                        11,
                     ): CrateData {
                         root_file_id: FileId(
-                            7,
+                            12,
                         ),
                         edition: Edition2018,
                         version: None,
                         display_name: Some(
                             CrateDisplayName {
                                 crate_name: CrateName(
-                                    "std",
+                                    "hello_world",
                                 ),
-                                canonical_name: "std",
+                                canonical_name: "hello_world",
                             },
                         ),
                         cfg_options: CfgOptions(
@@ -1681,15 +1760,6 @@ fn rust_project_hello_world_project_model() {
                         dependencies: [
                             Dependency {
                                 crate_id: CrateId(
-                                    0,
-                                ),
-                                name: CrateName(
-                                    "alloc",
-                                ),
-                                prelude: true,
-                            },
-                            Dependency {
-                                crate_id: CrateId(
                                     1,
                                 ),
                                 name: CrateName(
@@ -1699,46 +1769,19 @@ fn rust_project_hello_world_project_model() {
                             },
                             Dependency {
                                 crate_id: CrateId(
-                                    2,
-                                ),
-                                name: CrateName(
-                                    "panic_abort",
-                                ),
-                                prelude: true,
-                            },
-                            Dependency {
-                                crate_id: CrateId(
-                                    3,
-                                ),
-                                name: CrateName(
-                                    "panic_unwind",
-                                ),
-                                prelude: true,
-                            },
-                            Dependency {
-                                crate_id: CrateId(
-                                    5,
-                                ),
-                                name: CrateName(
-                                    "profiler_builtins",
-                                ),
-                                prelude: true,
-                            },
-                            Dependency {
-                                crate_id: CrateId(
-                                    7,
+                                    0,
                                 ),
                                 name: CrateName(
-                                    "std_detect",
+                                    "alloc",
                                 ),
                                 prelude: true,
                             },
                             Dependency {
                                 crate_id: CrateId(
-                                    8,
+                                    6,
                                 ),
                                 name: CrateName(
-                                    "term",
+                                    "std",
                                 ),
                                 prelude: true,
                             },
@@ -1749,58 +1792,15 @@ fn rust_project_hello_world_project_model() {
                                 name: CrateName(
                                     "test",
                                 ),
-                                prelude: true,
-                            },
-                            Dependency {
-                                crate_id: CrateId(
-                                    10,
-                                ),
-                                name: CrateName(
-                                    "unwind",
-                                ),
-                                prelude: true,
+                                prelude: false,
                             },
                         ],
                         proc_macro: Err(
-                            "no proc macro loaded for sysroot crate",
-                        ),
-                        origin: Lang(
-                            Std,
-                        ),
-                        is_proc_macro: false,
-                    },
-                    CrateId(
-                        3,
-                    ): CrateData {
-                        root_file_id: FileId(
-                            4,
-                        ),
-                        edition: Edition2018,
-                        version: None,
-                        display_name: Some(
-                            CrateDisplayName {
-                                crate_name: CrateName(
-                                    "panic_unwind",
-                                ),
-                                canonical_name: "panic_unwind",
-                            },
-                        ),
-                        cfg_options: CfgOptions(
-                            [],
-                        ),
-                        potential_cfg_options: CfgOptions(
-                            [],
+                            "no proc macro dylib present",
                         ),
-                        env: Env {
-                            entries: {},
+                        origin: CratesIo {
+                            repo: None,
                         },
-                        dependencies: [],
-                        proc_macro: Err(
-                            "no proc macro loaded for sysroot crate",
-                        ),
-                        origin: Lang(
-                            Other,
-                        ),
                         is_proc_macro: false,
                     },
                 },
diff --git a/crates/stdx/src/hash.rs b/crates/stdx/src/hash.rs
index 1f04fce1488..9909d71bdf0 100644
--- a/crates/stdx/src/hash.rs
+++ b/crates/stdx/src/hash.rs
@@ -1,3 +1,4 @@
+//! A none hashing [`Hasher`] implementation.
 use std::{
     hash::{BuildHasher, Hasher},
     marker::PhantomData,