]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #28732 - Eljay:fix-unused-attr, r=alexcrichton
bors [Thu, 1 Oct 2015 00:47:06 +0000 (00:47 +0000)]
Auto merge of #28732 - Eljay:fix-unused-attr, r=alexcrichton

Closes #28709.

8 years agoAuto merge of #28782 - steveklabnik:rollup, r=steveklabnik
bors [Wed, 30 Sep 2015 22:27:53 +0000 (22:27 +0000)]
Auto merge of #28782 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #28753, #28760, #28764, #28770, #28771, #28772
- Failed merges:

8 years agoRollup merge of #28772 - tshepang:improve-paragraph, r=steveklabnik
Steve Klabnik [Wed, 30 Sep 2015 22:20:04 +0000 (18:20 -0400)]
Rollup merge of #28772 - tshepang:improve-paragraph, r=steveklabnik

8 years agoRollup merge of #28771 - tshepang:upper-case, r=steveklabnik
Steve Klabnik [Wed, 30 Sep 2015 22:20:04 +0000 (18:20 -0400)]
Rollup merge of #28771 - tshepang:upper-case, r=steveklabnik

8 years agoRollup merge of #28770 - tshepang:awkward, r=steveklabnik
Steve Klabnik [Wed, 30 Sep 2015 22:20:03 +0000 (18:20 -0400)]
Rollup merge of #28770 - tshepang:awkward, r=steveklabnik

8 years agoRollup merge of #28764 - steveklabnik:gh28706, r=alexcrichton
Steve Klabnik [Wed, 30 Sep 2015 22:20:03 +0000 (18:20 -0400)]
Rollup merge of #28764 - steveklabnik:gh28706, r=alexcrichton

Fixes #28706

I am pretty sure that this is accurate, bout would love a double check.

8 years agoRollup merge of #28760 - steveklabnik:gh28166, r=alexcrichton
Steve Klabnik [Wed, 30 Sep 2015 22:20:03 +0000 (18:20 -0400)]
Rollup merge of #28760 - steveklabnik:gh28166, r=alexcrichton

Fixes #28166

8 years agoRollup merge of #28753 - steveklabnik:gh28572, r=alexcrichton
Steve Klabnik [Wed, 30 Sep 2015 22:20:03 +0000 (18:20 -0400)]
Rollup merge of #28753 - steveklabnik:gh28572, r=alexcrichton

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 :sob:.
* 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.

8 years agoAuto merge of #28769 - steveklabnik:rollup, r=steveklabnik
bors [Wed, 30 Sep 2015 19:04:02 +0000 (19:04 +0000)]
Auto merge of #28769 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #28743, #28744, #28745, #28749, #28754, #28755, #28757, #28759, #28761, #28762, #28763, #28765
- Failed merges:

8 years agoImprove identifier defintion in the reference
Steve Klabnik [Wed, 30 Sep 2015 17:42:57 +0000 (13:42 -0400)]
Improve identifier defintion in the reference

Fixes #28706

8 years agoRollup merge of #28765 - steveklabnik:gh28693, r=nikomatsakis
Steve Klabnik [Wed, 30 Sep 2015 18:51:55 +0000 (14:51 -0400)]
Rollup merge of #28765 - steveklabnik:gh28693, r=nikomatsakis

Fixes #28693

8 years agoRollup merge of #28763 - steveklabnik:gh27917, r=alexcrichton
Steve Klabnik [Wed, 30 Sep 2015 18:51:55 +0000 (14:51 -0400)]
Rollup merge of #28763 - steveklabnik:gh27917, r=alexcrichton

Fixes #27917

8 years agoRollup merge of #28762 - steveklabnik:gh28073, r=nikomatsakis
Steve Klabnik [Wed, 30 Sep 2015 18:51:55 +0000 (14:51 -0400)]
Rollup merge of #28762 - steveklabnik:gh28073, r=nikomatsakis

Fixes #28073

8 years agoRollup merge of #28761 - steveklabnik:gh28082, r=brson
Steve Klabnik [Wed, 30 Sep 2015 18:51:55 +0000 (14:51 -0400)]
Rollup merge of #28761 - steveklabnik:gh28082, r=brson

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

8 years agoRollup merge of #28759 - steveklabnik:gh28359, r=nikomatsakis
Steve Klabnik [Wed, 30 Sep 2015 18:51:54 +0000 (14:51 -0400)]
Rollup merge of #28759 - steveklabnik:gh28359, r=nikomatsakis

Fixes #28359

I'm not doing more here because it's unclear that `as_slice()` is even going to stick around, see https://github.com/rust-lang/rust/issues/27729

8 years agoRollup merge of #28757 - steveklabnik:gh28384, r=alexcrichton
Steve Klabnik [Wed, 30 Sep 2015 18:51:54 +0000 (14:51 -0400)]
Rollup merge of #28757 - steveklabnik:gh28384, r=alexcrichton

Fixes #28384

8 years agoRollup merge of #28755 - steveklabnik:gh28418, r=alexcrichton
Steve Klabnik [Wed, 30 Sep 2015 18:51:54 +0000 (14:51 -0400)]
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

8 years agoRollup merge of #28754 - luser:fix-rustdoc-module-links, r=Manishearth
Steve Klabnik [Wed, 30 Sep 2015 18:51:54 +0000 (14:51 -0400)]
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

8 years agoRollup merge of #28749 - tshepang:patch-6, r=bluss
Steve Klabnik [Wed, 30 Sep 2015 18:51:53 +0000 (14:51 -0400)]
Rollup merge of #28749 - tshepang:patch-6, r=bluss

8 years agoRollup merge of #28745 - tshepang:typo, r=bluss
Steve Klabnik [Wed, 30 Sep 2015 18:51:53 +0000 (14:51 -0400)]
Rollup merge of #28745 - tshepang:typo, r=bluss

8 years agoRollup merge of #28744 - dato:usize-typo, r=Aatch
Steve Klabnik [Wed, 30 Sep 2015 18:51:53 +0000 (14:51 -0400)]
Rollup merge of #28744 - dato:usize-typo, r=Aatch

8 years agoRollup merge of #28743 - JanLikar:master, r=steveklabnik
Steve Klabnik [Wed, 30 Sep 2015 18:51:53 +0000 (14:51 -0400)]
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

8 years agoMention that you can only index with usize
Steve Klabnik [Wed, 30 Sep 2015 17:46:58 +0000 (13:46 -0400)]
Mention that you can only index with usize

Fixes #28693

8 years agoElaborate on the io prelude in the book
Steve Klabnik [Wed, 30 Sep 2015 17:39:59 +0000 (13:39 -0400)]
Elaborate on the io prelude in the book

Fixes #27917

8 years agoMake note of performance implications of Read
Steve Klabnik [Wed, 30 Sep 2015 17:35:33 +0000 (13:35 -0400)]
Make note of performance implications of Read

Fixes #28073

8 years agoCross-reference doc chapter from testing chapter
Steve Klabnik [Wed, 30 Sep 2015 17:30:43 +0000 (13:30 -0400)]
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

8 years agoFix module links from core::fmt::* to go to std::fmt
Ted Mielczarek [Wed, 30 Sep 2015 17:24:39 +0000 (13:24 -0400)]
Fix module links from core::fmt::* to go to std::fmt

8 years agoClarify logic instead of using 'vice versa'
Steve Klabnik [Wed, 30 Sep 2015 17:24:28 +0000 (13:24 -0400)]
Clarify logic instead of using 'vice versa'

Fixes #28166

8 years agoCall out slicing syntax more explicitly
Steve Klabnik [Wed, 30 Sep 2015 17:21:02 +0000 (13:21 -0400)]
Call out slicing syntax more explicitly

Fixes #28359

8 years agoAuto merge of #28758 - Manishearth:rollup, r=Manishearth
bors [Wed, 30 Sep 2015 17:12:08 +0000 (17:12 +0000)]
Auto merge of #28758 - Manishearth:rollup, r=Manishearth

- Successful merges: #28743, #28744, #28745, #28749
- Failed merges:

8 years agoRollup merge of #28749 - tshepang:patch-6, r=bluss
Manish Goregaokar [Wed, 30 Sep 2015 17:01:23 +0000 (22:31 +0530)]
Rollup merge of #28749 - tshepang:patch-6, r=bluss

8 years agoRollup merge of #28745 - tshepang:typo, r=bluss
Manish Goregaokar [Wed, 30 Sep 2015 17:01:23 +0000 (22:31 +0530)]
Rollup merge of #28745 - tshepang:typo, r=bluss

8 years agoRollup merge of #28744 - dato:usize-typo, r=Aatch
Manish Goregaokar [Wed, 30 Sep 2015 17:01:23 +0000 (22:31 +0530)]
Rollup merge of #28744 - dato:usize-typo, r=Aatch

8 years agoRollup merge of #28743 - JanLikar:master, r=steveklabnik
Manish Goregaokar [Wed, 30 Sep 2015 17:01:22 +0000 (22:31 +0530)]
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

8 years agoFormat panic docs for split_at
Steve Klabnik [Wed, 30 Sep 2015 16:42:47 +0000 (12:42 -0400)]
Format panic docs for split_at

Fixes #28384

8 years agoImprove wording in error handling guide
Steve Klabnik [Wed, 30 Sep 2015 16:39:37 +0000 (12:39 -0400)]
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

8 years agoFix module links in std::fmt and the Rust book's documentation chapter.
Ted Mielczarek [Wed, 30 Sep 2015 16:33:38 +0000 (12:33 -0400)]
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).

8 years agoUpdate no_std docs
Steve Klabnik [Wed, 30 Sep 2015 15:46:33 +0000 (11:46 -0400)]
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 :sob:.
* 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.

8 years agoAuto merge of #28738 - apasel422:peekable, r=alexcrichton
bors [Wed, 30 Sep 2015 15:22:17 +0000 (15:22 +0000)]
Auto merge of #28738 - apasel422:peekable, r=alexcrichton

8 years agoAuto merge of #28731 - bluss:by-ref, r=alexcrichton
bors [Wed, 30 Sep 2015 11:03:13 +0000 (11:03 +0000)]
Auto merge of #28731 - bluss:by-ref, r=alexcrichton

Remove redundant uses of Iterator::by_ref()

8 years agopath: remove a line of code that is not useful
Tshepang Lekhonkhobe [Wed, 30 Sep 2015 10:00:02 +0000 (12:00 +0200)]
path: remove a line of code that is not useful

8 years agoAuto merge of #28730 - apasel422:issue-21922, r=alexcrichton
bors [Wed, 30 Sep 2015 07:12:36 +0000 (07:12 +0000)]
Auto merge of #28730 - apasel422:issue-21922, r=alexcrichton

Closes #21922.

8 years agodoc: fix typo
Tshepang Lekhonkhobe [Wed, 30 Sep 2015 06:39:02 +0000 (08:39 +0200)]
doc: fix typo

8 years agoAuto merge of #28729 - retep998:canonical-dir, r=alexcrichton
bors [Wed, 30 Sep 2015 05:19:17 +0000 (05:19 +0000)]
Auto merge of #28729 - retep998:canonical-dir, r=alexcrichton

cc https://github.com/rust-lang/rust/issues/27706

8 years agoFix typo in docs: usize is unsigned, not signed.
Dato Simó [Wed, 30 Sep 2015 04:18:23 +0000 (01:18 -0300)]
Fix typo in docs: usize is unsigned, not signed.

8 years agoAuto merge of #28724 - tsion:remove-double-semicolons, r=alexcrichton
bors [Wed, 30 Sep 2015 03:24:00 +0000 (03:24 +0000)]
Auto merge of #28724 - tsion:remove-double-semicolons, r=alexcrichton

Really minor code cleanup, because why not?

8 years agoAuto merge of #28500 - alexcrichton:docker-travis, r=brson
bors [Wed, 30 Sep 2015 01:21:55 +0000 (01:21 +0000)]
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.

8 years agoImprove "Variable bindings" chapter
Jan Likar [Wed, 30 Sep 2015 00:42:52 +0000 (02:42 +0200)]
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)

8 years agoTweak Travis to use GCE
Alex Crichton [Fri, 18 Sep 2015 17:19:23 +0000 (10:19 -0700)]
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.

8 years agoAuto merge of #28702 - arielb1:metadata-versioning, r=nrc
bors [Tue, 29 Sep 2015 23:26:34 +0000 (23:26 +0000)]
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

8 years agoDerive `Clone` for `Peekable`
Andrew Paseltiner [Tue, 29 Sep 2015 22:35:33 +0000 (18:35 -0400)]
Derive `Clone` for `Peekable`

8 years agosacrifice a few bytes for the euv demon
Ariel Ben-Yehuda [Tue, 29 Sep 2015 21:51:12 +0000 (00:51 +0300)]
sacrifice a few bytes for the euv demon

8 years agoAuto merge of #28715 - petrochenkov:visit, r=nrc
bors [Tue, 29 Sep 2015 21:32:39 +0000 (21:32 +0000)]
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

8 years agoAuto merge of #28623 - llogiq:faster-fasta, r=brson
bors [Tue, 29 Sep 2015 19:28:27 +0000 (19:28 +0000)]
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.

8 years agostore the rustc version in metadata and check it
Ariel Ben-Yehuda [Mon, 28 Sep 2015 04:31:45 +0000 (07:31 +0300)]
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

8 years agoMake fs::canonicalize work on directories on Windows
Peter Atashian [Tue, 29 Sep 2015 18:21:39 +0000 (14:21 -0400)]
Make fs::canonicalize work on directories on Windows

Signed-off-by: Peter Atashian <retep998@gmail.com>
8 years agoRemove redundant uses of Iterator::by_ref()
Ulrik Sverdrup [Tue, 29 Sep 2015 15:12:42 +0000 (17:12 +0200)]
Remove redundant uses of Iterator::by_ref()

8 years agoAdd unused_attributes to unused lint group.
Lee Jeffery [Tue, 29 Sep 2015 15:44:26 +0000 (16:44 +0100)]
Add unused_attributes to unused lint group.

8 years agoAuto merge of #27273 - tshepang:claim-not-accurate, r=steveklabnik
bors [Tue, 29 Sep 2015 15:04:47 +0000 (15:04 +0000)]
Auto merge of #27273 - tshepang:claim-not-accurate, r=steveklabnik

8 years agoAdd test for #21922
Andrew Paseltiner [Tue, 29 Sep 2015 14:19:24 +0000 (10:19 -0400)]
Add test for #21922

Closes #21922.

8 years agoRestore `if let`s replaced with `for`s
Vadim Petrochenkov [Tue, 29 Sep 2015 08:33:25 +0000 (11:33 +0300)]
Restore `if let`s replaced with `for`s

8 years agoAuto merge of #28723 - carols10cents:0-or-O-or-o, r=steveklabnik
bors [Tue, 29 Sep 2015 03:38:52 +0000 (03:38 +0000)]
Auto merge of #28723 - carols10cents:0-or-O-or-o, r=steveklabnik

Especially when documenting the use of `0`, since zero looks very
similar to `O` in fonts not meant for displaying code.

Other literal characters, traits, etc should also use code formatting.
This change makes this documentation more internally consistent.

Before this change, circled is the character I was using this documentation to find out about and that confused me when it wasn't immediately clear what character it was:

<img width="1013" alt="screen shot 2015-09-28 at 10 13 31 pm" src="https://cloud.githubusercontent.com/assets/193874/10154708/c70815fe-6638-11e5-9acc-57c73a524203.png">

After this change:

<img width="981" alt="screen shot 2015-09-28 at 11 26 35 pm" src="https://cloud.githubusercontent.com/assets/193874/10154710/ce73eeb2-6638-11e5-98f7-902f58679316.png">

I ran `make check-docs` and didn't break anything :star:

8 years agoUse code formatting for code-relevant values in std::fmt docs
Carol (Nichols || Goulding) [Tue, 29 Sep 2015 02:23:16 +0000 (22:23 -0400)]
Use code formatting for code-relevant values in std::fmt docs

Especially when documenting the use of `0`, since zero looks very
similar to `O` in fonts not meant for displaying code.

Other literal characters, traits, etc should also use code formatting.
This change makes this documentation more internally consistent.

8 years agoAuto merge of #28707 - apasel422:issue-24389, r=alexcrichton
bors [Tue, 29 Sep 2015 01:45:33 +0000 (01:45 +0000)]
Auto merge of #28707 - apasel422:issue-24389, r=alexcrichton

Closes #24389.

8 years agoMinor code cleanup.
Scott Olson [Mon, 28 Sep 2015 02:26:12 +0000 (20:26 -0600)]
Minor code cleanup.

8 years agoAuto merge of #28705 - marti1125:master, r=steveklabnik
bors [Mon, 28 Sep 2015 23:56:41 +0000 (23:56 +0000)]
Auto merge of #28705 - marti1125:master, r=steveklabnik

#28701

8 years agoFill in some missing parts in the default HIR visitor
Vadim Petrochenkov [Mon, 28 Sep 2015 21:23:54 +0000 (00:23 +0300)]
Fill in some missing parts in the default HIR visitor

8 years agoAuto merge of #28703 - gavinb:master, r=alexcrichton
bors [Mon, 28 Sep 2015 21:08:40 +0000 (21:08 +0000)]
Auto merge of #28703 - gavinb:master, r=alexcrichton

Tests invoking a static method using a type alias.

Closes #11047

8 years agoFill in some missing parts in the default AST visitor
Vadim Petrochenkov [Mon, 28 Sep 2015 11:26:26 +0000 (14:26 +0300)]
Fill in some missing parts in the default AST visitor
+ Add helper macro for walking lists (including Options)

8 years agoAuto merge of #28691 - utkarshkukreti:add-path_max-to-liblibc, r=alexcrichton
bors [Mon, 28 Sep 2015 18:40:35 +0000 (18:40 +0000)]
Auto merge of #28691 - utkarshkukreti:add-path_max-to-liblibc, r=alexcrichton

PATH_MAX is defined for OSX and various BSDs but not Linux right now.

[Source for the value.](https://github.com/torvalds/linux/blob/9ffecb10283508260936b96022d4ee43a7798b4c/include/uapi/linux/limits.h#L12)

8 years agoAdd test for #24389
Andrew Paseltiner [Mon, 28 Sep 2015 17:39:29 +0000 (13:39 -0400)]
Add test for #24389

Closes #24389.

8 years agofixes #17017 (update padding:11px line 142 of rustbook.css)
Willy Aguirre [Mon, 28 Sep 2015 17:11:18 +0000 (12:11 -0500)]
fixes #17017 (update padding:11px line 142 of rustbook.css)

8 years agoAuto merge of #28668 - alexcrichton:crossing-with-jemalloc, r=nrc
bors [Mon, 28 Sep 2015 15:58:44 +0000 (15:58 +0000)]
Auto merge of #28668 - alexcrichton:crossing-with-jemalloc, r=nrc

This commit updates the compiler to not attempt to use jemalloc for platforms
where jemalloc is never enabled. Currently the compiler attempts to link in
jemalloc based on whether `--disable-jemalloc` was specified at build time for
the compiler itself, but this is only the right decision for the host target,
not for other targets.

This still leaves a hole open where a set of target libraries are downloaded
which were built with `--disable-jemalloc` and the compiler is unaware of that,
but this is a pretty rare case so it can always be fixed later.

8 years agoremove a sentence #28701
Willy Aguirre [Mon, 28 Sep 2015 15:46:50 +0000 (10:46 -0500)]
remove a sentence #28701

8 years agoTest case for Issue 11047
Gavin Baker [Mon, 28 Sep 2015 12:33:29 +0000 (22:33 +1000)]
Test case for Issue 11047

Tests invoking a static method using a type alias

8 years agoAdd PATH_MAX to liblibc's Linux bindings.
Utkarsh Kukreti [Sun, 27 Sep 2015 15:36:54 +0000 (21:06 +0530)]
Add PATH_MAX to liblibc's Linux bindings.

8 years agoAuto merge of #28689 - Manishearth:rollup, r=Manishearth
bors [Sun, 27 Sep 2015 11:01:11 +0000 (11:01 +0000)]
Auto merge of #28689 - Manishearth:rollup, r=Manishearth

- Successful merges: #28664, #28673, #28681, #28682, #28688
- Failed merges:

8 years agoRollup merge of #28688 - Manishearth:fix-primitives-search, r=eddyb
Manish Goregaokar [Sun, 27 Sep 2015 09:35:18 +0000 (15:05 +0530)]
Rollup merge of #28688 - Manishearth:fix-primitives-search, r=eddyb

None

8 years agoRollup merge of #28682 - apasel422:features, r=steveklabnik
Manish Goregaokar [Sun, 27 Sep 2015 09:35:18 +0000 (15:05 +0530)]
Rollup merge of #28682 - apasel422:features, r=steveklabnik

8 years agoRollup merge of #28681 - arielb1:destructor-fixes, r=eddyb
Manish Goregaokar [Sun, 27 Sep 2015 09:35:17 +0000 (15:05 +0530)]
Rollup merge of #28681 - arielb1:destructor-fixes, r=eddyb

Fixes #28568

r? @eddyb

8 years agoRollup merge of #28673 - wthrowe:bad-archive, r=alexcrichton
Manish Goregaokar [Sun, 27 Sep 2015 09:35:17 +0000 (15:05 +0530)]
Rollup merge of #28673 - wthrowe:bad-archive, r=alexcrichton

8 years agoRollup merge of #28664 - apasel422:collections-debug, r=alexcrichton
Manish Goregaokar [Sun, 27 Sep 2015 09:35:17 +0000 (15:05 +0530)]
Rollup merge of #28664 - apasel422:collections-debug, r=alexcrichton

8 years agorustdoc: Remove crate name from primitives, make them turn up first in search
Manish Goregaokar [Sun, 27 Sep 2015 09:18:36 +0000 (14:48 +0530)]
rustdoc: Remove crate name from primitives, make them turn up first in search

8 years agoAuto merge of #28663 - bluss:vec-as-mut, r=alexcrichton
bors [Sun, 27 Sep 2015 08:26:49 +0000 (08:26 +0000)]
Auto merge of #28663 - bluss:vec-as-mut, r=alexcrichton

Implement AsMut for Vec

Fixes #28549

8 years agoAuto merge of #28651 - dotdash:exhaustive_match, r=eddyb
bors [Sun, 27 Sep 2015 05:29:39 +0000 (05:29 +0000)]
Auto merge of #28651 - dotdash:exhaustive_match, r=eddyb

By putting an "unreachable" instruction into the default arm of a switch
instruction we can let LLVM know that the match is exhaustive, allowing
for better optimizations.

For example, this match:
```rust
pub enum Enum {
    One,
    Two,
    Three,
}

impl Enum {
    pub fn get_disc(self) -> u8 {
        match self {
            Enum::One => 0,
            Enum::Two => 1,
            Enum::Three => 2,
        }
    }
}
```

Currently compiles to this on x86_64:
```asm
  .cfi_startproc
  movzbl  %dil, %ecx
  cmpl  $1, %ecx
  setne %al
  testb %cl, %cl
  je  .LBB0_2
  incb  %al
  movb  %al, %dil
.LBB0_2:
  movb  %dil, %al
  retq
.Lfunc_end0:
```

But with this change we get:
```asm
  .cfi_startproc
  movb  %dil, %al
  retq
.Lfunc_end0:
```

8 years agoAuto merge of #28685 - steveklabnik:rollup, r=steveklabnik
bors [Sun, 27 Sep 2015 01:25:00 +0000 (01:25 +0000)]
Auto merge of #28685 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #28666, #28674, #28677, #28678, #28679, #28680
- Failed merges: #28621

8 years agoRollup merge of #28680 - xaviershay:doc-readme, r=steveklabnik
Steve Klabnik [Sun, 27 Sep 2015 00:00:39 +0000 (18:00 -0600)]
Rollup merge of #28680 - xaviershay:doc-readme, r=steveklabnik

This wasn't complete (you need a `./configure`), and it is already
documented well in the main README.

r? @steveklabnik

8 years agoRollup merge of #28679 - xaviershay:book-unit-example, r=steveklabnik
Steve Klabnik [Sun, 27 Sep 2015 00:00:39 +0000 (18:00 -0600)]
Rollup merge of #28679 - xaviershay:book-unit-example, r=steveklabnik

This was non-obvious to me: with no example, I assumed `Electron {}` and
didn't know what else to try when it didn't work.  The correct form is
weird because it looks like you're assigning the struct name rather than
an instance of the struct.

r? @steveklabnik

8 years agoRollup merge of #28678 - fhartwig:deref-elide, r=steveklabnik
Steve Klabnik [Sun, 27 Sep 2015 00:00:38 +0000 (18:00 -0600)]
Rollup merge of #28678 - fhartwig:deref-elide, r=steveklabnik

The lifetime can be elided here, and I think eliding it makes the example slightly simpler.

8 years agoRollup merge of #28677 - taboularasa:master, r=alexcrichton
Steve Klabnik [Sun, 27 Sep 2015 00:00:38 +0000 (18:00 -0600)]
Rollup merge of #28677 - taboularasa:master, r=alexcrichton

the example for `find` was misleading in that it fails to mention the result is either `None` or `Some` containing only the first match. Further confusing the issue is the `println!` statement, "We got some numbers!"

8 years agoRollup merge of #28674 - DenisKolodin:patch-2, r=sanxiyn
Steve Klabnik [Sun, 27 Sep 2015 00:00:38 +0000 (18:00 -0600)]
Rollup merge of #28674 - DenisKolodin:patch-2, r=sanxiyn

8 years agoRollup merge of #28666 - GuillaumeGomez:warning, r=arielb1
Steve Klabnik [Sun, 27 Sep 2015 00:00:38 +0000 (18:00 -0600)]
Rollup merge of #28666 - GuillaumeGomez:warning, r=arielb1

r? @Manishearth

8 years agoAuto merge of #28646 - vadimcn:imps, r=alexcrichton
bors [Sat, 26 Sep 2015 23:38:54 +0000 (23:38 +0000)]
Auto merge of #28646 - vadimcn:imps, r=alexcrichton

As discussed in the referenced issues, this PR makes rustc emit `__imp_<symbol>` stubs for all public static data to ensure smooth linking in on `-windows-msvc` targets.
Resolves #26591, cc #27438

8 years agoAuto merge of #28635 - alexcrichton:str-parse-error-void, r=aturon
bors [Sat, 26 Sep 2015 21:52:37 +0000 (21:52 +0000)]
Auto merge of #28635 - alexcrichton:str-parse-error-void, r=aturon

It can never be instantiated, so signify this by having it actually be an empty
`enum`.

cc #27734

8 years agodon't crash when there are multiple conflicting implementations of Drop
Ariel Ben-Yehuda [Sat, 26 Sep 2015 20:12:11 +0000 (23:12 +0300)]
don't crash when there are multiple conflicting implementations of Drop

Fixes #28568

8 years agoremove the destructors table
Ariel Ben-Yehuda [Sat, 26 Sep 2015 19:25:49 +0000 (22:25 +0300)]
remove the destructors table

8 years agoAuto merge of #28632 - alexcrichton:update-match-indices, r=Kimundi
bors [Sat, 26 Sep 2015 20:06:51 +0000 (20:06 +0000)]
Auto merge of #28632 - alexcrichton:update-match-indices, r=Kimundi

This commit updates the `MatchIndices` and `RMatchIndices` iterators to follow
the same pattern as the `chars` and `char_indices` iterators. The `matches`
iterator currently yield `&str` elements, so the `MatchIndices` iterator now
yields the index of the match as well as the `&str` that matched (instead of
start/end indexes).

cc #27743

8 years agoRemove unnecessary `#![feature]` attributes
Andrew Paseltiner [Sat, 26 Sep 2015 18:40:22 +0000 (14:40 -0400)]
Remove unnecessary `#![feature]` attributes

8 years agoFix meta-documentation for generating all docs.
Xavier Shay [Sat, 26 Sep 2015 19:03:42 +0000 (12:03 -0700)]
Fix meta-documentation for generating all docs.

This wasn't complete (you need a `./configure`), and it is already
documented well in the main README.

Also adds a reference to the books that this also generates.

8 years agoAdd an example of constructing a unit-like struct.
Xavier Shay [Sat, 26 Sep 2015 18:59:00 +0000 (11:59 -0700)]
Add an example of constructing a unit-like struct.

This was non-obvious to me: with no example, I assumed `Electron {}` and
didn't know what else to try when it didn't work.  The correct form is
weird because it looks like you're assigning the struct name rather than
an instance of the struct.