gcc/rust/ChangeLog:
* checks/errors/rust-feature-gate.cc (FeatureGate::gate):
called error function.
gcc/testsuite/ChangeLog:
* rust/compile/changed_intrinsics.rs: New test.
Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
"<https://github.com/rust-lang/rust/issues/%u> for more "
"information. add `#![feature(%s)]` to the crate attributes to "
"enable.";
- rust_error_at (loc, fmt_str, error_msg.c_str (), issue, issue,
- feature.as_string ().c_str ());
+ rust_error_at (loc, ErrorCode ("E0658"), fmt_str, error_msg.c_str (),
+ issue, issue, feature.as_string ().c_str ());
}
else
{
--- /dev/null
+extern "rust-intrinsic" { // { dg-error "intrinsics are subject to change." "" { target *-*-* } }
+ fn foo();
+}
+
+fn main() {
+ unsafe {
+ foo();
+ }
+}