Skip to content

Commit

Permalink
include renaming 'self' in a group import
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Jul 22, 2015
1 parent b032d5d commit d0e72a7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions text/0000-use-group-as.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ This RFC proposes changing the grammar to something like:
| '{' path_item [ ',' path_item ] * '}' ;
path_item : ident [ "as" ident] ?
| "self" ;
| "self" [ "as" ident];
```

The `"as" ident` part is optional in each location, and if omitted, it is expanded
to alias to the same name, e.g. `use foo::{bar}` expands to `use foo::{bar as bar}`.

This includes being able to rename `self`, such as `use std::io::{self
as stdio, Result as IoResult};`.

# Drawbacks

# Alternatives

# Unresolved questions

- **Should `self` also be aliasable?** So you could write `use foo::{self as xfoo, bar}`.

# Unresolved Questions

0 comments on commit d0e72a7

Please sign in to comment.