|
13 | 13 | #![cfg(any(feature = "sysroot-abi", rust_analyzer))] |
14 | 14 | #![cfg_attr(feature = "in-rust-tree", feature(rustc_private))] |
15 | 15 | #![feature(proc_macro_internals, proc_macro_diagnostic, proc_macro_span)] |
16 | | -#![allow(unreachable_pub, internal_features)] |
| 16 | +#![allow(unreachable_pub, internal_features, clippy::disallowed_types, clippy::print_stderr)] |
17 | 17 |
|
18 | 18 | extern crate proc_macro; |
19 | 19 | #[cfg(feature = "in-rust-tree")] |
@@ -65,7 +65,7 @@ impl<'env> ProcMacroSrv<'env> { |
65 | 65 |
|
66 | 66 | const EXPANDER_STACK_SIZE: usize = 8 * 1024 * 1024; |
67 | 67 |
|
68 | | -impl<'env> ProcMacroSrv<'env> { |
| 68 | +impl ProcMacroSrv<'_> { |
69 | 69 | pub fn set_span_mode(&mut self, span_mode: SpanMode) { |
70 | 70 | self.span_mode = span_mode; |
71 | 71 | } |
@@ -248,8 +248,8 @@ pub struct EnvSnapshot { |
248 | 248 | vars: HashMap<OsString, OsString>, |
249 | 249 | } |
250 | 250 |
|
251 | | -impl EnvSnapshot { |
252 | | - pub fn new() -> EnvSnapshot { |
| 251 | +impl Default for EnvSnapshot { |
| 252 | + fn default() -> EnvSnapshot { |
253 | 253 | EnvSnapshot { vars: env::vars_os().collect() } |
254 | 254 | } |
255 | 255 | } |
@@ -305,7 +305,7 @@ impl Drop for EnvChange<'_> { |
305 | 305 | } |
306 | 306 |
|
307 | 307 | if let Some(dir) = &self.prev_working_dir { |
308 | | - if let Err(err) = std::env::set_current_dir(&dir) { |
| 308 | + if let Err(err) = std::env::set_current_dir(dir) { |
309 | 309 | eprintln!( |
310 | 310 | "Failed to set the current working dir to {}. Error: {:?}", |
311 | 311 | dir.display(), |
|
0 commit comments