From 9c55d5676bcb74b23934b7b4f3147cab4083a889 Mon Sep 17 00:00:00 2001 From: Madcodder <66781822+louwenus@users.noreply.github.com> Date: Wed, 17 Dec 2025 19:08:54 +0100 Subject: [PATCH 1/3] Update E0275.md Dirty fix to #145069 While waiting for a proper fix, at least document what is happening in the error so that the next to stumble on the issue hopefully does not waste too much time debugging it. --- compiler/rustc_error_codes/src/error_codes/E0275.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/rustc_error_codes/src/error_codes/E0275.md b/compiler/rustc_error_codes/src/error_codes/E0275.md index 2d12fcea4cafc..e3a0b7c0f7881 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0275.md +++ b/compiler/rustc_error_codes/src/error_codes/E0275.md @@ -20,3 +20,7 @@ determine this, we check if `Bar>>` is `Foo`, and so on. This is clearly a recursive requirement that can't be resolved directly. Consider changing your trait bounds so that they're less self-referential. + +### If you do not see why this error spawned while definitely not having a recursive definition: +If using nightly, this can also happen when you are missing a feature needed to evaluate the requirement (eg generic_const_exprs). +Check wether the crate that define the impl use some features related to the impl, and try to enable them on the client crate. From efc5d888ec5348dd0c583e4773c840c13591a504 Mon Sep 17 00:00:00 2001 From: Madcodder <66781822+louwenus@users.noreply.github.com> Date: Wed, 17 Dec 2025 19:26:32 +0100 Subject: [PATCH 2/3] Update E0275.md Shorter lines --- compiler/rustc_error_codes/src/error_codes/E0275.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_error_codes/src/error_codes/E0275.md b/compiler/rustc_error_codes/src/error_codes/E0275.md index e3a0b7c0f7881..420c1c835f184 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0275.md +++ b/compiler/rustc_error_codes/src/error_codes/E0275.md @@ -21,6 +21,9 @@ clearly a recursive requirement that can't be resolved directly. Consider changing your trait bounds so that they're less self-referential. -### If you do not see why this error spawned while definitely not having a recursive definition: -If using nightly, this can also happen when you are missing a feature needed to evaluate the requirement (eg generic_const_exprs). -Check wether the crate that define the impl use some features related to the impl, and try to enable them on the client crate. +### If you definitely does not have a recursive definition: +If using nightly, this can also happen when you are missing a feature +needed to evaluate the requirement (eg generic_const_exprs). + +Check wether the crate that define the impl use some features related to it, +and try to enable them on the client crate. From 27a0b7e2afc75138490c8c2424f09c9f13326f78 Mon Sep 17 00:00:00 2001 From: Madcodder <66781822+louwenus@users.noreply.github.com> Date: Wed, 17 Dec 2025 19:40:43 +0100 Subject: [PATCH 3/3] Update E0275.md Fixed typo --- compiler/rustc_error_codes/src/error_codes/E0275.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_error_codes/src/error_codes/E0275.md b/compiler/rustc_error_codes/src/error_codes/E0275.md index 420c1c835f184..0b06845531123 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0275.md +++ b/compiler/rustc_error_codes/src/error_codes/E0275.md @@ -21,9 +21,9 @@ clearly a recursive requirement that can't be resolved directly. Consider changing your trait bounds so that they're less self-referential. -### If you definitely does not have a recursive definition: +### If you definitely do not have a recursive definition: If using nightly, this can also happen when you are missing a feature -needed to evaluate the requirement (eg generic_const_exprs). +needed to evaluate the requirement (e.g., generic_const_exprs). -Check wether the crate that define the impl use some features related to it, +Check whether the crate that define the Impl use some features related to it, and try to enable them on the client crate.