Skip to content
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

nalgebra NoSolution Broken MIR ICE #66768

Closed
Andlon opened this issue Nov 26, 2019 · 21 comments · Fixed by #75177
Closed

nalgebra NoSolution Broken MIR ICE #66768

Andlon opened this issue Nov 26, 2019 · 21 comments · Fixed by #75177
Labels
C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Andlon
Copy link

Andlon commented Nov 26, 2019

(Please feel free to make the title more precise)

This issue was first reported as part of #65934, as it was first believed to be similar in nature. Please also see the discussion therein. However, it seems to be sufficiently different as to warrant its own issue.

Here is an example build log

I've created a relatively minimal testcase, and @WildCryptoFox helped me minimize it further. The testcase can be found here: https://github.com/Andlon/ice_testcase . The current rust-toolchain file is set to nightly-2019-11-26, but the bug manifests for a number of different version of nightly (but not all!), as well as beta, and before minification it was also present on stable.

The conditions triggering the ICE seem to be very brittle: Changing features of dependencies or removing unused dependencies might make the ICE vanish. See also @WildCryptoFox's observations in the aforementioned issue #65934.

@hellow554
Copy link
Contributor

hellow554 commented Nov 26, 2019

Backtrace:

warning: Error finalizing incremental compilation session directory `/tmp/tmp.RK5UN5mIuz/ice_testcase/target/debug/incremental/ice_testcase-xfn1k7c1h8y/s-fi7fvzf5cc-4ag7eb-working`: No such file or directory (os error 2)

error: internal compiler error: broken MIR in DefId(0:35 ~ ice_testcase[1b24]::problematic_function[0]) (Terminator { source_info: SourceInfo { span: src/lib.rs:67:26: 67:80, scope: scope[0] }, kind: _2 = const <nalgebra::base::matrix::Matrix<f64, nalgebra::base::dimension::U2, nalgebra::base::dimension::U1, <nalgebra::base::default_allocator::DefaultAllocator as nalgebra::base::allocator::Allocator<f64, nalgebra::base::dimension::U2>>::Buffer> as std::convert::Into<nalgebra::geometry::point::Point<f64, nalgebra::base::dimension::U2>>>::into(move _3) -> [return: bb3, unwind: bb1] }): bad arg #0 (nalgebra::base::matrix::Matrix<f64, nalgebra::base::dimension::U2, nalgebra::base::dimension::U1, nalgebra::base::array_storage::ArrayStorage<f64, nalgebra::base::dimension::U2, nalgebra::base::dimension::U1>> <- nalgebra::base::matrix::Matrix<f64, nalgebra::base::dimension::U2, nalgebra::base::dimension::U1, <nalgebra::base::default_allocator::DefaultAllocator as nalgebra::base::allocator::Allocator<f64, nalgebra::base::dimension::U2>>::Buffer>): NoSolution
  --> src/lib.rs:67:72
   |
67 |     let _: Point2<f64> = material_surface_element.map_reference_coords().into();
   |                                                                        ^

thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:347:17
stack backtrace:
   0:     0x7f812a9f15b4 - backtrace::backtrace::libunwind::trace::h0fbcca877b5cc7be
                               at /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1:     0x7f812a9f15b4 - backtrace::backtrace::trace_unsynchronized::heee54a145e5e242e
                               at /cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2:     0x7f812a9f15b4 - std::sys_common::backtrace::_print_fmt::hcd55bcb24d288827
                               at src/libstd/sys_common/backtrace.rs:84
   3:     0x7f812a9f15b4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hcf782761d696ebc5
                               at src/libstd/sys_common/backtrace.rs:61
   4:     0x7f812aa29cec - core::fmt::write::h6d12a02d697eb964
                               at src/libcore/fmt/mod.rs:1030
   5:     0x7f812a9e5947 - std::io::Write::write_fmt::h92b068839d5f88f6
                               at src/libstd/io/mod.rs:1412
   6:     0x7f812a9f5a5e - std::sys_common::backtrace::_print::hd7ae75a7027ca13e
                               at src/libstd/sys_common/backtrace.rs:65
   7:     0x7f812a9f5a5e - std::sys_common::backtrace::print::he36b145a0f885346
                               at src/libstd/sys_common/backtrace.rs:50
   8:     0x7f812a9f5a5e - std::panicking::default_hook::{{closure}}::h78532abf43437641
                               at src/libstd/panicking.rs:190
   9:     0x7f812a9f5751 - std::panicking::default_hook::hb1a613bdd06f1622
                               at src/libstd/panicking.rs:207
  10:     0x7f812af06ac3 - rustc_driver::report_ice::h114705861dab380f
  11:     0x7f812a9f6230 - std::panicking::rust_panic_with_hook::ha051cd69a44ecdee
                               at src/libstd/panicking.rs:470
  12:     0x7f812cd918e5 - std::panicking::begin_panic::h81d44c05963fa168
  13:     0x7f812cdc8cdc - <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop::h25de78a9e6dff3f2
  14:     0x7f812aed34e6 - core::ptr::real_drop_in_place::h9c6508b592c1d638
  15:     0x7f812aed80a3 - <alloc::rc::Rc<T> as core::ops::drop::Drop>::drop::h071d376be54d060e
  16:     0x7f812af1f11c - core::ptr::real_drop_in_place::hbbcadcaa3930f1de
  17:     0x7f812af1a809 - rustc_interface::interface::run_compiler_in_existing_thread_pool::hc0c5fb91eaefa48a
  18:     0x7f812aec95a1 - std::thread::local::LocalKey<T>::with::h47f871d4948616e8
  19:     0x7f812aec24de - scoped_tls::ScopedKey<T>::set::h35e3aee7969efb0c
  20:     0x7f812aee8862 - syntax::with_globals::h9899c44fce69c29e
  21:     0x7f812aec382b - std::sys_common::backtrace::__rust_begin_short_backtrace::h7c08dd05be391ff7
  22:     0x7f812aa06d1a - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:81
  23:     0x7f812aede219 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hc69113382c8c4814
  24:     0x7f812a9d787f - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h21cb5edd552bea91
                               at /rustc/a44774c3a9739b2eea8923e09d67b14312c78ef3/src/liballoc/boxed.rs:942
  25:     0x7f812aa05740 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::hb548d9c171babe6b
                               at /rustc/a44774c3a9739b2eea8923e09d67b14312c78ef3/src/liballoc/boxed.rs:942
  26:     0x7f812aa05740 - std::sys_common::thread::start_thread::hb5b09c960584ac18
                               at src/libstd/sys_common/thread.rs:13
  27:     0x7f812aa05740 - std::sys::unix::thread::Thread::new::thread_start::h341c42eadd8ca9e6
                               at src/libstd/sys/unix/thread.rs:79
  28:     0x7f812a944669 - start_thread
  29:     0x7f812a859323 - clone
  30:                0x0 - <unknown>

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.41.0-nightly (a44774c3a 2019-11-25) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental --crate-type lib

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `ice_testcase`.

@jonas-schievink jonas-schievink added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ I-nominated T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 26, 2019
@hellow554

This comment has been minimized.

@rustbot rustbot added E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Nov 26, 2019
@jonas-schievink
Copy link
Contributor

jonas-schievink commented Nov 26, 2019

The types in the ICE message are:

Matrix<f64, U2, U1, ArrayStorage<f64, U2, U1>>
Matrix<f64, U2, U1, <DefaultAllocator as Allocator<f64, U2>>::Buffer>

That does look like a missing normalization, but those are not usually so hard to reproduce.

@hellow554

This comment has been minimized.

@Andlon
Copy link
Author

Andlon commented Nov 26, 2019

@hellow554: I turned off incremental compilation for all my tests. The bug is completely reproducible without incremental compilation.

EDIT: See clarification below.

@Andlon
Copy link
Author

Andlon commented Nov 26, 2019

@hellow554: sorry, my initial statement was unclear and might be misunderstood. What I meant is that incremental compilation has no influence on the "hard to reproduce" property of the bug. I explicitly turned off incremental compilation for all my debugging, and the weird behavior with e.g. removing dependencies or features still persisted.

@WildCryptoFox
Copy link
Contributor

WildCryptoFox commented Nov 26, 2019

Especially bizarre is when you substitute "default" for "std" when default only implies "std" in the Cargo.toml for [dependencies.nalgebra]. Non-default doesn't ICE despite not influencing the generated code at all AFAICT.

