Skip to content

Update for.md#2008

Open
Itshardtogiveyourselfaname wants to merge 1 commit intorust-lang:masterfrom
Itshardtogiveyourselfaname:patch-1
Open

Update for.md#2008
Itshardtogiveyourselfaname wants to merge 1 commit intorust-lang:masterfrom
Itshardtogiveyourselfaname:patch-1

Conversation

@Itshardtogiveyourselfaname
Copy link
Copy Markdown

I recently discovered the issue for myself, that you can write the following code:

for i in 10..1{
println!("Hello World");
}

This code does nothing, but you dont get a compiler warning and nothing and this isnt described in the rust handbook either. I dont think I can be the only beginner stumbling over this, so theres a possible solution. I dont know if the way I wrote it fits in with the writing style of the book, but just adjust it as needed :)

I recently discovered the issue for myself, that you can write the following code:

for i in 10..1{
println!("Hello World");
} 

This code does nothing, but you dont get a compiler warning and nothing and this isnt described in the rust handbook either. 
I dont think I can be the only beginner stumbling over this, so theres a possible solution.  I dont know if the way I wrote it fits in with the writing style of the book, but just adjust it as needed :)
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 5, 2026

r? @marioidival

rustbot has assigned @marioidival.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @marioidival

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants