Pass tidy checks

This commit is contained in:
Amos Wenger 2022-07-21 13:37:41 +02:00
parent fdddd83224
commit bbaf4daca0
4 changed files with 11 additions and 6 deletions

View file

@ -1,9 +1,9 @@
//! Determine rustc version `proc-macro-srv` (and thus the sysroot ABI) is
//! build with and make it accessible at runtime for ABI selection.
use std::{env, fs::File, io::Write, path::PathBuf, process::Command};
fn main() {
// Determine rustc version `proc-macro-srv` (and thus the sysroot ABI) is
// build with and make it accessible at runtime for ABI selection.
let mut path = PathBuf::from(env::var_os("OUT_DIR").unwrap());
path.push("rustc_version.rs");
let mut f = File::create(&path).unwrap();

View file

@ -82,7 +82,7 @@ impl server::FreeFunctions for RustAnalyzer {
&mut self,
s: &str,
) -> Result<bridge::Literal<Self::Span, Self::Symbol>, ()> {
// TODO: keep track of LitKind and Suffix
// FIXME: keep track of LitKind and Suffix
let symbol = SYMBOL_INTERNER.lock().unwrap().intern(s);
Ok(bridge::Literal {
kind: bridge::LitKind::Err,
@ -391,8 +391,9 @@ impl server::MultiSpan for RustAnalyzer {
}
impl server::Symbol for RustAnalyzer {
fn normalize_and_validate_ident(&mut self, _string: &str) -> Result<Self::Symbol, ()> {
todo!()
fn normalize_and_validate_ident(&mut self, string: &str) -> Result<Self::Symbol, ()> {
// FIXME: nfc-normalize and validate idents
Ok(<Self as server::Server>::intern_symbol(string))
}
}

View file

@ -1,3 +1,5 @@
//! Symbol interner for proc-macro-srv
use once_cell::sync::Lazy;
use std::{collections::HashMap, sync::Mutex};
use tt::SmolStr;

View file

@ -1,3 +1,5 @@
//! TokenStream implementation used by sysroot ABI
use tt::TokenTree;
#[derive(Debug, Default, Clone)]