Stablize const_extern_fn
for "Rust" and "C"
All other ABIs are left unstable for now. cc #64926
This commit is contained in:
parent
1fca19c8ca
commit
8035796b9a
4 changed files with 42 additions and 69 deletions
|
@ -523,6 +523,9 @@ impl<'a> Parser<'a> {
|
|||
let decl = self.parse_fn_decl(|_| false, AllowPlus::No, recover_return_sign)?;
|
||||
let whole_span = lo.to(self.prev_token.span);
|
||||
if let ast::Const::Yes(span) = constness {
|
||||
// If we ever start to allow `const fn()`, then update
|
||||
// feature gating for `#![feature(const_extern_fn)]` to
|
||||
// cover it.
|
||||
self.error_fn_ptr_bad_qualifier(whole_span, span, "const");
|
||||
}
|
||||
if let ast::Async::Yes { span, .. } = asyncness {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue