mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Add track_env_var to the proc macro server
This commit is contained in:
parent
e5f252ade7
commit
3d169bd3f4
6 changed files with 40 additions and 1 deletions
|
@ -242,6 +242,8 @@ impl TokenStreamBuilder {
|
|||
}
|
||||
}
|
||||
|
||||
pub struct FreeFunctions;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct TokenStreamIter {
|
||||
trees: IntoIter<TokenTree>,
|
||||
|
@ -254,6 +256,7 @@ pub struct Rustc {
|
|||
}
|
||||
|
||||
impl server::Types for Rustc {
|
||||
type FreeFunctions = FreeFunctions;
|
||||
type TokenStream = TokenStream;
|
||||
type TokenStreamBuilder = TokenStreamBuilder;
|
||||
type TokenStreamIter = TokenStreamIter;
|
||||
|
@ -267,6 +270,13 @@ impl server::Types for Rustc {
|
|||
type MultiSpan = Vec<Span>;
|
||||
}
|
||||
|
||||
impl server::FreeFunctions for Rustc {
|
||||
fn track_env_var(&mut self, _var: &str, _value: Option<&str>) {
|
||||
// FIXME: track env var accesses
|
||||
// https://github.com/rust-lang/rust/pull/71858
|
||||
}
|
||||
}
|
||||
|
||||
impl server::TokenStream for Rustc {
|
||||
fn new(&mut self) -> Self::TokenStream {
|
||||
Self::TokenStream::new()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue