summaryrefslogtreecommitdiffstats
path: root/src/test/ui/feature-gates/feature-gate-custom_mir.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/feature-gates/feature-gate-custom_mir.rs')
-rw-r--r--src/test/ui/feature-gates/feature-gate-custom_mir.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/feature-gates/feature-gate-custom_mir.rs b/src/test/ui/feature-gates/feature-gate-custom_mir.rs
new file mode 100644
index 000000000..0126dde2f
--- /dev/null
+++ b/src/test/ui/feature-gates/feature-gate-custom_mir.rs
@@ -0,0 +1,12 @@
+#![feature(core_intrinsics)]
+
+extern crate core;
+
+#[custom_mir(dialect = "built")] //~ ERROR the `#[custom_mir]` attribute is just used for the Rust test suite
+pub fn foo(_x: i32) -> i32 {
+ 0
+}
+
+fn main() {
+ assert_eq!(2, foo(2));
+}