Skip to content

Commit a81b2e9

Browse files
Avoid depending on * import in proc_macro
1 parent b30f3df commit a81b2e9

4 files changed

Lines changed: 18 additions & 6 deletions

File tree

library/proc_macro/src/bridge/client.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
//! Client-side types.
22
33
use std::cell::RefCell;
4-
5-
use super::*;
4+
use std::ops::{Bound, Range};
5+
use std::sync::Once;
6+
use std::{fmt, mem, panic};
7+
8+
use crate::bridge::{
9+
ApiTags, BridgeConfig, Buffer, Decode, Diagnostic, Encode, ExpnGlobals, Literal, PanicMessage,
10+
TokenTree, closure, handle,
11+
};
612

713
pub(crate) struct TokenStream {
814
handle: handle::Handle,

library/proc_macro/src/bridge/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
#![deny(unsafe_code)]
1010

1111
use std::hash::Hash;
12+
use std::marker;
1213
use std::ops::{Bound, Range};
13-
use std::sync::Once;
14-
use std::{fmt, marker, mem, panic, thread};
1514

1615
use crate::{Delimiter, Level};
1716

library/proc_macro/src/bridge/server.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
//! Server-side traits.
22
33
use std::cell::Cell;
4+
use std::hash::Hash;
5+
use std::ops::{Bound, Range};
46
use std::sync::atomic::AtomicU32;
57
use std::sync::mpsc;
8+
use std::{panic, thread};
69

7-
use super::*;
10+
use crate::bridge::{
11+
ApiTags, BridgeConfig, Buffer, Decode, Diagnostic, Encode, ExpnGlobals, Literal, Mark, Marked,
12+
PanicMessage, TokenTree, client, handle,
13+
};
814

915
pub(super) struct HandleStore<S: Server> {
1016
token_stream: handle::OwnedStore<MarkedTokenStream<S>>,

library/proc_macro/src/bridge/symbol.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
//! proc_macro, this module should probably be removed or simplified.
1111
1212
use std::cell::RefCell;
13+
use std::fmt;
1314
use std::num::NonZero;
1415

15-
use super::*;
16+
use crate::bridge::{Buffer, Decode, Encode, Mark, arena, client, fxhash, server};
1617

1718
/// Handle for a symbol string stored within the Interner.
1819
#[derive(Copy, Clone, PartialEq, Eq, Hash)]

0 commit comments

Comments
 (0)