about summary refs log tree commit diff
path: root/src/rustllvm/ExecutionEngineWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-10-04 04:27:05 +0000
committerbors <bors@rust-lang.org>2014-10-04 04:27:05 +0000
commit8794107f74682607f368776cc8b78820629778e6 (patch)
tree989174ccb800fb13840b843ac246eeea0f1c9c1b /src/rustllvm/ExecutionEngineWrapper.cpp
parent908c9e6a1b94674eee2727edb25dda58727a03b7 (diff)
parent9040948ef39ed66a700a9dacfab29a8ddf723888 (diff)
downloadrust-8794107f74682607f368776cc8b78820629778e6.tar.gz
rust-8794107f74682607f368776cc8b78820629778e6.zip
auto merge of #17754 : O-I/rust/update-guide, r=steveklabnik
Hi,

These are a few small edits to the Guide that I made while reading online. Really well done and approachable.

I have a few questions below, but I don't know if this is the proper place to ask them, so feel free to ignore the below.

1. Trailing commas seem to be a convention in Rust and are used quite a bit throughout the Guide, but are never explicitly mentioned. Maybe adding a short mention about them when they first appear in the Structs section might be helpful to those who are unfamiliar with or don't use them in other languages.

2. In the Iterators section, there is a block of code like this:

```rust
let mut range = range(0i, 10i);

loop {
    match range.next() {
        Some(x) => {
            println!("{}", x);
        }  // no comma needed?
        None => { break }
    }
}
```

My inclination would be to put a comma where the comment is to separate the two arms to get this to compile, but it runs fine either way. Is there a convention on commas for scenarios like this where each arm is enclosed in `{}`?

All the best,
O-I
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions