Skip to content

compiler panic (on stable) when trying to implement trait for enum member #31699

Closed
@flying-sheep

Description

@flying-sheep

offending code:

impl From<function::ArgumentType> for function::Error::WrongType {
    fn from(arg_type: function::ArgumentType) -> function::Error::WrongType {

    }
}

where “function” is sxd_xpath::function

backtrace:

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:367
stack backtrace:
   1:     0x7fca9a518ad0 - sys::backtrace::tracing::imp::write::hab863fe071b2ab40G0t
   2:     0x7fca9a51f6b5 - panicking::log_panic::_<closure>::closure.41218
   3:     0x7fca9a51f14f - panicking::log_panic::hf48e729df98b0b98W7x
   4:     0x7fca9a4e87a3 - sys_common::unwind::begin_unwind_inner::he149221c893514bafTs
   5:     0x7fca9a4e9108 - sys_common::unwind::begin_unwind_fmt::h76025582fb6dc4f7lSs

   6:     0x7fca9a516921 - rust_begin_unwind
   7:     0x7fca9a55cb8f - panicking::panic_fmt::h61cf019703dfce9dLFK
   8:     0x7fca9a55d1c8 - panicking::panic::ha1e522b9c3aef120iEK
   9:     0x7fca986a6688 - astconv::finish_resolving_def_to_ty::h5d33d451a073c83dYIw
  10:     0x7fca986574bb - astconv::ast_ty_to_ty::h0600161d6a5b07ecsKw
  11:     0x7fca987343ea - collect::convert_item::h51b4e04b669f38897vy
  12:     0x7fca9873101b - collect::_<impl>::visit_item::h7609c1b427098effRRx
  13:     0x7fca98613ce2 - collect::collect_item_types::hf0b5d2fe225176d7fJx
  14:     0x7fca986105e3 - check_crate::h59e62ba807f72882jxD
  15:     0x7fca9aa13a08 - driver::phase_3_run_analysis_passes::_<closure>::closure.25590
  16:     0x7fca9a9f7573 - middle::ty::context::_<impl>::create_and_enter::create_and_enter::h13769573967675817450
  17:     0x7fca9a9f2fb1 - driver::phase_3_run_analysis_passes::h11828585256869968594
  18:     0x7fca9a9c82b9 - driver::compile_input::h11272f634c6ad992hca
  19:     0x7fca9a9ba4db - run_compiler::h98a9a809e704e6c5Owc
  20:     0x7fca9a9b7196 - sys_common::unwind::try::try_fn::try_fn::h17568269690421307877
  21:     0x7fca9a516768 - __rust_try
  22:     0x7fca9a50e06b - sys_common::unwind::try::inner_try::h9e6b3ceacaea5d44NPs
  23:     0x7fca9a9b74f0 - boxed::_<impl>::call_box::call_box::h14495816298810048001
  24:     0x7fca9a51dbb3 - sys::thread::_<impl>::new::thread_start::ha8bf94240aaddd0089w
  25:     0x7fca944084a3 - start_thread
  26:     0x7fca9a1ac13c - clone
  27:                0x0 - <unknown>

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-testCall 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) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions