Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

When finding item gated behind a cfg flag, point at it #127662

Merged
merged 1 commit into from
Jul 19, 2024

Commits on Jul 12, 2024

  1. When finding item gated behind a cfg flat, point at it

    Previously we would only mention that the item was gated out, and opportunisitically mention the feature flag name when possible. We now point to the place where the item was gated, which can be behind layers of macro indirection, or in different modules.
    
    ```
    error[E0433]: failed to resolve: could not find `doesnt_exist` in `inner`
      --> $DIR/diagnostics-cross-crate.rs:18:23
       |
    LL |     cfged_out::inner::doesnt_exist::hello();
       |                       ^^^^^^^^^^^^ could not find `doesnt_exist` in `inner`
       |
    note: found an item that was configured out
      --> $DIR/auxiliary/cfged_out.rs:6:13
       |
    LL |     pub mod doesnt_exist {
       |             ^^^^^^^^^^^^
    note: the item is gated here
      --> $DIR/auxiliary/cfged_out.rs:5:5
       |
    LL |     #[cfg(FALSE)]
       |     ^^^^^^^^^^^^^
    ```
    estebank committed Jul 12, 2024
    Configuration menu
    Copy the full SHA
    cf09cba View commit details
    Browse the repository at this point in the history