Commit Graph

47337 Commits

Author SHA1 Message Date
Steve Klabnik
a88586b10f Rollup merge of #28757 - steveklabnik:gh28384, r=alexcrichton
Fixes #28384
2015-09-30 14:51:54 -04:00
Steve Klabnik
37d291e6ff Rollup merge of #28755 - steveklabnik:gh28418, r=alexcrichton
The original blog post referred to examples by their file names, and now
that it's in guide form, there is no file name. So edit the text so that
it makes a bit more sense.

Fixes #28428
2015-09-30 14:51:54 -04:00
Steve Klabnik
27254bc4aa Rollup merge of #28754 - luser:fix-rustdoc-module-links, r=Manishearth
The links in the rustdoc for several places in fmt were trying to link to
the std::fmt module but actually linking to std, which was confusing.
While trying to figure out why I noticed that the documentation chapter of
the Rust book has examples that show this same bug (although it doesn't seem
widespread in practice).

r? @steveklabnik
2015-09-30 14:51:54 -04:00
Steve Klabnik
c03be232cc Rollup merge of #28749 - tshepang:patch-6, r=bluss 2015-09-30 14:51:53 -04:00
Steve Klabnik
7d433d6418 Rollup merge of #28745 - tshepang:typo, r=bluss 2015-09-30 14:51:53 -04:00
Steve Klabnik
45510041f7 Rollup merge of #28744 - dato:usize-typo, r=Aatch 2015-09-30 14:51:53 -04:00
Steve Klabnik
f3e3895d05 Rollup merge of #28743 - JanLikar:master, r=steveklabnik
- Expand the first paragraph

 - Improve readability by partitioning the chapter into the following
   sections: "Patterns", "Type annotations", "Mutability", and
   "Initializing bindings"

 - Add "Scope and shadowing" section (fix #28177)

r? @steveklabnik
2015-09-30 14:51:53 -04:00
Alex Crichton
8c963c07a8 rustc: Support output filenames for each emit type
Currently the compiler supports the ability to emit multiple output types as
part of one compilation (e.g. asm, LLVM IR, bytecode, link, dep-info, etc). It
does not, however, support the ability to customize the output filename for each
of these output types. The `-o` flag is ignored if multiple emit types are
specified (and the compiler emits a warning about this).

Normally this doesn't matter too much, but in the case of `dep-info` it can lead
to a number of problems (e.g. see #28716). By allowing customization of the
output filename for each emit type we're able to solve the problems in that
issue.

This commit adds support for the `--emit` option to the compiler to look like:

    rustc foo.rs --emit dep-info=.deps/foo.d,link

This indicates that the `dep-info` output type will be placed at `.deps/foo.d`
and the `link` output type will otherwise be determined via the `--out-dir` and
`-o` flags.

Closes #28716
2015-09-30 11:12:30 -07:00
Steve Klabnik
3ef9c1d5f9 Mention that you can only index with usize
Fixes #28693
2015-09-30 13:46:58 -04:00
Steve Klabnik
9812eb0ef4 Elaborate on the io prelude in the book
Fixes #27917
2015-09-30 13:39:59 -04:00
Steve Klabnik
367f46d793 Make note of performance implications of Read
Fixes #28073
2015-09-30 13:35:33 -04:00
Steve Klabnik
201384c107 Cross-reference doc chapter from testing chapter
We don't completely cover documentation tests in the testing chapter,
since we cover them in the documentation chapter. So make sure people
know that.

Fixes #28082
2015-09-30 13:31:17 -04:00
Ted Mielczarek
49fa11c5a5 Fix module links from core::fmt::* to go to std::fmt 2015-09-30 13:24:39 -04:00
Steve Klabnik
3e9b993925 Clarify logic instead of using 'vice versa'
Fixes #28166
2015-09-30 13:24:28 -04:00
Steve Klabnik
bc0440a631 Call out slicing syntax more explicitly
Fixes #28359
2015-09-30 13:21:04 -04:00
bors
dcb167e147 Auto merge of #28758 - Manishearth:rollup, r=Manishearth
- Successful merges: #28743, #28744, #28745, #28749
- Failed merges:
2015-09-30 17:12:08 +00:00
Manish Goregaokar
2c4b89ca99 Rollup merge of #28749 - tshepang:patch-6, r=bluss 2015-09-30 22:31:23 +05:30
Manish Goregaokar
283614fee5 Rollup merge of #28745 - tshepang:typo, r=bluss 2015-09-30 22:31:23 +05:30
Manish Goregaokar
66cf4616e1 Rollup merge of #28744 - dato:usize-typo, r=Aatch 2015-09-30 22:31:23 +05:30
Manish Goregaokar
c6db9721a8 Rollup merge of #28743 - JanLikar:master, r=steveklabnik
- Expand the first paragraph

 - Improve readability by partitioning the chapter into the following
   sections: "Patterns", "Type annotations", "Mutability", and
   "Initializing bindings"

 - Add "Scope and shadowing" section (fix #28177)

r? @steveklabnik
2015-09-30 22:31:22 +05:30
Steve Klabnik
d310ad9547 Format panic docs for split_at
Fixes #28384
2015-09-30 12:42:47 -04:00
Steve Klabnik
9c70d5160b Improve wording in error handling guide
The original blog post referred to examples by their file names, and now
that it's in guide form, there is no file name. So edit the text so that
it makes a bit more sense.

Fixes #28428
2015-09-30 12:39:37 -04:00
Ted Mielczarek
73bd0ba91e Fix module links in std::fmt and the Rust book's documentation chapter.
The links in the rustdoc for several places in fmt were trying to link to
the std::fmt module but actually linking to std, which was confusing.
While trying to figure out why I noticed that the documentation chapter of
the Rust book has examples that show this same bug (although it doesn't seem
widespread in practice).
2015-09-30 12:33:38 -04:00
Steve Klabnik
4632ad8896 Update no_std docs
This is part of #28572, but doesn't complete it. Amongst other things,
this patch:

* Increases consistency in the way feature flags are used with other
  docs.
* Removes the ignores, which is nice: we actually had some syntax errors
  in the examples 😭.
* Mentions #![no_core]

Realistically, this document used to be in the order of least to most:
nothing, then adding core. But with the changes in RFC 1184, this is
backwards: it now shows stuff that uses core from the beginning. In the
future, I'd like to revamp this to go from 'most to least', but I'd like
to see the discussion in https://github.com/rust-lang/rust/issues/27701
goes before I write more.
2015-09-30 11:46:33 -04:00
bors
437d70a54b Auto merge of #28738 - apasel422:peekable, r=alexcrichton 2015-09-30 15:22:17 +00:00
Simon Mazur
d2d08721be Implement size_hint for EscapeDefault 2015-09-30 18:05:09 +03:00
bors
3e6d7243ae Auto merge of #28731 - bluss:by-ref, r=alexcrichton
Remove redundant uses of Iterator::by_ref()
2015-09-30 11:03:13 +00:00
Tshepang Lekhonkhobe
ffab1b405c path: remove a line of code that is not useful 2015-09-30 12:00:02 +02:00
bors
13dc6aac60 Auto merge of #28730 - apasel422:issue-21922, r=alexcrichton
Closes #21922.
2015-09-30 07:12:36 +00:00
Aidan Hobson Sayers
b24552e0a5 libcxxabi is no longer necessary for libunwind 2015-09-30 07:42:34 +01:00
Tshepang Lekhonkhobe
c6b8deef7d doc: fix typo 2015-09-30 08:39:02 +02:00
bors
c459e897bd Auto merge of #28729 - retep998:canonical-dir, r=alexcrichton
cc https://github.com/rust-lang/rust/issues/27706
2015-09-30 05:19:17 +00:00
Dato Simó
7914d1b8b7 Fix typo in docs: usize is unsigned, not signed. 2015-09-30 01:18:23 -03:00
bors
44d404804c Auto merge of #28724 - tsion:remove-double-semicolons, r=alexcrichton
Really minor code cleanup, because why not?
2015-09-30 03:24:00 +00:00
bors
15db6ec571 Auto merge of #28500 - alexcrichton:docker-travis, r=brson
Travis CI has new infrastructure using the Google Compute Engine which has both
faster CPUs and more memory, and we've been encouraged to switch as it should
help our build times! The only downside currently, however, is that IPv6 is
disabled, causing a number of standard library tests to fail.

Consequently this commit tweaks our travis config in a few ways:

* ccache is disabled as it's not working on GCE just yet
* Docker is used to run tests inside which reportedly will get IPv6 working
* A system LLVM installation is used instead of building LLVM itself. This is
  primarily done to reduce build times, but we want automation for this sort of
  behavior anyway and we can extend this in the future with building from source
  as well if needed.
* gcc-specific logic is removed as the docker image for Ubuntu gives us a
  recent-enough gcc by default.
2015-09-30 01:21:55 +00:00
Jan Likar
ff2bc7785d Improve "Variable bindings" chapter
- Expand the first paragraph

 - Improve readability by partitioning the chapter into the following
   sections: "Patterns", "Type annotations", "Mutability", and
   "Initializing bindings"

 - Add "Scope and shadowing" section (fix #28177)
2015-09-30 02:42:52 +02:00
Alex Crichton
27dd6dd3db Tweak Travis to use GCE
Travis CI has new infrastructure using the Google Compute Engine which has both
faster CPUs and more memory, and we've been encouraged to switch as it should
help our build times! The only downside currently, however, is that IPv6 is
disabled, causing a number of standard library tests to fail.

Consequently this commit tweaks our travis config in a few ways:

* ccache is disabled as it's not working on GCE just yet
* Docker is used to run tests inside which reportedly will get IPv6 working
* A system LLVM installation is used instead of building LLVM itself. This is
  primarily done to reduce build times, but we want automation for this sort of
  behavior anyway and we can extend this in the future with building from source
  as well if needed.
* gcc-specific logic is removed as the docker image for Ubuntu gives us a
  recent-enough gcc by default.
2015-09-29 16:56:35 -07:00
bors
65d5c08337 Auto merge of #28702 - arielb1:metadata-versioning, r=nrc
This prevents ICEs when old crates are used with a new version of
rustc. Currently, the linking of crates compiled with different
versions of rustc is completely unsupported.

Fixes #28700

r? @nrc
2015-09-29 23:26:34 +00:00
Andrew Paseltiner
532ee3c6d6 Derive Clone for Peekable 2015-09-29 18:35:33 -04:00
Ariel Ben-Yehuda
f2d5ebeae9 sacrifice a few bytes for the euv demon 2015-09-30 00:51:12 +03:00
bors
59eb444076 Auto merge of #28715 - petrochenkov:visit, r=nrc
Some minor parts of AST and HIR were not visited by the `visit::walk_xxx` methods - some identifiers, lifetimes, loop labels, attributes of exported macros - but nothing as serious as in, for example, https://github.com/rust-lang/rust/pull/28364.
\+ Added a convenience macro for visiting lists (including Options)
\+ Removed some pre-Deref-coersions `&**` noise from visitors

r? @nrc
2015-09-29 21:32:39 +00:00
bors
19fe7b6d64 Auto merge of #28623 - llogiq:faster-fasta, r=brson
I just removed the num_cpus dependency (because we don't want that in there), using 4 threads instead.

I should add that Veedrac asked me to submit this here in his name.
2015-09-29 19:28:27 +00:00
Ariel Ben-Yehuda
9699adc508 store the rustc version in metadata and check it
This prevents ICEs when old crates are used with a new version of
rustc. Currently, the linking of crates compiled with different
versions of rustc is completely unsupported.

Fixes #28700
2015-09-29 21:27:08 +03:00
Peter Atashian
6b9b2ee878 Make fs::canonicalize work on directories on Windows
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-09-29 14:21:39 -04:00
Ulrik Sverdrup
e2aa82c413 Remove redundant uses of Iterator::by_ref() 2015-09-29 19:20:18 +02:00
Simonas Kazlauskas
cefadf05f9 Enable and make stage0 landing pads optional 2015-09-29 20:18:03 +03:00
Lee Jeffery
e4d9951984 Add unused_attributes to unused lint group. 2015-09-29 16:44:26 +01:00
bors
5f06607e23 Auto merge of #27273 - tshepang:claim-not-accurate, r=steveklabnik 2015-09-29 15:04:47 +00:00
Andrew Paseltiner
61cb4d4fc8 Add test for #21922
Closes #21922.
2015-09-29 10:19:24 -04:00
Simon Mazur
025ca11ab9 Add fmt::Debug string escape tests 2015-09-29 15:53:58 +03:00