diff options
Diffstat (limited to 'src/librustdoc/html/render/print_item.rs')
| -rw-r--r-- | src/librustdoc/html/render/print_item.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index 7de2aea1c04..c7a23aa8503 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -492,7 +492,7 @@ fn item_module(w: &mut Buffer, cx: &mut Context<'_>, item: &clean::Item, items: let unsafety_flag = match *myitem.kind { clean::FunctionItem(_) | clean::ForeignFunctionItem(_) - if myitem.fn_header(tcx).unwrap().unsafety == hir::Unsafety::Unsafe => + if myitem.fn_header(tcx).unwrap().safety == hir::Safety::Unsafe => { "<sup title=\"unsafe function\">⚠</sup>" } @@ -616,7 +616,7 @@ fn item_function(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, f: &cle let tcx = cx.tcx(); let header = it.fn_header(tcx).expect("printing a function which isn't a function"); let constness = print_constness_with_space(&header.constness, it.const_stability(tcx)); - let unsafety = header.unsafety.print_with_space(); + let safety = header.safety.print_with_space(); let abi = print_abi_with_space(header.abi).to_string(); let asyncness = header.asyncness.print_with_space(); let visibility = visibility_print_with_space(it, cx).to_string(); @@ -627,7 +627,7 @@ fn item_function(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, f: &cle + visibility.len() + constness.len() + asyncness.len() - + unsafety.len() + + safety.len() + abi.len() + name.as_str().len() + generics_len; @@ -638,13 +638,13 @@ fn item_function(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, f: &cle w.reserve(header_len); write!( w, - "{attrs}{vis}{constness}{asyncness}{unsafety}{abi}fn \ + "{attrs}{vis}{constness}{asyncness}{safety}{abi}fn \ {name}{generics}{decl}{notable_traits}{where_clause}", attrs = render_attributes_in_pre(it, "", cx), vis = visibility, constness = constness, asyncness = asyncness, - unsafety = unsafety, + safety = safety, abi = abi, name = name, generics = f.generics.print(cx), @@ -674,10 +674,10 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean: wrap_item(w, |mut w| { write!( w, - "{attrs}{vis}{unsafety}{is_auto}trait {name}{generics}{bounds}", + "{attrs}{vis}{safety}{is_auto}trait {name}{generics}{bounds}", attrs = render_attributes_in_pre(it, "", cx), vis = visibility_print_with_space(it, cx), - unsafety = t.unsafety(tcx).print_with_space(), + safety = t.safety(tcx).print_with_space(), is_auto = if t.is_auto(tcx) { "auto " } else { "" }, name = it.name.unwrap(), generics = t.generics.print(cx), |
