Skip to content

Diagnostics don't identify cfg condition on use std::os::fd::OwnedFd; #115185

Closed
@joshtriplett

Description

@joshtriplett
Member

Code

use std::os::fd::OwnedFd;

fn main() {}

Current output

/tmp/my-portable-project$ cargo +nightly build --target x86_64-pc-windows-gnu
   Compiling my-portable-project v0.1.0 (/tmp/my-portable-project)
error[E0432]: unresolved import `std::os::fd`
 --> src/main.rs:1:14
  |
1 | use std::os::fd::OwnedFd;
  |              ^^ could not find `fd` in `os`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `my-portable-project` (bin "my-portable-project") due to previous error

Desired output

The output should include the additional information from #109005 identifying the relevant cfg, effectively telling the user that this only exists on unix or wasi, not windows.

Rationale and extra context

No response

Other cases

No response

Anything else?

No response

Activity

added
A-diagnosticsArea: Messages for errors, warnings, and lints
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Aug 24, 2023
added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Aug 24, 2023
joshtriplett

joshtriplett commented on Aug 24, 2023

@joshtriplett
MemberAuthor
added
A-resolveArea: Name/path resolution done by `rustc_resolve` specifically
and removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Aug 24, 2023
added a commit that references this issue on Mar 26, 2024

Rollup merge of rust-lang#122766 - bvanjoi:fix-115185, r=petrochenkov

03f5c4f
added a commit that references this issue on Mar 26, 2024
343444e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @joshtriplett@rustbot@Noratrieb

      Issue actions

        Diagnostics don't identify `cfg` condition on `use std::os::fd::OwnedFd;` · Issue #115185 · rust-lang/rust