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

Restriction, no import of associated items, is not documented #845

Open
ijackson opened this issue Jul 4, 2020 · 0 comments
Open

Restriction, no import of associated items, is not documented #845

ijackson opened this issue Jul 4, 2020 · 0 comments

Comments

@ijackson
Copy link

ijackson commented Jul 4, 2020

Hi. I was using a crate which had a struct with a number of associated items and I was trying to save typing in an error handling function. But:

12 |     use rocket::http::Status::*;
   |                       ^^^^^^ `Status` is a struct, not a module

I looked in the Reference and I wasn't able to find any discussion of this. In particular, I would expect it to be documented in the explanation of Use declarations under Items.

After considerably more digging, I found:

It would be nice if this restriction were documented. See also rust-lang/rust#74030 where I suggest that a better error message would be nice. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant