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

Compiler silently ignores #[warn(..)] attributes where non-applicable #2946

Closed
bblum opened this issue Jul 18, 2012 · 1 comment
Closed

Compiler silently ignores #[warn(..)] attributes where non-applicable #2946

bblum opened this issue Jul 18, 2012 · 1 comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR)

Comments

@bblum
Copy link
Contributor

bblum commented Jul 18, 2012

The same ICFP (#2928) teammate as in bug #2942 was also confused by this code, which warns about the implicit copy on x:

enum asdf = int;
impl foo for asdf {
    #[warn(no_implicit_copies)]
    fn foo(x: ~[asdf]) -> ~[asdf] { x } 
}
fn main() {
    asdf(5).foo(~[]);
}

Moving the #[warn(..)] up to the top level makes it compile with no warnings.

@graydon
Copy link
Contributor

graydon commented Apr 24, 2013

dupe of 2647

@graydon graydon closed this as completed Apr 24, 2013
RalfJung pushed a commit to RalfJung/rust that referenced this issue Jun 29, 2023
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR)
Projects
None yet
Development

No branches or pull requests

2 participants