-
Notifications
You must be signed in to change notification settings - Fork 390
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.
Description
Source
fn main() {
let f: fn(i32) -> Option<i32> = Some::<i32>;
f(42);
}
Output and error
TRACE:miri::step: _1 = std::option::Option<i32>::Some as fn(i32) -> std::option::Option<i32> (ReifyFnPointer)
TRACE:miri::eval_context: _1: Undef
DEBUG:miri::memory: creating fn ptr: 2
TRACE:miri::eval_context: _1: Ptr(Pointer { alloc_id: AllocId(2), offset: 0 })
TRACE:miri::memory: Alloc 2: function pointer: std::prelude::v1::Some: fn(i32) -> std::option::Option<i32>
TRACE:miri::step: StorageLive(_3)
TRACE:miri::step: _3 = _1
TRACE:miri::eval_context: _3: Undef
TRACE:miri::eval_context: _1: Ptr(Pointer { alloc_id: AllocId(2), offset: 0 })
TRACE:miri::memory: Alloc 2: function pointer: std::prelude::v1::Some: fn(i32) -> std::option::Option<i32>
TRACE:miri::eval_context: _3: Ptr(Pointer { alloc_id: AllocId(2), offset: 0 })
TRACE:miri::memory: Alloc 2: function pointer: std::prelude::v1::Some: fn(i32) -> std::option::Option<i32>
TRACE:miri::step: _2 = _3(const 42i32) -> bb1
TRACE:miri::eval_context: _2: Undef
TRACE:miri::eval_context: _3: Ptr(Pointer { alloc_id: AllocId(2), offset: 0 })
TRACE:miri::memory: Alloc 2: function pointer: std::prelude::v1::Some: fn(i32) -> std::option::Option<i32>
DEBUG:miri::memory: reading fn ptr: 2
error: internal compiler error: /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc/ty/subst.rs:476: Type parameter `T/#0` (T/0) out of range when substituting (root type=Some(std::option::Option<T>)) substs=[]
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.