aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_proc_macro_srv/src/rustc_server.rs
diff options
context:
space:
mode:
authorrobojumper <[email protected]>2020-05-31 20:22:08 +0100
committerrobojumper <[email protected]>2020-05-31 20:22:08 +0100
commit09ded918c492821d5b7a69004738c38ff4a0624d (patch)
tree70637fcf86b85dcd1832a17007aed9ebdb24cfdf /crates/ra_proc_macro_srv/src/rustc_server.rs
parente4bdc1495142a7497a92388570defd519c22dcb1 (diff)
proc_macro: fix current nightly/future stable ABI incompatibility
Diffstat (limited to 'crates/ra_proc_macro_srv/src/rustc_server.rs')
-rw-r--r--crates/ra_proc_macro_srv/src/rustc_server.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/crates/ra_proc_macro_srv/src/rustc_server.rs b/crates/ra_proc_macro_srv/src/rustc_server.rs
index f481d70b2..cc32d5a6d 100644
--- a/crates/ra_proc_macro_srv/src/rustc_server.rs
+++ b/crates/ra_proc_macro_srv/src/rustc_server.rs
@@ -463,9 +463,16 @@ impl server::Ident for Rustc {
463} 463}
464 464
465impl server::Literal for Rustc { 465impl server::Literal for Rustc {
466 // FIXME(eddyb) `Literal` should not expose internal `Debug` impls. 466 fn debug_kind(&mut self, _literal: &Self::Literal) -> String {
467 fn debug(&mut self, literal: &Self::Literal) -> String { 467 // r-a: debug_kind and suffix are unsupported; corresponding client code has been changed to not call these.
468 format!("{:?}", literal) 468 // They must still be present to be ABI-compatible and work with upstream proc_macro.
469 "".to_owned()
470 }
471 fn symbol(&mut self, literal: &Self::Literal) -> String {
472 literal.text.to_string()
473 }
474 fn suffix(&mut self, _literal: &Self::Literal) -> Option<String> {
475 None
469 } 476 }
470 477
471 fn integer(&mut self, n: &str) -> Self::Literal { 478 fn integer(&mut self, n: &str) -> Self::Literal {