mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Switch to in-tree rustc dependencies with a cfg flag
This commit is contained in:
parent
12e28c3575
commit
f4704bc8ae
18 changed files with 118 additions and 31 deletions
39
crates/rustc-dependencies/src/lib.rs
Normal file
39
crates/rustc-dependencies/src/lib.rs
Normal file
|
@ -0,0 +1,39 @@
|
|||
//! A wrapper around rustc internal crates, which enables switching between compiler provided
|
||||
//! ones and stable ones published in crates.io
|
||||
|
||||
#![cfg_attr(feature = "in-rust-tree", feature(rustc_private))]
|
||||
|
||||
#[cfg(feature = "in-rust-tree")]
|
||||
extern crate rustc_lexer;
|
||||
|
||||
#[cfg(feature = "in-rust-tree")]
|
||||
pub mod lexer {
|
||||
pub use ::rustc_lexer::*;
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "in-rust-tree"))]
|
||||
pub mod lexer {
|
||||
pub use ::ra_ap_rustc_lexer::*;
|
||||
}
|
||||
|
||||
#[cfg(feature = "in-rust-tree")]
|
||||
extern crate rustc_parse_format;
|
||||
|
||||
#[cfg(feature = "in-rust-tree")]
|
||||
pub mod parse_format {
|
||||
pub use ::rustc_parse_format::*;
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "in-rust-tree"))]
|
||||
pub mod parse_format {
|
||||
pub use ::ra_ap_rustc_parse_format::*;
|
||||
}
|
||||
|
||||
// Upstream broke this for us so we can't update it
|
||||
pub mod abi {
|
||||
pub use ::hkalbasi_rustc_ap_rustc_abi::*;
|
||||
}
|
||||
|
||||
pub mod index {
|
||||
pub use ::hkalbasi_rustc_ap_rustc_index::*;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue