Skip to content

Later duplicate attributes, e.g. #[ignore(cfg(windows))] #[ignore], are silently ignored #2976

Closed

Description

@bblum

I'd marked a test case with those two attributes, intended to remove the second one later, but the compiler didn't bother with the second one to begin with. This caused a known-buggy test case to run anyway and wedge the build bots on all but windows.

I would have liked to have seen something like warning: duplicate ignore attribute; ignoring the latter

Activity

  1. pcwalton commented on May 16, 2013

    @pcwalton
    Contributor

    I don't believe this is backwards incompatible.

  2. graydon commented on Jun 6, 2013

    @graydon
    Contributor

    bug in #[ignore] in particular, might be more widespread

  3. nikomatsakis commented on Jun 6, 2013

    @nikomatsakis
    Contributor

    What you really want is the union of all ignores, right?

    And possibly a warning if you have a #[ignore] and a #[ignore(...)].

  4. graydon commented on Jun 6, 2013

    @graydon
    Contributor

    this shouldn't warn, it should just do the right thing

  5. graydon commented on Jun 6, 2013

    @graydon
    Contributor

    accepted for backwards-compatible milestone

  6. pcwalton commented on Jun 12, 2013

    @pcwalton
    Contributor

    This was fixed by @luqmana's change. Yay!

  7. added a commit that references this issue on Aug 19, 2026
  8. added a commit that references this issue on Aug 21, 2026
    feff4f3
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-attributes

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions