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

Develop some combined infrastructure for command-line switches and crate attributes #1632

Closed
brson opened this issue Jan 24, 2012 · 2 comments
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-driver Area: rustc_driver that ties everything together into the `rustc` compiler C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@brson
Copy link
Contributor

brson commented Jan 24, 2012

We are beginning to grow some crate attributes that affect compilation, such as #[crate_type], #[lint(no_ctypes)], #no_core. These are sprouting up in an add-hoc way and usually have corresponding command-line switches.

We should have some mechanism that makes it easy to define these and merge them into the session. Various things that are currently command line switches might ought to have crate attributes.

@graydon
Copy link
Contributor

graydon commented Feb 15, 2012

I'm still happy with the rule that "if it's required to make rustc foo.rs to work by default, it belongs in an attribute not a command-line option".

Following that rule -- which is "attribute heavy" in interpretation -- do we need this bug?

@brson
Copy link
Contributor Author

brson commented Feb 15, 2012

No.

@brson brson closed this as completed Feb 15, 2012
Kobzol pushed a commit to Kobzol/rust that referenced this issue Dec 30, 2024
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
bors pushed a commit to rust-lang-ci/rust that referenced this issue Jan 2, 2025
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-driver Area: rustc_driver that ties everything together into the `rustc` compiler C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants