Add some convenience helper methods on hir::Safety
This commit is contained in:
parent
3a64bef2ba
commit
8a4e5d7444
27 changed files with 72 additions and 68 deletions
|
|
@ -1626,10 +1626,7 @@ pub(crate) trait PrintWithSpace {
|
|||
|
||||
impl PrintWithSpace for hir::Safety {
|
||||
fn print_with_space(&self) -> &str {
|
||||
match self {
|
||||
hir::Safety::Unsafe => "unsafe ",
|
||||
hir::Safety::Safe => "",
|
||||
}
|
||||
self.prefix_str()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue