The patch adds the missing pow method for all the implementations of the
Integer trait. This is a small addition that will most likely be
improved by the work happening in #10387.
Fixes#11499
* Reexport io::mem and io::buffered structs directly under io, make mem/buffered
private modules
* Remove with_mem_writer
* Remove DEFAULT_CAPACITY and use DEFAULT_BUF_SIZE (in io::buffered)
cc #11119
* Reexport io::mem and io::buffered structs directly under io, make mem/buffered
private modules
* Remove with_mem_writer
* Remove DEFAULT_CAPACITY and use DEFAULT_BUF_SIZE (in io::buffered)
The patch adds a `pow` function for types implementing `One`, `Mul` and
`Clone` trait.
The patch also renames f32 and f64 pow into powf in order to still have
a way to easily have float powers. It uses llvms intrinsics.
The pow implementation for all num types uses the exponentiation by
square.
Fixes bug #11499
Turns out there is no documentation of a block expression in the rust manual currently! I deleted the "record expressions" section to make room for a "block expressions" section.
Closes#3862
This work is done by execute these commands manually:
$ po4a --copyright-holder="The Rust Project Developers" \
--package-name="Rust" \
--package-version="0.10-pre" \
-M UTF-8 -L UTF-8 \
doc/po4a.conf
$ for f in doc/po/**/*.po; do
> msgattrib --translated $f -o $f.strip
> if [ -e $f.strip ]; then
> mv $f.strip $f
> else
> rm $f
> fi
> done
It should be managed by the build system automatically to use in our
translation workflow, but I've not yet done that.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
The official documentation sorely needs an explanation of the rust runtime and what it is exactly, and I want this guide to provide that information.
I'm unsure of whether I've been too light on some topics while too heavy on others. I also feel like a few things are still missing. As always, feedback is appreciated, especially about things you'd like to see written about!
a30d61b05a removed all of the trailing whitespace in doc/index.md.
Unfortunately, that trailing whitespace was actually markdown syntax for
line breaks.
The `print!` and `println!` macros are now the preferred method of printing, and so there is no reason to export the `stdio` functions in the prelude. The functions have also been replaced by their macro counterparts in the tutorial and other documentation so that newcomers don't get confused about what they should be using.
The .pot files can be generated automatically and the files contain
timestamps in their content. They can cause huge conflicts and take huge
space even if you are not a translator.
This commit is a part of improvement discussed on
https://github.com/mozilla/rust/pull/11383 .
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
This reorganizes the documentation index to be more focused on the in-tree docs, and to clean up the style, and it also adds @steveklabnik's pointer guide.
I was reading through the tutorial and manual pdfs and noticed some of the code blocks have glitches in their formatting:
![](http://i.imgur.com/9HXZ4dW.png)
![](http://i.imgur.com/Ds2By6j.png)
Putting empty lines around the blocks fixes this. I did a search through the other markdown files and made the change there as well.
This is not done yet but I'm posting it to get feedback.
The wiki has a ton of different tutorials/manuals/faq and so forth. Instead of migrating all of them right now, I just migrated the following:
* The general main wiki page
* Language FAQ
* Project FAQ
If this feels reasonable, please comment so that I can continue with confidence.