mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Merge commit 'e36a20c24f
' into ra-sync-and-pms-component
This commit is contained in:
parent
dfe84494c1
commit
a1f1b95d00
48 changed files with 627 additions and 213 deletions
19
crates/proc-macro-srv-cli/src/main.rs
Normal file
19
crates/proc-macro-srv-cli/src/main.rs
Normal file
|
@ -0,0 +1,19 @@
|
|||
//! A standalone binary for `proc-macro-srv`.
|
||||
|
||||
use proc_macro_srv::cli;
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
let v = std::env::var("RUST_ANALYZER_INTERNALS_DO_NOT_USE");
|
||||
match v.as_deref() {
|
||||
Ok("this is unstable") => {
|
||||
// very well, if you must
|
||||
}
|
||||
_ => {
|
||||
eprintln!("If you're rust-analyzer, you can use this tool by exporting RUST_ANALYZER_INTERNALS_DO_NOT_USE='this is unstable'.");
|
||||
eprintln!("If not, you probably shouldn't use this tool. But do what you want: I'm an error message, not a cop.");
|
||||
std::process::exit(122);
|
||||
}
|
||||
}
|
||||
|
||||
cli::run()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue