Switch to 'const unsafe fn' ordering (rust-lang/rust#29107)

This commit is contained in:
John Hodge
2015-10-24 16:52:07 +08:00
parent bbb5f8e12e
commit f9b8c49cdb
6 changed files with 21 additions and 16 deletions

View File

@@ -3071,13 +3071,14 @@ impl<'a> State<'a> {
abi: abi::Abi,
vis: ast::Visibility) -> io::Result<()> {
try!(word(&mut self.s, &visibility_qualified(vis, "")));
try!(self.print_unsafety(unsafety));
match constness {
ast::Constness::NotConst => {}
ast::Constness::Const => try!(self.word_nbsp("const"))
}
try!(self.print_unsafety(unsafety));
if abi != abi::Rust {
try!(self.word_nbsp("extern"));
try!(self.word_nbsp(&abi.to_string()));