Skip to content

Commit 5f2dd07

Browse files
committed
Remove space after negative sign in Literal to_string
1 parent f5bd99c commit 5f2dd07

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

proc_macro/src/bridge/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ macro_rules! with_api {
109109
fn drop($self: $S::Literal);
110110
fn clone($self: &$S::Literal) -> $S::Literal;
111111
fn from_str(s: &str) -> Result<$S::Literal, ()>;
112+
fn to_string($self: &$S::Literal) -> String;
112113
fn debug_kind($self: &$S::Literal) -> String;
113114
fn symbol($self: &$S::Literal) -> String;
114115
fn suffix($self: &$S::Literal) -> Option<String>;

proc_macro/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,7 @@ impl FromStr for Literal {
11951195
#[stable(feature = "proc_macro_lib", since = "1.15.0")]
11961196
impl ToString for Literal {
11971197
fn to_string(&self) -> String {
1198-
TokenStream::from(TokenTree::from(self.clone())).to_string()
1198+
self.0.to_string()
11991199
}
12001200
}
12011201

0 commit comments

Comments
 (0)