Skip to content

Incorrect source file paths for inlined stdlib code  #57191

Closed
@rocallahan

Description

@rocallahan

This seems related to #34179 ... CCing @luser @tromey.

I did cargo new --bin test_crate; cd test_crate; cargo build; objdump --dwarf=rawline target/debug/test_crate. The output for the first compilation unit has

 The Directory Table (offset 0x1c):
  1     libstd/sys/unix/process
  2     src

 The File Name Table (offset 0x39):
  Entry Dir     Time    Size    Name
  1     1       0       0       process_common.rs
  2     2       0       0       main.rs

If I understand #34187 correctly the intent was that the stdlib code (process_common.rs in this case) should have been given an absolute path, since test_crate/libstd/sys/unix/process/process_common.rs certainly doesn't exist. But here we are. rustc 1.31.1 (b6c32da9b 2018-12-18).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions