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

Whitelist attributes for 1.0 #20619

Closed
huonw opened this issue Jan 6, 2015 · 7 comments
Closed

Whitelist attributes for 1.0 #20619

huonw opened this issue Jan 6, 2015 · 7 comments
Assignees
Labels
P-low Low priority

Comments

@huonw
Copy link
Member

huonw commented Jan 6, 2015

There's probably a few/many attributes the compiler supports that we do not wish to stabilise at 1.0, but it may be hard to catch them all. We could have a whitelist of attributes that every attribute access is checked against, emitting an error if it is not in the whitelist and the feature gate (e.g. non_whitelisted_attributes) is not enabled.

@brson
Copy link
Contributor

brson commented Jan 6, 2015

The one I saw today and was worried about was recursion_limit.

@nikomatsakis
Copy link
Contributor

The recursion_limit is there to prevent us from looping infinitely (or overflowing the stack) in various cases that can grow without bound. Examples are trait resolution and monomorphization. Right now we have a single limit that you can raise for all things. It's conceivable we might want to change the design -- for example, a scale factor might be better than an absolute value. Still, I'd prefer to have something finalized and in place for 1.0, because some programs will need this tuning knob (servo has used it, for example). @brson's concern was that the correct value for this knob is implementation dependent: this is somewhat true. The algorithms are inherently unbounded, but the depth required can be affected by various impl details such as the choice of iteration order or the use of caching.

@nikomatsakis
Copy link
Contributor

Seems related to rust-lang/rfcs#572

@brson brson added this to the 1.0 milestone Jan 15, 2015
@brson brson added P-low Low priority and removed I-nominated labels Jan 15, 2015
@brson
Copy link
Contributor

brson commented Jan 15, 2015

nbd if it doesn't happen

@nikomatsakis nikomatsakis self-assigned this Apr 2, 2015
@brson
Copy link
Contributor

brson commented Apr 9, 2015

The mechanism is already in place for this. feature_gate.rs classifies all known attributes, some as gated. The only thing left to do here I think is decide that the current classification is correct.

@steveklabnik steveklabnik removed this from the 1.0 milestone May 21, 2015
@sfackler
Copy link
Member

I believe this has been done and can be closed.

@Gankra
Copy link
Contributor

Gankra commented May 21, 2015

Certainly too late to change, regardless.

@Gankra Gankra closed this as completed May 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-low Low priority
Projects
None yet
Development

No branches or pull requests

6 participants