]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_ast_passes/src/feature_gate.rs
Add a new ABI to support cmse_nonsecure_call
[rust.git] / compiler / rustc_ast_passes / src / feature_gate.rs
index d65bc820f8fb161ec5510b5aee6f20f9ea00347a..62d0721c35fb1edd9f94ab33cbda8ac1d57c8185 100644 (file)
@@ -156,6 +156,14 @@ fn check_abi(&self, abi: ast::StrLit) {
                     "efiapi ABI is experimental and subject to change"
                 );
             }
+            "C-cmse-nonsecure-call" => {
+                gate_feature_post!(
+                    &self,
+                    abi_c_cmse_nonsecure_call,
+                    span,
+                    "C-cmse-nonsecure-call ABI is experimental and subject to change"
+                );
+            }
             abi => self
                 .sess
                 .parse_sess
@@ -370,7 +378,7 @@ fn visit_item(&mut self, i: &'a ast::Item) {
                     gate_feature_post!(
                         &self,
                         negative_impls,
-                        span.to(of_trait.as_ref().map(|t| t.path.span).unwrap_or(span)),
+                        span.to(of_trait.as_ref().map_or(span, |t| t.path.span)),
                         "negative trait bounds are not yet fully implemented; \
                          use marker types for now"
                     );