Repository navigation
Closed
Labels
A-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.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-mediumMedium priorityMedium priorityT-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.glacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Description
Playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=c0293ace3f56fd3d1d3c79ed971331f3
UPDATE: MCVE is here: #71546 (comment)
Code:
use serde::Serializer;
use itertools::Itertools;
pub fn serialize_as_csv<V, S>(value: &V, serializer: S) -> Result<S::Ok, S::Error>
where
V: 'static,
for<'a> &'a V: IntoIterator,
for<'a> <&'a V as IntoIterator>::Item: ToString + 'static,
S: Serializer,
{
let csv_str = value.into_iter().map(|elem| elem.to_string()).join(",");
serializer.serialize_str(&csv_str)
}Crashes compiler with
Compiling playground v0.0.1 (/playground)
error: internal compiler error: broken MIR in DefId(0:5 ~ playground[59fe]::serialize_as_csv[0]) (NoSolution): could not prove Binder(OutlivesPredicate(<&'a V as std::iter::IntoIterator>::Item, ReStatic))
--> src/lib.rs:11:41
|
11 | let csv_str = value.into_iter().map(|elem| elem.to_string()).join(",");
| ^^^^^^^^^^^^^^^^^^^^^^^
thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:355:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.43.0 (4fb7144ed 2020-04-20) running on x86_64-unknown-linux-gnu
note: compiler flags: -C codegen-units=1 -C debuginfo=2 --crate-type lib
note: some of the compiler flags provided by cargo are hidden
error: could not compile `playground`.
To learn more, run the command again with --verbose.
Metadata
Metadata
Assignees
Labels
A-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.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-mediumMedium priorityMedium priorityT-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.glacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Activity
spastorino commentedon Apr 25, 2020
Would be nice to figure out if this is a regression or not and if it is when has this regressed.
@rustbot ping cleanup
rustbot commentedon Apr 25, 2020
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! <3
cc @AminArria @chrissimpkins @contrun @DutchGhost @elshize @ethanboxx @h-michael @HallerPatrick @hdhoang @hellow554 @imtsuki @jakevossen5 @kanru @KarlK90 @LeSeulArtichaut @MAdrianMattocks @matheus-consoli @mental32 @nmccarty @Noah-Kennedy @pard68 @PeytonT @pierreN @Redblueflame @RobbieClarken @RobertoSnap @robjtede @SarthakSingh31 @senden9 @shekohex @sinato @spastorino @turboladen @woshilapin @yerke
chrissimpkins commentedon Apr 25, 2020
It has been present since at least 2019-08-01 according to bisect-rustc
AminArria commentedon Apr 25, 2020
Simplified code to remove dependencies
This compiles for 1.20.0 and not for 1.30.0 (setting edition to 2015)
I'll try and pinpoint at least the version where it causes the ICE
AminArria commentedon Apr 25, 2020
From what I can tell the first time this ICE would happen is in 1.24.0
LeSeulArtichaut commentedon Apr 26, 2020
Assigning
P-mediumas discussed as part of the Prioritization WG procedure7 remaining items
Re-add rust-lang/rust#71546 with another MCVE
Merge pull request #452 from JohnTitor/revive-71546
Rollup merge of rust-lang#74889 - JohnTitor:hrtb-tests, r=nikomatsakis
Rollup merge of rust-lang#74889 - JohnTitor:hrtb-tests, r=nikomatsakis
Auto merge of rust-lang#74889 - JohnTitor:hrtb-tests, r=nikomatsakis
Alexendoo commentedon Dec 4, 2021
No longer ICEs since ff23ad3, likely from #91321
Add regression test for rust-lang#71546
Rollup merge of rust-lang#97580 - JohnTitor:issue-71546, r=compiler-e…
Auto merge of rust-lang#97622 - JohnTitor:rollup-4qoxrjn, r=JohnTitor