-
Notifications
You must be signed in to change notification settings - Fork 13.3k
error: internal compiler error: compiler/rustc_infer/src/infer/at.rs:400:21: relating different kinds. #127163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
A smaller example with no external dependencies enum Schema {}
struct ObjectBuilder;
impl ObjectBuilder {
pub fn property<S, I: Into<RefOr<Schema>>>(self, property_name: S, component: I) {}
}
struct RefOr<T>(T);
trait ToSchema<'__s> {
fn schema() -> (&str,);
}
impl<'a, T: ToSchema> From<T> for RefOr<Schema> {}
impl<'a> ToSchema<'a> for () {}
fn main() {
ObjectBuilder.property("key", MktKey::schema())
}
struct MktKey;
impl<'a> ToSchema<'a> for MktKey {} |
Minimized further: trait IsPair<'a> {} // formerly `ToSchema`
impl IsPair<'static> for (i32, i32) {}
trait AlsoIsPair<T> {} // fromerly `Into`
struct Dummy; // formerly `RefOr<Schema>`
impl<T: IsPair<'static>> AlsoIsPair<Dummy> for T {}
fn require_pair<T: AlsoIsPair<Dummy>>() {} // formerly `ObjectBuilder.property`
fn main() {
require_pair::<(i32, i32, i32)>()
} Error output
ICEs on stable 1.79.0. Produces a normal error on nightly (2024-06-24 6b0f4b5). Probably a duplicate of #126129. |
Since this is fixed on nightly, I don't think it's worthwhile to keep tracking this as an open bug. Sorry that you hit this bug!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Hello !
I'm a fair beginner in Rust, so it could that I'm just a bit silly. None the less, the compiler said it would appreciate a bug report so here goes below. In my minimization I have removed anything that has to do with Serialization.
I did notice that using the latest nightly, the error now moves into a normal compiler error. So it might have been solved but I failed to find the issue that would relate to it.
Thanks all!
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: