diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2024-12-13 12:19:46 +0000 |
|---|---|---|
| committer | Oli Scherer <github333195615777966@oli-obk.de> | 2024-12-14 20:31:07 +0000 |
| commit | 8a4e5d7444c4d43097c2ca0d1b8e64be9dbeddfa (patch) | |
| tree | f9ca6a3756cf0bb0e520702d99f2064231e95223 /src/librustdoc/html/format.rs | |
| parent | 3a64bef2ba54542d3440634602e088c2597d9ed2 (diff) | |
| download | rust-8a4e5d7444c4d43097c2ca0d1b8e64be9dbeddfa.tar.gz rust-8a4e5d7444c4d43097c2ca0d1b8e64be9dbeddfa.zip | |
Add some convenience helper methods on `hir::Safety`
Diffstat (limited to 'src/librustdoc/html/format.rs')
| -rw-r--r-- | src/librustdoc/html/format.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index 0a563b1df26..7d40f662ed0 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -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() } } |
