Error on Rust Palayground?

24 views
Skip to first unread message

Chester Wyke

unread,
Aug 14, 2022, 4:42:08 PM8/14/22
to Begin Rust
Hi,

I'm working through the begin rust book and using rust playground. In chapter 2 section 3 there is a code example which works find on my local machine but gives me an error in rust playground. The relevant part of the code snippet is:

fn main(/* hey, I can do this! */) {
// snip
}

The comment inside of the brackets in main appears to be causing some confusion on rust playground. If changed to:

fn main() {
   // snip
}

Then it works fine with no error. Going to file an issue with rust playground but just mentioning it in case anyone else is bumping up against this issue.

Chester Wyke

unread,
Aug 14, 2022, 4:58:50 PM8/14/22
to Begin Rust
Turns out there is an existing issue for this. I will update with the conclusion of the output of the ticket. I proposed to submit a PR to fix it so that it will work with the example.

Just out of curiosity did it always used to do this on this example, or were the examples tried locally (where it works without issue) or did rust playground change after the book was written? Not trying to assign fault in any way just curious. Really enjoying the book so far. Working well with my 6 year old (have to teach her some of the math as we go but that's a plus not a problem).

Michael Snoyman

unread,
Aug 15, 2022, 7:06:39 AM8/15/22
to Begin Rust
Thanks for tracking that down! To answer your question: I _think_ we tested that code sample (and all the others) in the Playground, but I can't be 100% certain.

I'm really happy to hear it's going well! I think a 6 year old is the youngest user of the book I've heard of so far. I'd certainly be interested to hear more about how the progress goes.
--
You received this message because you are subscribed to the Google Groups "Begin Rust" group.
To unsubscribe from this group and stop receiving emails from it, send an email to begin-rust+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chester Wyke

unread,
Aug 15, 2022, 2:46:18 PM8/15/22
to Begin Rust
Hi,

Thanks for the response. Happy to let you know how it goes. So far it's going well. She's enjoying the math she needs to learn in the process. Right now she's having fun building the trees for section 2.4

John T. Reagan

unread,
Mar 14, 2023, 7:41:59 PM3/14/23
to Begin Rust
I'm posting here because I couldn't find a place to start a new conversation.  This is the newest post.  Is this group still working as a good place to ask questions?



Chester Wyke

unread,
Mar 14, 2023, 7:45:17 PM3/14/23
to John T. Reagan, Begin Rust
I'd say it's a fine place to ask a question. Probably a new topic might be better unless it's related to what I asked.

image.png



Best Regards,
Chester Wyke


On Tue, Mar 14, 2023 at 7:42 PM John T. Reagan <johnt...@gmail.com> wrote:
I'm posting here because I couldn't find a place to start a new conversation.  This is the newest post.  Is this group still working as a good place to ask questions?



--
You received this message because you are subscribed to a topic in the Google Groups "Begin Rust" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/begin-rust/YBLHzmn58os/unsubscribe.
To unsubscribe from this group and all its topics, send an email to begin-rust+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/begin-rust/4a54f7c3-bcd0-4f7e-aade-22661e482833n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages