Skip to content

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

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

Closed
bblum opened this issue Jul 20, 2012 · 6 comments
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`)

Comments

@bblum
Copy link
Contributor

bblum commented Jul 20, 2012

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

@pcwalton
Copy link
Contributor

I don't believe this is backwards incompatible.

@graydon
Copy link
Contributor

graydon commented Jun 6, 2013

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

@nikomatsakis
Copy link
Contributor

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

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

@graydon
Copy link
Contributor

graydon commented Jun 6, 2013

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

@graydon
Copy link
Contributor

graydon commented Jun 6, 2013

accepted for backwards-compatible milestone

@pcwalton
Copy link
Contributor

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

celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Fixes were done to address the following upstream changes:

- rust-lang#119606
- rust-lang#119751
- rust-lang#120025
- rust-lang#116520

Resolves rust-lang#2971 

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`)
Projects
None yet
Development

No branches or pull requests

4 participants