| Age | Commit message (Collapse) | Author | Lines |
|
I just started learning Rust and the absence of an explanation of the for-loop in the beginning really bugged me about the tutorial. Hence I simply added these lines, where I would have expected them. I know that there is something later on in the section on traits. However, this simple iteration scheme feels like something that you should be aware of right away.
|
|
The 'do' keyword was deprecated in 0.10 #11868 , and is keep as
reserved keyword #12157 .
So the tutorial part about it doesn't make sense.
The spawning explanation was move into '15.2 Closure compatibility'.
Fixing misspelling.
Thanks for precisions.
Moved from 15.2 to 15.1.
Fixed typo, and apply pnkfelix advices.
|
|
This notably contains the `extern mod` => `extern crate` change.
Closes #9880
|
|
|
|
This was previously implemented, and it just needed a snapshot to go through
|
|
|
|
|
|
This commit attempts to clarify a section of the tutorial. It also fixes some typos.
|
|
As suggested by @pnkfelix in #12161, this extends the examples by a for-loop
that iterates over a string as an example for container iteration.
|
|
Removed use of globs present in earlier versions of modules.
Fix tutorial.md to reflect `extra::rational` ==> `num::rational`.
|
|
|
|
|
|
This version starts with the simple case and builds on it.
|
|
|
|
|
|
This commit removes the -c, --emit-llvm, -s, --rlib, --dylib, --staticlib,
--lib, and --bin flags from rustc, adding the following flags:
* --emit=[asm,ir,bc,obj,link]
* --crate-type=[dylib,rlib,staticlib,bin,lib]
The -o option has also been redefined to be used for *all* flavors of outputs.
This means that we no longer ignore it for libraries. The --out-dir remains the
same as before.
The new logic for files that rustc emits is as follows:
1. Output types are dictated by the --emit flag. The default value is
--emit=link, and this option can be passed multiple times and have all
options stacked on one another.
2. Crate types are dictated by the --crate-type flag and the #[crate_type]
attribute. The flags can be passed many times and stack with the crate
attribute.
3. If the -o flag is specified, and only one output type is specified, the
output will be emitted at this location. If more than one output type is
specified, then the filename of -o is ignored, and all output goes in the
directory that -o specifies. The -o option always ignores the --out-dir
option.
4. If the --out-dir flag is specified, all output goes in this directory.
5. If -o and --out-dir are both not present, all output goes in the current
directory of the process.
6. When multiple output types are specified, the filestem of all output is the
same as the name of the CrateId (derived from a crate attribute or from the
filestem of the crate file).
Closes #7791
Closes #11056
Closes #11667
|
|
This cleans up a warning about an unused variable and explains the code
further.
|
|
|
|
We generate documentation into the doc/ directory, so we shouldn't be
intermingling source files with generated files
|