Skip to content

Commit

Permalink
Auto merge of rust-lang#15618 - shogo-nakano-desu:internal/port-anyma…
Browse files Browse the repository at this point in the history
…p, r=Veykril

internal: port anymap

## Description
- The anymap crate has been ported. During this process, unnecessary features for rust-analyzer have been removed.
- From the tests that were checking the existing licenses, the anymap license (`BlueOak-1.0.0 OR MIT OR Apache-2.0`) has been removed.

## Requests
- While porting the code this time, I have tried to respect the original author's intentions and have kept the comments/codes as much as possible. Please don't hesitate to tell me if you think the comments/codes also need to be appropriately modified.
- If there are any necessary changes regarding the licensing or anything else, please let me know so I can fix them.

## Issue
rust-lang/rust-analyzer#15500
  • Loading branch information
bors committed Oct 9, 2023
2 parents ab62c01 + 1e11a55 commit aaa1e8e
Show file tree
Hide file tree
Showing 7 changed files with 386 additions and 14 deletions.
7 changes: 0 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ lsp-server = { version = "0.7.4" }

# non-local crates
smallvec = { version = "1.10.0", features = [
"const_new",
"union",
"const_generics",
"const_new",
"union",
"const_generics",
] }
smol_str = "0.2.0"
nohash-hasher = "0.2.0"
Expand All @@ -103,5 +103,5 @@ serde_json = "1.0.96"
triomphe = { version = "0.1.8", default-features = false, features = ["std"] }
# can't upgrade due to dashmap depending on 0.12.3 currently
hashbrown = { version = "0.12.3", features = [
"inline-more",
"inline-more",
], default-features = false }
2 changes: 1 addition & 1 deletion crates/hir-def/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ rust-version.workspace = true
doctest = false

[dependencies]
anymap = "1.0.0-beta.2"
arrayvec = "0.7.2"
bitflags = "2.1.0"
cov-mark = "2.0.0-pre.1"
Expand Down Expand Up @@ -45,6 +44,7 @@ cfg.workspace = true
tt.workspace = true
limit.workspace = true


[dev-dependencies]
expect-test = "1.4.0"

Expand Down
2 changes: 1 addition & 1 deletion crates/hir-def/src/dyn_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ use std::{
ops::{Index, IndexMut},
};

use anymap::Map;
use rustc_hash::FxHashMap;
use stdx::anymap::Map;

pub struct Key<K, V, P = (K, V)> {
_phantom: PhantomData<(K, V, P)>,
Expand Down
1 change: 0 additions & 1 deletion crates/rust-analyzer/tests/slow-tests/tidy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ Apache-2.0 OR MIT
Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
Apache-2.0/MIT
BSD-3-Clause
BlueOak-1.0.0 OR MIT OR Apache-2.0
CC0-1.0
ISC
MIT
Expand Down
Loading

0 comments on commit aaa1e8e

Please sign in to comment.