about summary refs log tree commit diff
path: root/tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2023-12-14 14:47:41 +0100
committerlcnr <rust@lcnr.de>2023-12-14 15:22:37 +0100
commit094707087171bb698d47aba807cd7d78c58e63ab (patch)
tree80d6a6e80c7b2833500cca646811f7068c8faad7 /tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs
parent11d16c4082be25fd42b48b37e199f18b4dfe51ed (diff)
downloadrust-094707087171bb698d47aba807cd7d78c58e63ab.tar.gz
rust-094707087171bb698d47aba807cd7d78c58e63ab.zip
consistently use "next solver" instead of "new solver"
Diffstat (limited to 'tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs')
-rw-r--r--tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs b/tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs
new file mode 100644
index 00000000000..f45d208e666
--- /dev/null
+++ b/tests/ui/traits/next-solver/overflow/recursive-self-normalization.rs
@@ -0,0 +1,16 @@
+// compile-flags: -Znext-solver
+
+trait Foo {
+    type Assoc;
+}
+
+trait Bar {}
+fn needs_bar<S: Bar>() {}
+
+fn test<T: Foo<Assoc = <T as Foo>::Assoc>>() {
+    needs_bar::<T::Assoc>();
+    //~^ ERROR overflow evaluating the requirement `<T as Foo>::Assoc: Bar`
+    //~| ERROR overflow evaluating the requirement `<T as Foo>::Assoc` [E0275]
+}
+
+fn main() {}