Merge pull request #851 from Amanieu/const_unsafe
Fix ordering of "const unsafe fn"
This commit is contained in:
commit
3fddb98149
@ -1078,12 +1078,13 @@ fn rewrite_fn_base(context: &RewriteContext,
|
||||
let mut result = String::with_capacity(1024);
|
||||
// Vis unsafety abi.
|
||||
result.push_str(format_visibility(vis));
|
||||
result.push_str(::utils::format_unsafety(unsafety));
|
||||
|
||||
if let ast::Constness::Const = constness {
|
||||
result.push_str("const ");
|
||||
}
|
||||
|
||||
result.push_str(::utils::format_unsafety(unsafety));
|
||||
|
||||
if abi != abi::Abi::Rust {
|
||||
result.push_str(&::utils::format_abi(abi));
|
||||
}
|
||||
|
1
tests/source/issue-850.rs
Normal file
1
tests/source/issue-850.rs
Normal file
@ -0,0 +1 @@
|
||||
const unsafe fn x() {}
|
1
tests/target/issue-850.rs
Normal file
1
tests/target/issue-850.rs
Normal file
@ -0,0 +1 @@
|
||||
const unsafe fn x() {}
|
Loading…
x
Reference in New Issue
Block a user