File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ use rustc_mir::const_eval::{is_const_fn, is_unstable_const_fn};
26
26
use rustc_span:: hygiene:: { AstPass , MacroKind } ;
27
27
use rustc_span:: symbol:: { kw, sym, Ident , Symbol } ;
28
28
use rustc_span:: { self , ExpnKind } ;
29
+ use rustc_target:: spec:: abi:: Abi ;
30
+ use rustc_typeck:: check:: intrinsic:: intrinsic_operation_unsafety;
29
31
use rustc_typeck:: hir_ty_to_ty;
30
32
31
33
use std:: collections:: hash_map:: Entry ;
@@ -2132,7 +2134,11 @@ impl Clean<Item> for (&hir::ForeignItem<'_>, Option<Symbol>) {
2132
2134
decl,
2133
2135
generics,
2134
2136
header : hir:: FnHeader {
2135
- unsafety : hir:: Unsafety :: Unsafe ,
2137
+ unsafety : if abi == Abi :: RustIntrinsic {
2138
+ intrinsic_operation_unsafety ( item. ident . name )
2139
+ } else {
2140
+ hir:: Unsafety :: Unsafe
2141
+ } ,
2136
2142
abi,
2137
2143
constness : hir:: Constness :: NotConst ,
2138
2144
asyncness : hir:: IsAsync :: NotAsync ,
You can’t perform that action at this time.
0 commit comments