mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
Pass tidy checks
This commit is contained in:
parent
fdddd83224
commit
bbaf4daca0
@ -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();
|
||||
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
//! Symbol interner for proc-macro-srv
|
||||
|
||||
use once_cell::sync::Lazy;
|
||||
use std::{collections::HashMap, sync::Mutex};
|
||||
use tt::SmolStr;
|
||||
|
@ -1,3 +1,5 @@
|
||||
//! TokenStream implementation used by sysroot ABI
|
||||
|
||||
use tt::TokenTree;
|
||||
|
||||
#[derive(Debug, Default, Clone)]
|
||||
|
Loading…
Reference in New Issue
Block a user