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

Allow use to import declarations into the current namespace, like in Rust #25

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft
Prev Previous commit
Next Next commit
document the new use capabilities in the README
Hugobros3 committed Jul 9, 2024
commit b6f40350b636e3332a3e17d99ea811e3d23c6265
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -125,7 +125,7 @@ mod A {
```rust
mod A {
use super::C;
fn foo() { C::baz() }
fn foo() { baz() }
mod B {
fn bar() { super::foo() }
}
@@ -135,6 +135,17 @@ mod C {
fn baz() { D::bar }
}
```
- Wildcard imports are now supported:
```rust
mod A {
fn f() -> i32 = 42;
fn g() -> i32 = 69;
}
use A::*;

fn main() = f() + g();
```

- Tuples cannot be indexed with constant integers anymore:
```rust
let t = (1, 2);