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

Slice syntax doesn't compile with no_std #22102

Closed
kmcallister opened this issue Feb 8, 2015 · 1 comment
Closed

Slice syntax doesn't compile with no_std #22102

kmcallister opened this issue Feb 8, 2015 · 1 comment
Labels
A-syntaxext Area: Syntax extensions

Comments

@kmcallister
Copy link
Contributor

#![feature(no_std)]
#![no_std]

extern crate "std" as other;
extern crate core;

fn main() {
    [0i32][];
}
$ rustc --version
rustc 1.0.0-dev (012e9643e 2015-02-08 16:47:12 +0000)

$ rustc foo.rs
foo.rs:8:5: 8:8 error: failed to resolve. Maybe a missing `extern crate std`?
foo.rs:8     [0i32][];
             ^~~
foo.rs:8:5: 8:13 error: `std::ops::RangeFull` does not name a structure
foo.rs:8     [0i32][];
             ^~~~~~~~
error: aborting due to 2 previous errors

The desugaring happens in the parser.

See also #20516. Was #21827.

@kmcallister kmcallister added A-syntaxext Area: Syntax extensions A-freestanding labels Feb 8, 2015
@alexcrichton
Copy link
Member

Looks like this has been fixed on nightly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-syntaxext Area: Syntax extensions
Projects
None yet
Development

No branches or pull requests

2 participants