about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-04-17 00:07:23 +0200
committerGitHub <noreply@github.com>2022-04-17 00:07:23 +0200
commitbd334984e217235b2b2089f3008e1d4be79b6deb (patch)
tree4c54f2f667a0444dc89204264e473fffc3f7d601 /compiler/rustc_parse/src
parent878c7833f6c1ff10e2fd89074e5bd4ef5ff15936 (diff)
parent8035796b9aabf1aa2a711694e40f00fe8a822f40 (diff)
downloadrust-bd334984e217235b2b2089f3008e1d4be79b6deb.tar.gz
rust-bd334984e217235b2b2089f3008e1d4be79b6deb.zip
Rollup merge of #95346 - Aaron1011:stablize-const-extern-fn, r=pnkfelix
Stablize `const_extern_fn` for "Rust" and "C"

All other ABIs are left unstable for now.

cc #64926
Diffstat (limited to 'compiler/rustc_parse/src')
-rw-r--r--compiler/rustc_parse/src/parser/ty.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/parser/ty.rs b/compiler/rustc_parse/src/parser/ty.rs
index 436c5bd4fca..bb387064e27 100644
--- a/compiler/rustc_parse/src/parser/ty.rs
+++ b/compiler/rustc_parse/src/parser/ty.rs
@@ -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 {