Skip to content

Commit

Permalink
Merge pull request rust-lang#780 from GeeF/patch-1
Browse files Browse the repository at this point in the history
Fix and clarify section on re-export
  • Loading branch information
Centril authored Mar 26, 2020
2 parents e2f11fe + 702bc78 commit 59c1c1d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/items/use-declarations.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,18 @@ cannot be resolved unambiguously, they represent a compile-time error.
An example of re-exporting:

```rust
# fn main() { }
mod quux {
pub use quux::foo::{bar, baz};

pub use self::foo::{bar, baz};
pub mod foo {
pub fn bar() { }
pub fn baz() { }
pub fn bar() {}
pub fn baz() {}
}
}

fn main() {
quux::bar();
quux::baz();
}
```

In this example, the module `quux` re-exports two public names defined in
Expand Down

0 comments on commit 59c1c1d

Please sign in to comment.