@hellow554
Copy link
Contributor

This issue reminds of #66353 which has been fixed by #66388.

Bisection shows regression somewhere between b9de4ef...c6e9c76 but I can't find a commit that would make sense... :/

@jonas-schievink
Copy link
Contributor

Probably bisection is going to be difficult since the bug is so hard to reliably reproduce. It would help to reduce it further (removing the nalgebra dependency) and figuring out why the issue only happens sometimes (and what changes when it doesn't happen).

@pnkfelix pnkfelix changed the title Broken MIR ICE nalgebra NoSolution Broken MIR ICE Nov 28, 2019
@pnkfelix pnkfelix added P-high High priority and removed I-nominated labels Nov 28, 2019
@jethrogb
Copy link
Contributor

Reduced example gives "broken MIR" error on current stable & nightly:

#![no_std]
use core::ops::{Add, Mul};
use core::marker::PhantomData;

fn problematic_function<Space>(material_surface_element: Edge2dElement)
where
    DefaultAllocator: FiniteElementAllocator<DimU1, Space>,
{
    let _: Point2<f64> = material_surface_element.map_reference_coords().into();
}

impl<T> ArrayLength<T> for UTerm {
    type ArrayType = ();
}
impl<T, N: ArrayLength<T>> ArrayLength<T> for UInt<N, B0> {
    type ArrayType = GenericArrayImplEven<T, N>;
}
impl<T, N: ArrayLength<T>> ArrayLength<T> for UInt<N, B1> {
    type ArrayType = GenericArrayImplOdd<T, N>;
}
impl<U> Add<U> for UTerm {
    type Output = U;
    fn add(self, _: U) -> Self::Output {
        unimplemented!()
    }
}
impl<Ul, Ur> Add<UInt<Ur, B1>> for UInt<Ul, B0>
where
    Ul: Add<Ur>,
{
    type Output = UInt<Sum<Ul, Ur>, B1>;
    fn add(self, _: UInt<Ur, B1>) -> Self::Output {
        unimplemented!()
    }
}
impl<U> Mul<U> for UTerm {
    type Output = UTerm;
    fn mul(self, _: U) -> Self {
        unimplemented!()
    }
}
impl<Ul, B, Ur> Mul<UInt<Ur, B>> for UInt<Ul, B0>
where
    Ul: Mul<UInt<Ur, B>>,
{
    type Output = UInt<Prod<Ul, UInt<Ur, B>>, B0>;
    fn mul(self, _: UInt<Ur, B>) -> Self::Output {
        unimplemented!()
    }
}
impl<Ul, B, Ur> Mul<UInt<Ur, B>> for UInt<Ul, B1>
where
    Ul: Mul<UInt<Ur, B>>,
    UInt<Prod<Ul, UInt<Ur, B>>, B0>: Add<UInt<Ur, B>>,
{
    type Output = Sum<UInt<Prod<Ul, UInt<Ur, B>>, B0>, UInt<Ur, B>>;
    fn mul(self, _: UInt<Ur, B>) -> Self::Output {
        unimplemented!()
    }
}
impl<N, R, C> Allocator<N, R, C> for DefaultAllocator
where
    R: DimName,
    C: DimName,
    R::Value: Mul<C::Value>,
    Prod<R::Value, C::Value>: ArrayLength<N>,
{
    type Buffer = ArrayStorage<N, R, C>;
    fn allocate_uninitialized(_: R, _: C) -> Self::Buffer {
        unimplemented!()
    }
    fn allocate_from_iterator<I>(_: R, _: C, _: I) -> Self::Buffer {
        unimplemented!()
    }
}
impl<N, C> Allocator<N, Dynamic, C> for DefaultAllocator {
    type Buffer = VecStorage<N, Dynamic, C>;
    fn allocate_uninitialized(_: Dynamic, _: C) -> Self::Buffer {
        unimplemented!()
    }
    fn allocate_from_iterator<I>(_: Dynamic, _: C, _: I) -> Self::Buffer {
        unimplemented!()
    }
}
impl DimName for DimU1 {
    type Value = U1;
    fn name() -> Self {
        unimplemented!()
    }
}
impl DimName for DimU2 {
    type Value = U2;
    fn name() -> Self {
        unimplemented!()
    }
}
impl<N, D> From<VectorN<N, D>> for Point<N, D>
where
    DefaultAllocator: Allocator<N, D>,
{
    fn from(_: VectorN<N, D>) -> Self {
        unimplemented!()
    }
}
impl<GeometryDim, NodalDim> FiniteElementAllocator<GeometryDim, NodalDim> for DefaultAllocator where
    DefaultAllocator: Allocator<f64, GeometryDim> + Allocator<f64, NodalDim>
{
}
impl ReferenceFiniteElement for Edge2dElement {
    type NodalDim = DimU1;
}
impl FiniteElement<DimU2> for Edge2dElement {
    fn map_reference_coords(&self) -> Vector2<f64> {
        unimplemented!()
    }
}

type Owned<N, R, C> = <DefaultAllocator as Allocator<N, R, C>>::Buffer;
type MatrixMN<N, R, C> = Matrix<N, R, C, Owned<N, R, C>>;
type VectorN<N, D> = MatrixMN<N, D, DimU1>;
type Vector2<N> = VectorN<N, DimU2>;
type Point2<N> = Point<N, DimU2>;
type U1 = UInt<UTerm, B1>;
type U2 = UInt<UInt<UTerm, B1>, B0>;
type Sum<A, B> = <A as Add<B>>::Output;
type Prod<A, B> = <A as Mul<B>>::Output;

struct GenericArray<T, U: ArrayLength<T>> {
    _data: U::ArrayType,
}
struct GenericArrayImplEven<T, U> {
    _parent2: U,
    _marker: T,
}
struct GenericArrayImplOdd<T, U> {
    _parent2: U,
    _data: T,
}
struct B0;
struct B1;
struct UTerm;
struct UInt<U, B> {
    _marker: PhantomData<(U, B)>,
}
struct DefaultAllocator;
struct Dynamic;
struct DimU1;
struct DimU2;
struct Matrix<N, R, C, S> {
    _data: S,
    _phantoms: PhantomData<(N, R, C)>,
}
struct ArrayStorage<N, R, C>
where
    R: DimName,
    C: DimName,
    R::Value: Mul<C::Value>,
    Prod<R::Value, C::Value>: ArrayLength<N>,
{
    _data: GenericArray<N, Prod<R::Value, C::Value>>,
}
struct VecStorage<N, R, C> {
    _data: N,
    _nrows: R,
    _ncols: C,
}
struct Point<N, D>
where
    DefaultAllocator: Allocator<N, D>,
{
    _coords: VectorN<N, D>,
}
struct Edge2dElement;

trait ArrayLength<T> {
    type ArrayType;
}
trait Allocator<Scalar, R, C = DimU1> {
    type Buffer;
    fn allocate_uninitialized(nrows: R, ncols: C) -> Self::Buffer;
    fn allocate_from_iterator<I>(nrows: R, ncols: C, iter: I) -> Self::Buffer;
}
trait DimName {
    type Value;
    fn name() -> Self;
}
trait FiniteElementAllocator<GeometryDim, NodalDim>:
    Allocator<f64, GeometryDim> + Allocator<f64, NodalDim>
{
}
trait ReferenceFiniteElement {
    type NodalDim;
}
trait FiniteElement<GeometryDim>: ReferenceFiniteElement
where
    DefaultAllocator: FiniteElementAllocator<GeometryDim, Self::NodalDim>,
{
    fn map_reference_coords(&self) -> VectorN<f64, GeometryDim>;
}

@jethrogb
Copy link
Contributor

BTW I made extensive use of C-reduce and rust-reduce to get here, which I notice @pnkfelix didn't mention in his blog ;)

@pnkfelix
Copy link
Member

pnkfelix commented Feb 7, 2020

Did this ever work, by the way? This is tagged "needs-bisect", but that won't help if this isn't a regression... (or maybe the bisection is just to identify whether or not this is a regression?)

@pnkfelix
Copy link
Member

pnkfelix commented Feb 7, 2020

BTW I made extensive use of C-reduce and rust-reduce to get here, which I notice @pnkfelix didn't mention in his blog ;)

shots fired!

(I admit I didn't mention them there, in part because I have little experience using them. I should try using them, and maybe try adding my techniques to rust-reduce.)

@WildCryptoFox
Copy link
Contributor

WildCryptoFox commented Feb 7, 2020

Did this ever work, by the way?

@pnkfelix yes, there was discussion prior to determining these are separate issues.

@pnkfelix
Copy link
Member

pnkfelix commented Feb 12, 2020

@WildCryptoFox the discussion you linked talks about the problem going away between nightlies for 2019-11-15 and 2019-11-16. to my eye, that is not an example of this code having worked in the past, but rather makes it an example of an intermittent failure...

(I know at that point it may be in the eye of the beholder...)

more specifically, when running atop @jethrogb 's reduction, I continue to see an ICE as far back as nightly-2019-01-01. (I'll pull up some older nightlies in a bit... I had cleaned out my ~/.rustup directory a while back to free up space on my laptop and decided that I surely wouldn't need anything from 2018 or earlier...)

@steffahn
Copy link
Member

steffahn commented Mar 31, 2020

The reduced example gives a broken MIR error since nightly-2017-08-31.

ICE on nightly-2017-08-31
error: internal compiler error: broken MIR in NodeId(9) (Terminator { source_info: SourceInfo { span: main.rs:9:26: 9:73, scope: scope1 }, kind: _4 = const FiniteElement::map_reference_coords(_5) -> bb1 }): call dest mismatch (Matrix<f64, DimU2, DimU1, <DefaultAllocator as Allocator<f64, DimU2>>::Buffer> <- Matrix<f64, DimU2, DimU1, ArrayStorage<_, _, _>>): Sorts(ExpectedFound { expected: <DefaultAllocator as Allocator<f64, DimU2>>::Buffer, found: ArrayStorage<_, _, _> })
 --> main.rs:9:26
  |
9 |     let _: Point2<f64> = material_surface_element.map_reference_coords().into();
  |                          ^^^^^^^^^^^^^^^^^^^^^^^^

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.21.0-nightly (7eeac1b81 2017-08-30) running on x86_64-pc-windows-msvc

note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'Box<Any>', src\librustc_errors\lib.rs:439:8
stack backtrace:
   0: _rdl_shrink_in_place
   1: std::panicking::Location::column
   2: std::panicking::Location::column
   3: std::panicking::rust_panic_with_hook
   4: <unknown>
   5: <unknown>
   6: <rustc_mir::transform::type_check::TypeVerifier<'a, 'b, 'gcx, 'tcx> as rustc::mir::visit::Visitor<'tcx>>::visit_mir
   7: <rustc_mir::transform::type_check::TypeckMir as rustc::mir::transform::MirPass>::run_pass
   8: <rustc_mir::transform::mir_keys::GatherCtors<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_variant_data
   9: <rustc_mir::transform::mir_keys::GatherCtors<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_variant_data
  10: rustc::ty::maps::<impl rustc::ty::maps::queries::mir_const_qualif<'tcx>>::force
  11: rustc::dep_graph::graph::DepGraph::in_task
  12: rustc::ty::maps::<impl rustc::ty::maps::queries::mir_const<'tcx>>::try_get
  13: rustc::ty::maps::TyCtxtAt::mir_const
  14: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::mir_const
  15: <rustc_mir::transform::mir_keys::GatherCtors<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_variant_data
  16: rustc::ty::maps::<impl rustc::ty::maps::queries::mir_const<'tcx>>::force
  17: rustc::dep_graph::graph::DepGraph::in_task
  18: rustc::ty::maps::<impl rustc::ty::maps::queries::mir_validated<'tcx>>::try_get
  19: rustc::ty::maps::TyCtxtAt::mir_validated
  20: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::mir_validated
  21: rustc_borrowck::borrowck::provide
  22: rustc::ty::maps::<impl rustc::ty::maps::queries::coherent_trait<'tcx>>::force
  23: rustc::dep_graph::graph::DepGraph::in_task
  24: rustc::ty::maps::<impl rustc::ty::maps::queries::borrowck<'tcx>>::try_get
  25: rustc::ty::maps::TyCtxtAt::borrowck
  26: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::borrowck
  27: rustc_borrowck::borrowck::check_crate
  28: <rustc_driver::derive_registrar::Finder as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_impl_item
  29: rustc_driver::driver::compile_input
  30: rustc_driver::run_compiler
  31: <unknown>
  32: _rust_maybe_catch_panic
  33: <rustc_driver::derive_registrar::Finder as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_impl_item
  34: std::sys::imp::thread::Thread::new
  35: BaseThreadInitThunk



nightly-2017-08-31 finished with exit code Some(101).

Before that it compiles with nothing but unused-warnings.

This should be an exhaustive list of (merge) commits for that nightly:
09ea6b7 c2f9cc4 b58e31a c66e7fa ca9cf35 51a54b6 7eeac1b

Edit: Going a bit further back, before nightly-2017-07-08 this code again didn’t compile, with no ICE, but an error message about impls of From.

error on nightly-2017-07-07
error[E0277]: the trait bound `Point<f64, DimU2>: core::convert::From<Matrix<f64, DimU2, DimU1, ArrayStorage<f64, DimU2, DimU1>>>` is not satisfied
 --> main.rs:9:74
  |
9 |     let _: Point2<f64> = material_surface_element.map_reference_coords().into();
  |                                                                          ^^^^ the trait `core::convert::From<Matrix<f64, DimU2, DimU1, ArrayStorage<f64, DimU2, DimU1>>>` is not implemented for `Point<f64, DimU2>`
  |
  = help: the following implementations were found:
            <Point<N, D> as core::convert::From<Matrix<N, D, DimU1, <DefaultAllocator as Allocator<N, D>>::Buffer>>>
  = note: required because of the requirements on the impl of `core::convert::Into<Point<f64, DimU2>>` for `Matrix<f64, DimU2, DimU1, ArrayStorage<f64, DimU2, DimU1>>`

error: aborting due to previous error



nightly-2017-07-07 finished with exit code Some(101).

@fanninpm
Copy link

I can't get the MVCE to ice on the latest nightly. Can anyone confirm?

@WildCryptoFox
Copy link
Contributor

WildCryptoFox commented May 13, 2020

@fanninpm The playground agrees using @jethrogb 's reduction. (Still fails on stable)

@Andlon Status for your project?

@JohnTitor
Copy link
Member

JohnTitor commented Aug 5, 2020

I cannot reproduce the ICE with https://github.com/Andlon/ice_testcase or #66768 (comment) since 1.44.0, it compiles fine instead.
Note that we have to tweak the dependencies of ice_testcase like:

--- a/Cargo.toml
+++ b/Cargo.toml
@@ -4,8 +4,8 @@ version = "0.1.0"
 edition = "2018"

 [dependencies.nalgebra]
-git = "https://github.com/rustsim/nalgebra.git"
-rev = "31ef5f0ab02c6ecf279867f07cd63e16cece8b75"
+git = "https://github.com/daingun/nalgebra.git"
+branch = "patch-2"
 default-features = false
 features = ["serde-serialize", "default"]

Otherwise, cargo cannot resolve the deps.

I'm going to mark this as E-needs-test since we could say it's now fixed, even though we didn't bisect.
(And I think #66768 (comment) can be the MCVE of this issue since it seems they have the same cause.)

@JohnTitor JohnTitor added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Aug 5, 2020
@steffahn
Copy link
Member

steffahn commented Aug 5, 2020

even though we didn't bisect

that’s not too much effort, here we go:

searched nightlies: from nightly-2020-02-01 to nightly-2020-08-05
regressed nightly: nightly-2020-04-16
searched commits: from edc0258 to d223029
regressed commit: d12f030

bisected with cargo-bisect-rustc v0.5.2

Host triple: x86_64-pc-windows-msvc
Reproduce with:

cargo bisect-rustc --start 2020-02-01 --with-cargo --access github --regress non-ice

@JohnTitor
Copy link
Member

@JohnTitor JohnTitor removed E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Aug 5, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Aug 16, 2020
Add regression test for issue-66768

Fixes rust-lang#66768

This is fixed by rust-lang#70452 (in particular, https://github.com/rust-lang/rust/pull/70452/files#diff-53aef089a36a8e2ed07627fc8915fe63R1763) and I'm not sure it's worth to add this test (i.e. the tests in rust-lang#70452 are enough), so r? @eddyb to confirm it.
@bors bors closed this as completed in 76b2fce Aug 16, 2020
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. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants