You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"use std" before #[link(...)] in .rc file causes an error #2243
That inner attributes (attributes terminated with a semi) must come before any module contents is intentional, but this gotcha has come up before. Should we allow attributes anywhere in a module to apply to that module? It seems like too much action at a distance if, e.g. 2000 lines into parser.rs you wrote #[cfg(target_os = "macos")];.
Agreed. Would it be worth while to have a "better error message please" category? Similar to #1208 . Also, #2569 seems to be the canonical bug on the topic of inner attributes.
It's definitely a worse gotcha to have accidental semicolons cause entire modules to be #[ignore]d or whatever. Improved error message is the way to go.
Activity
brson commentedon Apr 19, 2012
That inner attributes (attributes terminated with a semi) must come before any module contents is intentional, but this gotcha has come up before. Should we allow attributes anywhere in a module to apply to that module? It seems like too much action at a distance if, e.g. 2000 lines into parser.rs you wrote
#[cfg(target_os = "macos")];.Maybe we could have a better error message.
jbclements commentedon Apr 25, 2013
Agreed. Would it be worth while to have a "better error message please" category? Similar to #1208 . Also, #2569 seems to be the canonical bug on the topic of inner attributes.
pcwalton commentedon May 16, 2013
I don't believe this is backwards incompatible, renominating.
graydon commentedon Jun 6, 2013
just a bug, removing milestone/nomination.
bblum commentedon Aug 12, 2013
It's definitely a worse gotcha to have accidental semicolons cause entire modules to be #[ignore]d or whatever. Improved error message is the way to go.
flaper87 commentedon Apr 16, 2014
Visiting for triage: @cmr are you planing to create a PR for those commits?
emberian commentedon Apr 16, 2014
Oops. I'll get to it in ~2 weeks.
alexcrichton commentedon Aug 10, 2014
I believe this has been satisfactorily fixed with unused attribute warnings.
Auto merge of rust-lang#2243 - saethlin:color-always, r=oli-obk
Automate CBMC update (rust-lang#2895)
Merge pull request rust-lang#2243 from Kobzol/pull-cron
Merge rust-lang#2243