mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Auto merge of #16311 - Veykril:rustc-deps, r=Veykril
internal: Remove `rustc_dependencies ` crate The crate serves no purpose really
This commit is contained in:
commit
25f71469f1
20 changed files with 68 additions and 125 deletions
|
@ -12,10 +12,9 @@ use hir_def::{
|
|||
LocalEnumVariantId, LocalFieldId, StructId,
|
||||
};
|
||||
use la_arena::{Idx, RawIdx};
|
||||
use rustc_dependencies::{
|
||||
abi::AddressSpace,
|
||||
index::{IndexSlice, IndexVec},
|
||||
};
|
||||
use rustc_abi::AddressSpace;
|
||||
use rustc_index::{IndexSlice, IndexVec};
|
||||
|
||||
use stdx::never;
|
||||
use triomphe::Arc;
|
||||
|
||||
|
@ -35,7 +34,7 @@ mod target;
|
|||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct RustcEnumVariantIdx(pub LocalEnumVariantId);
|
||||
|
||||
impl rustc_dependencies::index::Idx for RustcEnumVariantIdx {
|
||||
impl rustc_index::Idx for RustcEnumVariantIdx {
|
||||
fn new(idx: usize) -> Self {
|
||||
RustcEnumVariantIdx(Idx::from_raw(RawIdx::from(idx as u32)))
|
||||
}
|
||||
|
@ -54,7 +53,7 @@ impl RustcFieldIdx {
|
|||
}
|
||||
}
|
||||
|
||||
impl rustc_dependencies::index::Idx for RustcFieldIdx {
|
||||
impl rustc_index::Idx for RustcFieldIdx {
|
||||
fn new(idx: usize) -> Self {
|
||||
RustcFieldIdx(Idx::from_raw(RawIdx::from(idx as u32)))
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ use hir_def::{
|
|||
AdtId, EnumVariantId, LocalEnumVariantId, VariantId,
|
||||
};
|
||||
use la_arena::RawIdx;
|
||||
use rustc_dependencies::index::IndexVec;
|
||||
use rustc_index::IndexVec;
|
||||
use smallvec::SmallVec;
|
||||
use triomphe::Arc;
|
||||
|
||||
|
|
|
@ -3,10 +3,17 @@
|
|||
#![warn(rust_2018_idioms, unused_lifetimes)]
|
||||
#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
|
||||
|
||||
#[allow(unused)]
|
||||
macro_rules! eprintln {
|
||||
($($tt:tt)*) => { stdx::eprintln!($($tt)*) };
|
||||
}
|
||||
#[cfg(feature = "in-rust-tree")]
|
||||
extern crate rustc_index;
|
||||
|
||||
#[cfg(not(feature = "in-rust-tree"))]
|
||||
extern crate ra_ap_rustc_index as rustc_index;
|
||||
|
||||
#[cfg(feature = "in-rust-tree")]
|
||||
extern crate rustc_abi;
|
||||
|
||||
#[cfg(not(feature = "in-rust-tree"))]
|
||||
extern crate ra_ap_rustc_abi as rustc_abi;
|
||||
|
||||
mod builder;
|
||||
mod chalk_db;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue