Treat safe target_feature functions as unsafe by default

This commit is contained in:
Oli Scherer
2024-12-13 12:19:46 +00:00
parent a907c56a77
commit 56178ddc90
20 changed files with 159 additions and 56 deletions

View File

@@ -2424,6 +2424,10 @@ impl<'a> State<'a> {
self.print_constness(header.constness);
let safety = match header.safety {
hir::HeaderSafety::SafeTargetFeatures => {
self.word_nbsp("#[target_feature]");
hir::Safety::Safe
}
hir::HeaderSafety::Normal(safety) => safety,
};