Prefer not accessing the private field of newtype_index types
This commit is contained in:
parent
b5554722ff
commit
2a94a2d385
2 changed files with 2 additions and 2 deletions
|
@ -34,7 +34,7 @@ impl CrateNum {
|
|||
|
||||
impl fmt::Display for CrateNum {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
fmt::Display::fmt(&self.private, f)
|
||||
fmt::Display::fmt(&self.as_u32(), f)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ pub struct ExpnId {
|
|||
impl fmt::Debug for ExpnId {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
// Generate crate_::{{expn_}}.
|
||||
write!(f, "{:?}::{{{{expn{}}}}}", self.krate, self.local_id.private)
|
||||
write!(f, "{:?}::{{{{expn{}}}}}", self.krate, self.local_id.as_u32())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue