Skip to content

ICE: "no path elem for NodeStmt(Spanned ..." (UFCS related) #18502

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
japaric opened this issue Nov 1, 2014 · 2 comments · Fixed by #19780
Closed

ICE: "no path elem for NodeStmt(Spanned ..." (UFCS related) #18502

japaric opened this issue Nov 1, 2014 · 2 comments · Fixed by #19780
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.

Comments

@japaric
Copy link
Member

japaric commented Nov 1, 2014

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

@japaric japaric changed the title ICE: "no path elem for NodeStmt(Spanned ..." (UCFS related) ICE: "no path elem for NodeStmt(Spanned ..." (UFCS related) Nov 1, 2014
@Manishearth
Copy link
Member

Note: the breakpoint is now rust_panic, not rust_fail

@bkoropoff
Copy link
Contributor

This seems to be the same underlying problem as #18501 and is fixed by the fix for that issue.

@nrc nrc added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Nov 16, 2014
bors added a commit that referenced this issue Dec 18, 2014
Closes #5988.
Closes #10176.
Closes #10456.
Closes #12744.
Closes #13264.
Closes #13324.
Closes #14182.
Closes #15381.
Closes #15444.
Closes #15480.
Closes #15756.
Closes #16822.
Closes #16966.
Closes #17351.
Closes #17503.
Closes #17545.
Closes #17771.
Closes #17816.
Closes #17897.
Closes #17905.
Closes #18188.
Closes #18232.
Closes #18345.
Closes #18389.
Closes #18400.
Closes #18502.
Closes #18611.
Closes #18783.
Closes #19009.
Closes #19081.
Closes #19098.
Closes #19127.
Closes #19135.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants