match it.node {
hir::ForeignItemFn(..) => {}
_ => {
- struct_span_err!(tcx.sess, it.span, E0619,
+ struct_span_err!(tcx.sess, it.span, E0622,
"intrinsic must be a function")
.span_label(it.span, "expected a function")
.emit();
"##,
E0619: r##"
-<<<<<<< HEAD
The type-checker needed to know the type of an expression, but that type had not
yet been inferred.
```
"##,
-E0621: r##"
+E0622: r##"
An intrinsic was declared without being a function.
Erroneous code example:
-```compile_fail,E0621
+```compile_fail,E0622
#![feature(intrinsics)]
extern "rust-intrinsic" {
pub static breakpoint : unsafe extern "rust-intrinsic" fn();
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![feature(intrinsics)]
-extern "rust-intrinsic" {
- pub static breakpoint : unsafe extern "rust-intrinsic" fn();
- //~^ ERROR intrinsic must be a function [E0619]
+fn main() {
+ let x;
+
+ match x {
+ (..) => {} //~ ERROR E0619
+ _ => {}
+ }
}
-fn main() { unsafe { breakpoint(); } }
+
--- /dev/null
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(intrinsics)]
+extern "rust-intrinsic" {
+ pub static breakpoint : unsafe extern "rust-intrinsic" fn();
+ //~^ ERROR intrinsic must be a function [E0622]
+}
+fn main() { unsafe { breakpoint(); } }