Repository navigation
Using Self::default() instead of TypeAlias::default() causes an ICE on nightly. #54785
Description
Activity
- addedA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
on Oct 3, 2018 Nevermind, I believe I found the culprit https://github.com/rust-lang/rust/pull/52568/files#diff-2c49ea48a32b1e12546e0517e544ef58R315
@oli-obk can you take a look? I'm not sure I understand why we're
panicing in that case instead of always emitting or at least cancelling those diagnostics.I will try this in those nightlys anyway and report which ones break.
Reacted by Esteban KuberI tested on the rust nightly versions listed bellow on
the commit (41393e6e0e23a093709c6661ccc728ae07c621ec)Works fine in nightly-2018-08-19-i686-unknown-linux-gnu .
Works fine in nightly-2018-08-25-i686-unknown-linux-gnu .
On nightly-2018-08-26-i686-unknown-linux-gnu I get the same error as the first comment.
On nightly-2018-08-28-i686-unknown-linux-gnu I get the same error as the first comment.
On nightly-2018-08-30-i686-unknown-linux-gnu I get the same error as the first comment.
On nightly-2018-09-01-i686-unknown-linux-gnu I get the same error as the first comment.
On nightly-2018-09-10-i686-unknown-linux-gnu I get the same error as the first comment.
On nightly-2018-09-12-i686-unknown-linux-gnu I get the same error as the first comment.
On nightly-2018-09-14-i686-unknown-linux-gnu I get the same error as the first comment.
On nightly-2018-09-19-i686-unknown-linux-gnu I get the same error as the first comment.The output is long enough that I appended some files with their output.
2018-08-26-error.txt
2018-08-28-error.txt
2018-08-30-error.txt
2018-09-01-error.txt
2018-09-10-error.txt
2018-09-12-error.txt
2018-09-14-error.txt
2018-09-19-error.txtReacted by Esteban KuberThe actual error is
error: internal compiler error: broken MIR in DefId(0/0:10 ~ _03_vis_wrapper[21d9]::rectangle[0]::{{impl}}[0]::new[0]) (const std::default::Default::default): bad constant user type Canonical { variables: [], value: fn() -> rectangle::RectangleInner<type_level_values::const_wrapper::ConstWrapper<<type_level_RectangleAcessible::ConstRectangleAcessible<type_level_values::reexports::Void, type_level_values::reexports::Void> as type_level_values::field_traits::SetField_<type_level_RectangleAcessible::__fields::All, type_level_Accessibility::Accessible>>::Output, type_level_values::const_wrapper::PhantomKind>> {<rectangle::RectangleInner<type_level_values::const_wrapper::ConstWrapper<<type_level_RectangleAcessible::ConstRectangleAcessible<type_level_values::reexports::Void, type_level_values::reexports::Void> as type_level_values::field_traits::SetField_<type_level_RectangleAcessible::__fields::All, type_level_Accessibility::Accessible>>::Output, type_level_values::const_wrapper::PhantomKind>> as std::default::Default>::default} } vs fn() -> rectangle::RectangleInner<type_level_values::const_wrapper::ConstWrapper<type_level_RectangleAcessible::ConstRectangleAcessible<type_level_Accessibility::Accessible, type_level_Accessibility::Accessible>, type_level_values::const_wrapper::PhantomKind>> {<rectangle::RectangleInner<type_level_values::const_wrapper::ConstWrapper<type_level_RectangleAcessible::ConstRectangleAcessible<type_level_Accessibility::Accessible, type_level_Accessibility::Accessible>, type_level_values::const_wrapper::PhantomKind>> as std::default::Default>::default}: NoSolution --> type_level_examples/src/bin/_03_vis_wrapper.rs:42:13 | 42 | Self::default() |The
panic!quoted in https://github.com/rust-lang/rust/pull/52568/files#diff-2c49ea48a32b1e12546e0517e544ef58R315 is just a way to abort the compiler after dumping all the ICEsReacted by Esteban Kuber- addedA-type-systemArea: Type systemArea: Type systemA-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlC-bugCategory: This is a bug.Category: This is a bug.and removedA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lints
on Oct 4, 2018 - addedT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
on Mar 10, 2020 @rodrimati1992 Could you produce a minimal example for this? Also, does it reproduce on the current nightly?
I'll leave it at can't reproduce with a minimal example,I tried to but couldn't.
I haven't touched the
type_levelrepository since december 2018(nor used it),and thetype_level_valuescrate hasn't been able to compile due to recursive impl errors since then,so the documentation example that triggers this ICE wouldn't run anyway.@rustbot ping icebreakers-cleanup-crew
Hey Cleanup Crew ICE-breakers! This bug has been identified as a good
"Cleanup ICE-breaking candidate". In case it's useful, here are some
instructions for tackling these sorts of bugs. Maybe take a look?
Thanks! <3cc @AminArria @chrissimpkins @contrun @DutchGhost @elshize @ethanboxx @h-michael @HallerPatrick @hdhoang @hellow554 @imtsuki @jakevossen5 @KarlK90 @LeSeulArtichaut @matheus-consoli @mental32 @nmccarty @Noah-Kennedy @pard68 @PeytonT @pierreN @Redblueflame @RobbieClarken @RobertoSnap @robjtede @SarthakSingh31 @senden9 @shekohex @sinato @spastorino @turboladen @woshilapin @yerke
- addedregression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
on Mar 11, 2020 Sorry, I was a bit fast to ping the cleanup-crew group.
In an ideal world what we would like to do is to go back to the rustc version where this started to manifest and try to get an MVCE and then try to see if this is still an issue in current rustc versions.
However, the bug as written is based on abandoned code and it's kind of non actionable for us.
- addedP-lowLow priorityLow priorityI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️and removedI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
on Mar 11, 2020 After going over this with @pnkfelix we decided to tag as
P-lowwith the intention to close it because it's kind of non actionable for us.Closing this as non actionable as per comment from last triage meeting. If someone wants to provide an MCVE and something that is more actionable, please feel free to comment and we can reopen this issue.
- addedA-type-systemArea: Type systemArea: Type systemand removedA-type-systemArea: Type systemArea: Type system
on Dec 21, 2024
In the process of adding my project to travis-ci I got a nightly ICE from using "Self::default() instead of TypeAlias::default()" inside an impl block for type aliases.This works fine on stable.
This is the log for the first error:
https://travis-ci.org/rodrimati1992/type_level/jobs/436599429
This is the log for the second error:
https://travis-ci.org/rodrimati1992/type_level/jobs/436607478
This are the changes made to add the project to travis-ci,
including the commits that fix the error in my project:
rodrimati1992/type_level@9411158
The files that were changed to fix the error were :
type_level_examples/src/bin/_03_vis_wrapper.rs
type_level_examples/src/bin/_07_split_mut.rs