summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfc-2632-const-trait-impl/do-not-const-check-override.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/rfc-2632-const-trait-impl/do-not-const-check-override.rs')
-rw-r--r--tests/ui/rfc-2632-const-trait-impl/do-not-const-check-override.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/rfc-2632-const-trait-impl/do-not-const-check-override.rs b/tests/ui/rfc-2632-const-trait-impl/do-not-const-check-override.rs
new file mode 100644
index 000000000..730e268c0
--- /dev/null
+++ b/tests/ui/rfc-2632-const-trait-impl/do-not-const-check-override.rs
@@ -0,0 +1,19 @@
+// check-pass
+#![feature(const_trait_impl, rustc_attrs)]
+
+#[const_trait]
+trait Foo {
+ #[rustc_do_not_const_check]
+ fn into_iter(&self) { println!("FEAR ME!") }
+}
+
+
+impl const Foo for () {
+ fn into_iter(&self) {
+ // ^_^
+ }
+}
+
+const _: () = Foo::into_iter(&());
+
+fn main() {}