Skip to content

ICE having include! in code from stdin when calling rustc #63900

Closed
@andjo403

Description

@andjo403

to reproduce the fault this can be used:
echo 'include!("auxiliary/empty.rs"); pub fn main(){}' | rustc -

will result in this ICE:

thread 'rustc' panicked at 'cannot resolve relative path in non-file source ', src/libsyntax/ext/source_util.rs:189:22 note: Run with RUST_BACKTRACE=1 environment variable to display a backtrace. 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.36.0 (a53f9df 2019-07-03) running on x86_64-unknown-linux-gnu

the question is what is the path that shall be used when the code is from stdin maybe some temp file name in the currrent working dir.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️I-needs-decisionIssue: In need of a decision.T-langRelevant to the language team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions