mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-07 10:48:49 +00:00
18 lines
658 B
Rust
18 lines
658 B
Rust
//! A standalone binary for `proc-macro-srv`.
|
|
//! Driver for proc macro server
|
|
|
|
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);
|
|
}
|
|
}
|
|
|
|
proc_macro_srv_cli::run()
|
|
}
|