Skip to content

Commit bbaf4da

Browse files
Pass tidy checks
1 parent fdddd83 commit bbaf4da

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

crates/proc-macro-srv/build.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
//! Determine rustc version `proc-macro-srv` (and thus the sysroot ABI) is
2+
//! build with and make it accessible at runtime for ABI selection.
3+
14
use std::{env, fs::File, io::Write, path::PathBuf, process::Command};
25

36
fn main() {
4-
// Determine rustc version `proc-macro-srv` (and thus the sysroot ABI) is
5-
// build with and make it accessible at runtime for ABI selection.
6-
77
let mut path = PathBuf::from(env::var_os("OUT_DIR").unwrap());
88
path.push("rustc_version.rs");
99
let mut f = File::create(&path).unwrap();

crates/proc-macro-srv/src/abis/abi_sysroot/ra_server.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl server::FreeFunctions for RustAnalyzer {
8282
&mut self,
8383
s: &str,
8484
) -> Result<bridge::Literal<Self::Span, Self::Symbol>, ()> {
85-
// TODO: keep track of LitKind and Suffix
85+
// FIXME: keep track of LitKind and Suffix
8686
let symbol = SYMBOL_INTERNER.lock().unwrap().intern(s);
8787
Ok(bridge::Literal {
8888
kind: bridge::LitKind::Err,
@@ -391,8 +391,9 @@ impl server::MultiSpan for RustAnalyzer {
391391
}
392392

393393
impl server::Symbol for RustAnalyzer {
394-
fn normalize_and_validate_ident(&mut self, _string: &str) -> Result<Self::Symbol, ()> {
395-
todo!()
394+
fn normalize_and_validate_ident(&mut self, string: &str) -> Result<Self::Symbol, ()> {
395+
// FIXME: nfc-normalize and validate idents
396+
Ok(<Self as server::Server>::intern_symbol(string))
396397
}
397398
}
398399

crates/proc-macro-srv/src/abis/abi_sysroot/ra_server/symbol.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Symbol interner for proc-macro-srv
2+
13
use once_cell::sync::Lazy;
24
use std::{collections::HashMap, sync::Mutex};
35
use tt::SmolStr;

crates/proc-macro-srv/src/abis/abi_sysroot/ra_server/token_stream.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! TokenStream implementation used by sysroot ABI
2+
13
use tt::TokenTree;
24

35
#[derive(Debug, Default, Clone)]

0 commit comments

Comments
 (0)