2022-07-23 22:48:20 +00:00
|
|
|
//! A standalone binary for `proc-macro-srv`.
|
2023-03-29 08:57:32 +00:00
|
|
|
//! Driver for proc macro server
|
2022-07-23 20:47:34 +00:00
|
|
|
|
2022-07-24 12:50:30 +00:00
|
|
|
fn main() -> std::io::Result<()> {
|
2022-07-25 14:22:39 +00:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-03-29 08:57:32 +00:00
|
|
|
proc_macro_srv_cli::run()
|
2022-07-23 20:47:34 +00:00
|
|
|
}
|