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

Document where use directives are allowed #3862

Closed
brson opened this issue Oct 25, 2012 · 3 comments · Fixed by #11584
Closed

Document where use directives are allowed #3862

brson opened this issue Oct 25, 2012 · 3 comments · Fixed by #11584
Labels
A-resolve Area: Name resolution C-enhancement Category: An issue proposing an enhancement or a PR with one. P-medium Medium priority
Milestone

Comments

@brson
Copy link
Contributor

brson commented Oct 25, 2012

I expect this to work:

impl CssSelectResultsRef {                                                                                                                                                    
    use properties::CssColorProp;                                                                                                                                             
    fn computed_color(element: css_pseudo_element) -> CssColorProp {                                                                                                          
        fail                                                                                                                                                                  
    }                                                                                                                                                                         
}         
@catamorphism
Copy link
Contributor

I think this is obsolete what with the new rules about where use directives are allowed. The documentation doesn't seem to be up to date. I'm going to change the bug title and nominate this for milestone 1, well-defined.

@graydon
Copy link
Contributor

graydon commented May 16, 2013

accepted for backwards-compatible milestone

@alexcrichton
Copy link
Member

From reading the manual, this is well documented for use in mods, but there's no documentation indicating that these can be placed at the beginning of blocks. I also wasn't able to find a good section documenting what a block is, so those two should probably happen at the same time.

bors added a commit that referenced this issue Jan 17, 2014
Turns out there is no documentation of a block expression in the rust manual currently! I deleted the "record expressions" section to make room for a "block expressions" section.

Closes #3862
RalfJung pushed a commit to RalfJung/rust that referenced this issue Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-resolve Area: Name resolution C-enhancement Category: An issue proposing an enhancement or a PR with one. P-medium Medium priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants