summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfc-2632-const-trait-impl/do-not-const-check.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/rfc-2632-const-trait-impl/do-not-const-check.rs')
-rw-r--r--tests/ui/rfc-2632-const-trait-impl/do-not-const-check.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/rfc-2632-const-trait-impl/do-not-const-check.rs b/tests/ui/rfc-2632-const-trait-impl/do-not-const-check.rs
new file mode 100644
index 000000000..3c39c53de
--- /dev/null
+++ b/tests/ui/rfc-2632-const-trait-impl/do-not-const-check.rs
@@ -0,0 +1,18 @@
+// check-pass
+#![feature(const_trait_impl, rustc_attrs)]
+
+#[const_trait]
+trait IntoIter {
+ fn into_iter(self);
+}
+
+#[const_trait]
+trait Hmm: Sized {
+ #[rustc_do_not_const_check]
+ fn chain<U>(self, other: U) where U: IntoIter,
+ {
+ other.into_iter()
+ }
+}
+
+fn main() {}