aboutsummaryrefslogtreecommitdiff
path: root/crates/proc_macro_srv/src/rustc_server.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/proc_macro_srv/src/rustc_server.rs')
-rw-r--r--crates/proc_macro_srv/src/rustc_server.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/proc_macro_srv/src/rustc_server.rs b/crates/proc_macro_srv/src/rustc_server.rs
index 7d1695c86..c5fe3591e 100644
--- a/crates/proc_macro_srv/src/rustc_server.rs
+++ b/crates/proc_macro_srv/src/rustc_server.rs
@@ -242,6 +242,8 @@ impl TokenStreamBuilder {
242 } 242 }
243} 243}
244 244
245pub struct FreeFunctions;
246
245#[derive(Clone)] 247#[derive(Clone)]
246pub struct TokenStreamIter { 248pub struct TokenStreamIter {
247 trees: IntoIter<TokenTree>, 249 trees: IntoIter<TokenTree>,
@@ -254,6 +256,7 @@ pub struct Rustc {
254} 256}
255 257
256impl server::Types for Rustc { 258impl server::Types for Rustc {
259 type FreeFunctions = FreeFunctions;
257 type TokenStream = TokenStream; 260 type TokenStream = TokenStream;
258 type TokenStreamBuilder = TokenStreamBuilder; 261 type TokenStreamBuilder = TokenStreamBuilder;
259 type TokenStreamIter = TokenStreamIter; 262 type TokenStreamIter = TokenStreamIter;
@@ -267,6 +270,13 @@ impl server::Types for Rustc {
267 type MultiSpan = Vec<Span>; 270 type MultiSpan = Vec<Span>;
268} 271}
269 272
273impl server::FreeFunctions for Rustc {
274 fn track_env_var(&mut self, _var: &str, _value: Option<&str>) {
275 // FIXME: track env var accesses
276 // https://github.com/rust-lang/rust/pull/71858
277 }
278}
279
270impl server::TokenStream for Rustc { 280impl server::TokenStream for Rustc {
271 fn new(&mut self) -> Self::TokenStream { 281 fn new(&mut self) -> Self::TokenStream {
272 Self::TokenStream::new() 282 Self::TokenStream::new()