Add some convenience helper methods on hir::Safety

This commit is contained in:
Oli Scherer 2024-12-13 12:19:46 +00:00
parent 3a64bef2ba
commit 8a4e5d7444
27 changed files with 72 additions and 68 deletions

View file

@ -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()
}
}