mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-11 20:58:54 +00:00
switch to released id-arena
This commit is contained in:
parent
0cda188621
commit
70a7cb34ec
5 changed files with 8 additions and 19 deletions
10
Cargo.lock
generated
10
Cargo.lock
generated
|
@ -352,8 +352,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "id-arena"
|
||||
version = "1.0.2"
|
||||
source = "git+https://github.com/fitzgen/id-arena/?rev=43ecd67#43ecd67d81f707dfdc1b0d067b96c17f7a7ef9b8"
|
||||
version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "idna"
|
||||
|
@ -633,8 +633,6 @@ dependencies = [
|
|||
name = "ra_db"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"id-arena 1.0.2 (git+https://github.com/fitzgen/id-arena/?rev=43ecd67)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ra_editor 0.1.0",
|
||||
"ra_syntax 0.1.0",
|
||||
|
@ -660,7 +658,7 @@ dependencies = [
|
|||
name = "ra_hir"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"id-arena 1.0.2 (git+https://github.com/fitzgen/id-arena/?rev=43ecd67)",
|
||||
"id-arena 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ra_db 0.1.0",
|
||||
|
@ -1339,7 +1337,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
|
||||
"checksum heck 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea04fa3ead4e05e51a7c806fc07271fdbde4e246a6c6d1efd52e72230b771b82"
|
||||
"checksum humansize 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e"
|
||||
"checksum id-arena 1.0.2 (git+https://github.com/fitzgen/id-arena/?rev=43ecd67)" = "<none>"
|
||||
"checksum id-arena 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3a7250033feafee46a1cecd2c2616a64aec1d064f38c9ae2bdd297728542843e"
|
||||
"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e"
|
||||
"checksum im 12.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9c7f9bb8aee47fc16d535a705f7867a9fc83bb822e5e1043bb98e77ffeed3c"
|
||||
"checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d"
|
||||
|
|
|
@ -5,12 +5,10 @@ version = "0.1.0"
|
|||
authors = ["Aleksey Kladov <aleksey.kladov@gmail.com>"]
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.5"
|
||||
relative-path = "0.4.0"
|
||||
salsa = "0.8.0"
|
||||
rustc-hash = "1.0"
|
||||
parking_lot = "0.6.4"
|
||||
id-arena = { git = "https://github.com/fitzgen/id-arena/", rev = "43ecd67" }
|
||||
ra_syntax = { path = "../ra_syntax" }
|
||||
ra_editor = { path = "../ra_editor" }
|
||||
test_utils = { path = "../test_utils" }
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
//! ra_db defines basic database traits. Concrete DB is defined by ra_analysis.
|
||||
|
||||
extern crate ra_editor;
|
||||
extern crate ra_syntax;
|
||||
extern crate relative_path;
|
||||
extern crate rustc_hash;
|
||||
extern crate salsa;
|
||||
|
||||
mod syntax_ptr;
|
||||
mod file_resolver;
|
||||
mod input;
|
||||
|
|
|
@ -10,7 +10,7 @@ relative-path = "0.4.0"
|
|||
salsa = "0.8.0"
|
||||
rustc-hash = "1.0"
|
||||
parking_lot = "0.6.4"
|
||||
id-arena = { git = "https://github.com/fitzgen/id-arena/", rev = "43ecd67" }
|
||||
id-arena = "2.0"
|
||||
ra_syntax = { path = "../ra_syntax" }
|
||||
ra_editor = { path = "../ra_editor" }
|
||||
ra_db = { path = "../ra_db" }
|
||||
|
|
|
@ -46,10 +46,10 @@ pub(crate) struct ArenaBehavior<T> {
|
|||
|
||||
impl<T> id_arena::ArenaBehavior for ArenaBehavior<T> {
|
||||
type Id = Id<T>;
|
||||
fn new_arena_id() -> usize {
|
||||
fn new_arena_id() -> u32 {
|
||||
0
|
||||
}
|
||||
fn new_id(_arena_id: usize, index: usize) -> Id<T> {
|
||||
fn new_id(_arena_id: u32, index: usize) -> Id<T> {
|
||||
Id {
|
||||
idx: index as u32,
|
||||
_ty: PhantomData,
|
||||
|
@ -58,7 +58,7 @@ impl<T> id_arena::ArenaBehavior for ArenaBehavior<T> {
|
|||
fn index(id: Id<T>) -> usize {
|
||||
id.idx as usize
|
||||
}
|
||||
fn arena_id(_id: Id<T>) -> usize {
|
||||
fn arena_id(_id: Id<T>) -> u32 {
|
||||
0
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue