Fix .to_string()
of proc_macro::Literal
(properly print cstr literals)
This commit is contained in:
parent
19c65022fc
commit
285e574b8e
1 changed files with 9 additions and 1 deletions
|
@ -1411,7 +1411,15 @@ impl Literal {
|
|||
let hashes = get_hashes_str(n);
|
||||
f(&["br", hashes, "\"", symbol, "\"", hashes, suffix])
|
||||
}
|
||||
_ => f(&[symbol, suffix]),
|
||||
bridge::LitKind::CStr => f(&["c\"", symbol, "\"", suffix]),
|
||||
bridge::LitKind::CStrRaw(n) => {
|
||||
let hashes = get_hashes_str(n);
|
||||
f(&["cr", hashes, "\"", symbol, "\"", hashes, suffix])
|
||||
}
|
||||
|
||||
bridge::LitKind::Integer | bridge::LitKind::Float | bridge::LitKind::Err => {
|
||||
f(&[symbol, suffix])
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue