summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/new-solver/canonicalize-effect-var.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/traits/new-solver/canonicalize-effect-var.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/traits/new-solver/canonicalize-effect-var.rs b/tests/ui/traits/new-solver/canonicalize-effect-var.rs
new file mode 100644
index 000000000..35b69ed1a
--- /dev/null
+++ b/tests/ui/traits/new-solver/canonicalize-effect-var.rs
@@ -0,0 +1,22 @@
+// compile-flags: -Ztrait-solver=next
+// check-pass
+
+#![feature(effects)]
+#![feature(const_trait_impl)]
+
+#[const_trait]
+trait Foo {
+ fn foo();
+}
+
+trait Bar {}
+
+impl const Foo for i32 {
+ fn foo() {}
+}
+
+impl<T> const Foo for T where T: Bar {
+ fn foo() {}
+}
+
+fn main() {}