Skip to content

Commit 63bc48b

Browse files
committed
Rename nounwind -> unsafe_no_unwind
1 parent 2892ca4 commit 63bc48b

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

src/liballoc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ pub mod rc;
9898
/// Common out-of-memory routine
9999
#[cold]
100100
#[inline(never)]
101-
#[nounwind]
101+
#[unsafe_no_nounwind]
102102
pub fn oom() -> ! {
103103
// FIXME(#14674): This really needs to do something other than just abort
104104
// here, but any printing done must be *guaranteed* to not

src/librustc_trans/trans/base.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -431,11 +431,6 @@ pub fn set_no_inline(f: ValueRef) {
431431
llvm::SetFunctionAttribute(f, llvm::NoInlineAttribute)
432432
}
433433

434-
#[allow(dead_code)] // useful
435-
pub fn set_no_unwind(f: ValueRef) {
436-
llvm::SetFunctionAttribute(f, llvm::NoUnwindAttribute)
437-
}
438-
439434
// Tell LLVM to emit the information necessary to unwind the stack for the
440435
// function f.
441436
pub fn set_uwtable(f: ValueRef) {
@@ -470,7 +465,7 @@ pub fn set_llvm_fn_attrs(ccx: &CrateContext, attrs: &[ast::Attribute], llfn: Val
470465
llvm::FunctionIndex as c_uint,
471466
llvm::ColdAttribute as uint64_t)
472467
},
473-
"nounwind" => llvm::SetFunctionAttribute(llfn, llvm::NoUnwindAttribute),
468+
"unsafe_no_unwind" => llvm::SetFunctionAttribute(llfn, llvm::NoUnwindAttribute),
474469
_ => used = false,
475470
}
476471
if used {

src/libsyntax/feature_gate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,9 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
263263
} else if attr.name() == "can_unwind" {
264264
self.gate_feature("unwinding_attributes", i.span,
265265
"the `#[can_unwind]` attribute is an experimental feature")
266-
} else if attr.name() == "nounwind" {
266+
} else if attr.name() == "unsafe_no_unwind" {
267267
self.gate_feature("unwinding_attributes", i.span,
268-
"the `#[nounwind]` attribute is an experimental feature")
268+
"the `#[unsafe_no_unwind]` attribute is an experimental feature")
269269
}
270270
}
271271
match i.node {

0 commit comments

Comments
 (0)