Closed
Description
Found while filling issue #18501
STR
// fmt.rs
struct Foo;
// This is the ICE trigger
struct Formatter;
trait Show {
fn fmt(&self);
}
impl Show for Foo {
fn fmt(&self) {}
}
fn bar<T>(f: extern "Rust" fn(&T), t: &T) {}
// ICE requirement: this has to be marked as inline
#[inline]
pub fn baz() {
bar(Show::fmt, &Foo);
}
// main.rs
extern crate fmt;
fn main() {
::fmt::baz();
}
Output
$ rustc --crate-type=lib fmt.rs && rustc -L . main.rs
task 'rustc' panicked at 'no path elem for NodeStmt(Spanned { node: StmtSemi(Expr { id: 10, node: ExprCall(Expr { id: 11, node: ExprPath(Path { span: Span { lo: BytePos(46), hi: BytePos(56), expn_id: ExpnId(4294967295) }, global: true, segments: [PathSegment { identifier: "fmt"(60)#0, lifetimes: [], types: OwnedSlice {{}} }, PathSegment { identifier: "baz"(62)#0, lifetimes: [], types: OwnedSlice {{}} }] }), span: Span { lo: BytePos(46), hi: BytePos(56), expn_id: ExpnId(4294967295) } }, []), span: Span { lo: BytePos(46), hi: BytePos(58), expn_id: ExpnId(4294967295) } }, 9), span: Span { lo: BytePos(46), hi: BytePos(59), expn_id: ExpnId(4294967295) } })', /var/tmp/paludis/build/dev-lang-rust-scm/work/rust-scm/src/libsyntax/ast_map/mod.rs:411
I couldn't get a backtrace with RUST_BACKTRACE
nor with gdb
Version
rustc 0.13.0-dev (82045ca36 2014-10-31 11:16:44 +0000)
cc @nick29581