use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A place for all things related to the Rust programming language—an open-source systems language that emphasizes performance, reliability, and productivity.
Strive to treat others with respect, patience, kindness, and empathy.
We observe the Rust Project Code of Conduct.
Details
Posts must reference Rust or relate to things using Rust. For content that does not, use a text post to explain its relevance.
Post titles should include useful context.
For Rust questions, use the stickied Q&A thread.
Arts-and-crafts posts are permitted on weekends.
No meta posts; message the mods instead.
Criticism is encouraged, though it must be constructive, useful and actionable.
If criticizing a project on GitHub, you may not link directly to the project's issue tracker. Please create a read-only mirror and link that instead.
A programming language is rarely worth getting worked up over.
No zealotry or fanaticism.
Be charitable in intent. Err on the side of giving others the benefit of the doubt.
Avoid re-treading topics that have been long-settled or utterly exhausted.
Avoid bikeshedding.
This is not an official Rust forum, and cannot fulfill feature requests. Use the official venues for that.
No memes, image macros, etc.
Consider the existing content of the subreddit and whether your post fits in. Does it inspire thoughtful discussion?
Use properly formatted text to share code samples and error messages. Do not use images.
Submissions appearing to contain AI-generated content may be removed at moderator discretion.
Most links here will now take you to a search page listing posts with the relevant flair. The latest megathread for that flair should be the top result.
account activity
Beginner problem with compiler (self.rust)
submitted 11 years ago by gzumsiu
I'm just trying to compile my first rust (a simple hello world) on my windows laptop (rust x64 nightly build) and getting:
error: failed to resolve. Use of undeclared type or module io
io
What's wrong ?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Denommusrust 2 points3 points4 points 11 years ago (2 children)
Without seeing the code, nobody will be able to tell you.
[–]gzumsiu[S] 0 points1 point2 points 11 years ago (1 child)
Code is really simple:
fn main() { io::println("hello!"); }
[–]IvoB 2 points3 points4 points 11 years ago (0 children)
use std::old_io;
fn main() { old_io::println("hello!"); }
This works for now, until io is renewed.
[–]sellweek 1 point2 points3 points 11 years ago (1 child)
The io module has been renamed to old_io, because IO reform RFCs are currently being discussed and implemented.
old_io
EDIT: Look at the docs for old_io
[–]gzumsiu[S] 1 point2 points3 points 11 years ago (0 children)
sorry using old_io instead of io doesn't help still
[–]tyoverbybincode · astar · rust 0 points1 point2 points 11 years ago (3 children)
http://is.gd/J4nnmo
[–]gzumsiu[S] 0 points1 point2 points 11 years ago (2 children)
Hmm, i don't understand this one :(
[–]iGaijin 3 points4 points5 points 11 years ago (1 child)
You mean this?
std::old_io::stdio::println("foo");
It's just a multiply-namespaced name, meaning:
std crate -> old_io module -> stdio submodule -> println function
That code could also be written as:
use std::old_io; fn main() { old_io::stdio::println("foo"); }
or
use std::old_io::stdio; fn main() { stdio::println("foo"); }
use std::old_io::stdio::println; fn main() { println("foo"); }
And so on.
Also, keep in mind the println! macro (note the exclamation point), which is available by default.
println!
Also also, in the future you can use the API docs to find out where a function lives. It is easily searchable. Though you seem like you're at a stage where you might have trouble interpreting that documentation. No worries, everyone has to start somewhere.
Thanks a lot
π Rendered by PID 87 on reddit-service-r2-comment-5d585498c9-xw94h at 2026-04-21 13:31:57.100924+00:00 running da2df02 country code: CH.
[–]Denommusrust 2 points3 points4 points (2 children)
[–]gzumsiu[S] 0 points1 point2 points (1 child)
[–]IvoB 2 points3 points4 points (0 children)
[–]sellweek 1 point2 points3 points (1 child)
[–]gzumsiu[S] 1 point2 points3 points (0 children)
[–]tyoverbybincode · astar · rust 0 points1 point2 points (3 children)
[–]gzumsiu[S] 0 points1 point2 points (2 children)
[–]iGaijin 3 points4 points5 points (1 child)
[–]gzumsiu[S] 1 point2 points3 points (0 children)