]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoMake quote plugin use parsing functions which explicitly panic.
Eli Friedman [Wed, 28 Oct 2015 05:20:01 +0000 (22:20 -0700)]
Make quote plugin use parsing functions which explicitly panic.

Rename parse_* to parse_*_panic, and add parse_attribute_panic.

8 years agoUpdate AUTHORS.txt for 1.5
Brian Anderson [Wed, 28 Oct 2015 20:42:20 +0000 (13:42 -0700)]
Update AUTHORS.txt for 1.5

8 years agoUpdate mailmap
Brian Anderson [Wed, 28 Oct 2015 20:33:55 +0000 (13:33 -0700)]
Update mailmap

8 years agoUpdate AUTHORS.txt for 1.4
Brian Anderson [Wed, 28 Oct 2015 20:28:57 +0000 (13:28 -0700)]
Update AUTHORS.txt for 1.4

8 years agoUpdate mailmap
Brian Anderson [Wed, 28 Oct 2015 20:23:08 +0000 (13:23 -0700)]
Update mailmap

8 years agoTweak the add-authors.sh script
Brian Anderson [Wed, 28 Oct 2015 20:13:55 +0000 (13:13 -0700)]
Tweak the add-authors.sh script

8 years agoAdd diverging functions `-> !` to syntax index
Daniel Rollins [Wed, 28 Oct 2015 19:56:57 +0000 (19:56 +0000)]
Add diverging functions `-> !` to syntax index

Resolves #29431

8 years agoThe `source_did` may not be local, so don't unwrap the
Niko Matsakis [Tue, 27 Oct 2015 22:29:42 +0000 (18:29 -0400)]
The `source_did` may not be local, so don't unwrap the
`as_local_node_id`, instead just compare against `Some(id)`.
Fixes #29161.

8 years agoAuto merge of #29403 - alexcrichton:fix-windows-again-zomg, r=brson
bors [Wed, 28 Oct 2015 19:34:21 +0000 (19:34 +0000)]
Auto merge of #29403 - alexcrichton:fix-windows-again-zomg, r=brson

Although the compiler itself does not depend on this DLL the `libstdc++-6.dll`
that we're shipping does, so we still need to include it.

8 years agoLog the error we get when we fail to load metadata from a library.
JP Sugarbroad [Wed, 28 Oct 2015 18:08:20 +0000 (11:08 -0700)]
Log the error we get when we fail to load metadata from a library.

8 years agoAuto merge of #29233 - angelsl:msvc1, r=alexcrichton
bors [Wed, 28 Oct 2015 17:38:10 +0000 (17:38 +0000)]
Auto merge of #29233 - angelsl:msvc1, r=alexcrichton

Build compiler-rt/builtins with MSVC.

r? @alexcrichton

8 years agoAuto merge of #29419 - brson:bump, r=alexcrichton
bors [Wed, 28 Oct 2015 15:50:52 +0000 (15:50 +0000)]
Auto merge of #29419 - brson:bump, r=alexcrichton

8 years agoAuto merge of #29409 - arielb1:recursive-arrays, r=eddyb
bors [Wed, 28 Oct 2015 13:16:14 +0000 (13:16 +0000)]
Auto merge of #29409 - arielb1:recursive-arrays, r=eddyb

when evaluating a recursive type, the `type_of` of the interior could be
still in progress, so trying to get its size would cause an ICE.

Fixes #19001

r? @eddyb

8 years agoAdd test for #29030
Andrew Paseltiner [Wed, 28 Oct 2015 12:52:32 +0000 (08:52 -0400)]
Add test for #29030

Closes #29030.

8 years agoAuto merge of #29404 - jonas-schievink:external-overlap-print, r=Aatch
bors [Wed, 28 Oct 2015 11:26:48 +0000 (11:26 +0000)]
Auto merge of #29404 - jonas-schievink:external-overlap-print, r=Aatch

This makes the error message in #28981 a bit shorter (152 to 115 lines).

Previous output (the local impl was always printed twice when it conflicted with an external impl):
```
test.rs:3:1: 3:23 error: conflicting implementations for trait `core::ops::Deref` [E0119]
test.rs:3 impl<T> Deref for T {}
          ^~~~~~~~~~~~~~~~~~~~~~
test.rs:3:1: 3:23 help: run `rustc --explain E0119` to see a detailed explanation
test.rs:3:1: 3:23 note: conflicting implementation in crate `std`
test.rs:3 impl<T> Deref for T {}
          ^~~~~~~~~~~~~~~~~~~~~~
```

Output after this patch:
```
test.rs:3:1: 3:23 error: conflicting implementations for trait `core::ops::Deref` [E0119]
test.rs:3 impl<T> Deref for T {}
          ^~~~~~~~~~~~~~~~~~~~~~
test.rs:3:1: 3:23 help: run `rustc --explain E0119` to see a detailed explanation
note: conflicting implementation in crate `std`
```

8 years agoAuto merge of #29402 - sanxiyn:if-let, r=steveklabnik
bors [Wed, 28 Oct 2015 09:39:43 +0000 (09:39 +0000)]
Auto merge of #29402 - sanxiyn:if-let, r=steveklabnik

8 years agoAuto merge of #29400 - gkoz:phantom_data, r=alexcrichton
bors [Wed, 28 Oct 2015 07:49:04 +0000 (07:49 +0000)]
Auto merge of #29400 - gkoz:phantom_data, r=alexcrichton

None

8 years agoBuild compiler-rt/builtins with MSVC
angelsl [Fri, 23 Oct 2015 16:31:12 +0000 (00:31 +0800)]
Build compiler-rt/builtins with MSVC

8 years agoUpdate compiler-rt
angelsl [Fri, 23 Oct 2015 17:27:23 +0000 (01:27 +0800)]
Update compiler-rt

8 years agoAuto merge of #29398 - jonas-schievink:if-let-arms, r=arielb1
bors [Wed, 28 Oct 2015 06:00:19 +0000 (06:00 +0000)]
Auto merge of #29398 - jonas-schievink:if-let-arms, r=arielb1

Closes #29314

The code from #29314:
```rust
fn main() {
    if let Some(b) = None {
        ()
    } else {
        1
    };
}
```
now prints this:
```
test.rs:2:5: 6:6 error: `if let` arms have incompatible types: expected `()`, found `_` (expected (), found integral variable) [E0308]
test.rs:2     if let Some(b) = None {
test.rs:3         ()
test.rs:4     } else {
test.rs:5         1
test.rs:6     };
test.rs:2:5: 6:6 help: run `rustc --explain E0308` to see a detailed explanation
test.rs:4:12: 6:6 note: `if let` arm with an incompatible type
test.rs:4     } else {
test.rs:5         1
test.rs:6     };
error: aborting due to previous error
```

8 years agoUpdate libsyntax tests.
Eli Friedman [Sat, 24 Oct 2015 03:35:44 +0000 (20:35 -0700)]
Update libsyntax tests.

8 years agoMake fatal errors more consistent.
Eli Friedman [Sat, 24 Oct 2015 02:42:42 +0000 (19:42 -0700)]
Make fatal errors more consistent.

8 years agoStart pushing panics outward in lexer.
Eli Friedman [Sat, 24 Oct 2015 02:20:03 +0000 (19:20 -0700)]
Start pushing panics outward in lexer.

8 years agoDon't panic for fatal errors in attribute parsing.
Eli Friedman [Sat, 24 Oct 2015 02:02:38 +0000 (19:02 -0700)]
Don't panic for fatal errors in attribute parsing.

8 years agoDelete unnecessary ParserAttr trait.
Eli Friedman [Sat, 24 Oct 2015 01:37:21 +0000 (18:37 -0700)]
Delete unnecessary ParserAttr trait.

8 years agoDon't use panicking helpers in Parser.
Eli Friedman [Sat, 24 Oct 2015 01:33:19 +0000 (18:33 -0700)]
Don't use panicking helpers in Parser.

8 years agoAuto merge of #29313 - arielb1:projection-overflow, r=eddyb
bors [Wed, 28 Oct 2015 03:07:28 +0000 (03:07 +0000)]
Auto merge of #29313 - arielb1:projection-overflow, r=eddyb

This turns the crashes into overflow errors.

r? @eddyb

8 years agoAuto merge of #29311 - steveklabnik:doc_iterator_trait, r=alexcrichton
bors [Wed, 28 Oct 2015 01:17:12 +0000 (01:17 +0000)]
Auto merge of #29311 - steveklabnik:doc_iterator_trait, r=alexcrichton

This cleans up descriptions, adds more examples, and increases
consistency between similar methods.

8 years agoBump version to 1.6
Brian Anderson [Wed, 28 Oct 2015 00:47:43 +0000 (17:47 -0700)]
Bump version to 1.6

8 years agoFix for middle::reachable + better comments and tests
Vadim Petrochenkov [Wed, 28 Oct 2015 00:38:22 +0000 (03:38 +0300)]
Fix for middle::reachable + better comments and tests

In `middle::reachable` mark default impl of a trait method as reachable if this trait method is used from inlinable code

8 years agoMention in the docs, that `assert!` has a second version with a custom message
Marcell Pardavi [Tue, 27 Oct 2015 23:56:27 +0000 (00:56 +0100)]
Mention in the docs, that `assert!` has a second version with a custom message

I recently discovered that this is not mentioned in the docs, only in
the examples, and it's not evident for people coming from C++

r? @steveklabnik

8 years agoAuto merge of #29072 - nagisa:place-arrow, r=pnkfelix
bors [Tue, 27 Oct 2015 22:56:39 +0000 (22:56 +0000)]
Auto merge of #29072 - nagisa:place-arrow, r=pnkfelix

This commit generalises parsing of associative operators from left-associative
only (with some ugly hacks to support right-associative assignment) to properly
left/right-associative operators.

Parsing is still is not general enough to handle non-associative,
non-highest-precedence prefix or non-highest-precedence
postfix operators (e.g. `..` range syntax) and should be made to be.

Lastly, this commit adds support for parsing right-associative `<-` (left arrow)
operator with precedence higher than assignment as the operator for placement-in
feature.

---

This PR still needs various non-parser changes (e.g. src/grammar and tests) and I’m still working on these; the meat of the PR can already be reviewed, though, I think.

Please review carefully. I made sure that quirks I have discovered so far are preserved (see e.g. https://github.com/rust-lang/rust/issues/29071) and am looking for more corner cases as I continue to work on tests et al, but there may be something I haven’t noticed or accounted for.

EDIT: I’m also not sure I managed to preserve all the semantics with the range operator inside non-trivial expressions since these are a mess at the moment. Crater runs would be nice.

8 years agoAdd some debug printouts to librustc_privacy
Niko Matsakis [Tue, 27 Oct 2015 22:29:31 +0000 (18:29 -0400)]
Add some debug printouts to librustc_privacy

8 years agoAdjust src/grammar for the introduced <- op
Simonas Kazlauskas [Tue, 27 Oct 2015 20:05:23 +0000 (22:05 +0200)]
Adjust src/grammar for the introduced <- op

8 years agoAuto merge of #28833 - jryans:borrowck-linear-errors, r=pnkfelix
bors [Tue, 27 Oct 2015 21:04:59 +0000 (21:04 +0000)]
Auto merge of #28833 - jryans:borrowck-linear-errors, r=pnkfelix

Change error reporting of conflicting loans to stop earlier after printing
an error for a given borrow, instead of proceeding to error on possibly every
issued loan.  This keeps us down to O(n) errors (for n problem lines), instead
of O(n^2) errors in some cases.

Fixes #27485.

8 years agotype_of: use `sizing_type_of` to check the size of arrays
Ariel Ben-Yehuda [Tue, 27 Oct 2015 21:02:23 +0000 (23:02 +0200)]
type_of: use `sizing_type_of` to check the size of arrays

when evaluating a recursive type, the type_of of the interior could be
still in progress, so we can't use that.

Fixes #19001

8 years agoAdd tests for newly introduced syntax
Simonas Kazlauskas [Fri, 16 Oct 2015 21:06:25 +0000 (00:06 +0300)]
Add tests for newly introduced syntax

Also add some (regression) tests for discovered parser oddities

8 years agoUpdate unused_parens lint for placement-in arrow
Simonas Kazlauskas [Fri, 16 Oct 2015 20:24:10 +0000 (23:24 +0300)]
Update unused_parens lint for placement-in arrow

8 years agoFix restrictions when parsing rhs of equalities
Simonas Kazlauskas [Fri, 16 Oct 2015 19:42:06 +0000 (22:42 +0300)]
Fix restrictions when parsing rhs of equalities

8 years agoFix prefix range expressions being not parsed
Simonas Kazlauskas [Thu, 15 Oct 2015 18:37:21 +0000 (21:37 +0300)]
Fix prefix range expressions being not parsed

8 years agoAdd a test for #29071
Simonas Kazlauskas [Thu, 15 Oct 2015 15:09:10 +0000 (18:09 +0300)]
Add a test for #29071

Fixes #29071

8 years agoGeneralise associative operator parsing
Simonas Kazlauskas [Thu, 15 Oct 2015 12:51:30 +0000 (15:51 +0300)]
Generalise associative operator parsing

This commit generalises parsing of associative operators from left-associative
only (with some ugly hacks to support right-associative assignment) to properly
left/right-associative operators.

Parsing still is not general enough to handle non-associative,
non-highest-precedence prefix or non-highest-precedence postfix operators (e.g.
`..` range syntax), though. That should be fixed in the future.

Lastly, this commit adds support for parsing right-associative `<-` (left arrow)
operator with precedence higher than assignment as the operator for placement-in
feature.

8 years agoAuto merge of #26421 - nham:fix_21546, r=pnkfelix
bors [Tue, 27 Oct 2015 19:15:29 +0000 (19:15 +0000)]
Auto merge of #26421 - nham:fix_21546, r=pnkfelix

Fixes #21546.

8 years agoComments and formatting
Vadim Petrochenkov [Tue, 27 Oct 2015 18:56:48 +0000 (21:56 +0300)]
Comments and formatting

8 years agoSmall fix in the book
Marcell Pardavi [Tue, 27 Oct 2015 18:02:47 +0000 (19:02 +0100)]
Small fix in the book

Fixes #29401.

r? @steveklabnik

8 years agoAuto merge of #26848 - oli-obk:const_fn_const_eval, r=pnkfelix
bors [Tue, 27 Oct 2015 17:11:13 +0000 (17:11 +0000)]
Auto merge of #26848 - oli-obk:const_fn_const_eval, r=pnkfelix

this has the funky side-effect of also allowing constant evaluation of function calls to functions that are not `const fn` as long as `check_const` didn't mark that function `NOT_CONST`

It's still not possible to call a normal function from a `const fn`, but let statements' initialization value can get const evaluated (this caused the fallout in the overflowing tests)

we can now do this:

```rust
const fn add(x: usize, y: usize) -> usize { x + y }
const ARR: [i32; add(1, 2)] = [5, 6, 7];
```

also added a test for destructuring in const fn args
```rust
const fn i((a, b): (u32, u32)) -> u32 { a + b } //~ ERROR: E0022
```

This is a **[breaking change]**, since it turns some runtime panics into compile-time errors. This statement is true for ANY improvement to the const evaluator.

8 years agoDon't print the same impl twice on ext. overlap
Jonas Schievink [Tue, 27 Oct 2015 16:59:32 +0000 (17:59 +0100)]
Don't print the same impl twice on ext. overlap

8 years agomk: Re-add libgcc_s_seh-1.dll to windows dist
Alex Crichton [Tue, 27 Oct 2015 16:40:11 +0000 (09:40 -0700)]
mk: Re-add libgcc_s_seh-1.dll to windows dist

Although the compiler itself does not depend on this DLL the `libstdc++-6.dll`
that we're shipping does, so we still need to include it.

8 years agoUse `if let`
Seo Sanghyeon [Tue, 27 Oct 2015 16:08:46 +0000 (01:08 +0900)]
Use `if let`

8 years agoAdds tons of documentation for Iterator
Steve Klabnik [Mon, 26 Oct 2015 20:34:47 +0000 (16:34 -0400)]
Adds tons of documentation for Iterator

This adds lots of examples, clarifies text, and just generally improves
the documentation for Iterator.

8 years agoAuto merge of #29327 - sanxiyn:argument, r=nrc
bors [Tue, 27 Oct 2015 14:25:57 +0000 (14:25 +0000)]
Auto merge of #29327 - sanxiyn:argument, r=nrc

Fix #24114.

8 years agoadd a recursion limit for type representation
Ariel Ben-Yehuda [Sun, 25 Oct 2015 21:02:15 +0000 (23:02 +0200)]
add a recursion limit for type representation

I could have added a check for explicit recursion, as irregular types
tend to cause selection errors, but I am not sufficiently sure that
cannot be bypassed.

Fixes #22919
Fixes #25639
Fixes #26548

8 years agoproject: add a recursion limit to "tail-recursive" projections
Ariel Ben-Yehuda [Sat, 24 Oct 2015 15:37:28 +0000 (18:37 +0300)]
project: add a recursion limit to "tail-recursive" projections

Fixes #21946
Fixes #23992
Fixes #25945

8 years agoImplement Default for PhantomData
Gleb Kozyrev [Tue, 27 Oct 2015 13:42:38 +0000 (15:42 +0200)]
Implement Default for PhantomData

8 years agoDiagnostic: "`if let` arm with incompatible type"
Jonas Schievink [Tue, 27 Oct 2015 12:10:41 +0000 (13:10 +0100)]
Diagnostic: "`if let` arm with incompatible type"

8 years agoAuto merge of #29326 - Charlotteis:patch-1, r=steveklabnik
bors [Tue, 27 Oct 2015 10:15:00 +0000 (10:15 +0000)]
Auto merge of #29326 - Charlotteis:patch-1, r=steveklabnik

The beginning of the work that needs to be done as part of #28835.

:sunny:

8 years agothe const evaluator might run before check_const
Oliver Schneider [Tue, 27 Oct 2015 08:39:07 +0000 (09:39 +0100)]
the const evaluator might run before check_const

So we cannot assume that the function call was marked NOT_CONST by check_const.

8 years agoAuto merge of #29317 - matklad:clarify-reference, r=steveklabnik
bors [Tue, 27 Oct 2015 08:27:53 +0000 (08:27 +0000)]
Auto merge of #29317 - matklad:clarify-reference, r=steveklabnik

Rust reference is a bit confusing here, because it does not explicitly mention trait objects.

See an example of confusion here https://users.rust-lang.org/t/confusion-about-impls-without-for/3379/2 :)

r? @steveklabnik

8 years agoAuto merge of #29309 - rjbs:doc-comment-sections, r=alexcrichton
bors [Tue, 27 Oct 2015 06:40:12 +0000 (06:40 +0000)]
Auto merge of #29309 - rjbs:doc-comment-sections, r=alexcrichton

As displayed before this commit, I found the book confusing in its
explanation of `#`-led comments in `rust` blocks.  Possibly the
biggest confusion was because the many-dashes construct does not
become an HR element in the Markdown translator used, so things were
not being properly set off.

This change should more clearly show the as-rendered content as
rendered, and the as-coded content as code.

8 years agoAuto merge of #29298 - tbu-:pr_doc_env_panic, r=alexcrichton
bors [Tue, 27 Oct 2015 04:45:39 +0000 (04:45 +0000)]
Auto merge of #29298 - tbu-:pr_doc_env_panic, r=alexcrichton

8 years agoAuto merge of #29386 - jonas-schievink:codegen-worker-id, r=alexcrichton
bors [Tue, 27 Oct 2015 02:56:57 +0000 (02:56 +0000)]
Auto merge of #29386 - jonas-schievink:codegen-worker-id, r=alexcrichton

This makes it easier to tell which thread does how much work. Output now looks like this:
```
time: 0.000; rss: 55MB llvm function passes [0]
time: 0.000; rss: 55MB llvm function passes [2]
time: 0.000; rss: 55MB llvm function passes [1]
time: 0.000; rss: 55MB llvm module passes [0]
time: 0.000; rss: 55MB llvm module passes [1]
time: 0.000; rss: 55MB llvm module passes [2]
time: 0.000; rss: 55MB llvm function passes [3]
time: 0.000; rss: 55MB llvm module passes [3]
time: 0.000; rss: 55MB codegen passes [1]
time: 0.000; rss: 55MB codegen passes [2]
time: 0.000; rss: 55MB codegen passes [0]
time: 0.000; rss: 56MB codegen passes [1]
time: 0.001; rss: 56MB codegen passes [3]
```

8 years agoAuto merge of #29325 - alexcrichton:revert-trait-accessibility, r=nrc
bors [Tue, 27 Oct 2015 01:04:14 +0000 (01:04 +0000)]
Auto merge of #29325 - alexcrichton:revert-trait-accessibility, r=nrc

These commits revert https://github.com/rust-lang/rust/pull/28504 and add a regression test pointed out by @petrochenkov, it's not immediately clear with the regression that the accessibility check should be removed, so for now preserve the behavior on stable by default.

r? @nrc

8 years agoAuto merge of #29295 - little-dude:rustfmt_librustc_unicode, r=nrc
bors [Mon, 26 Oct 2015 23:14:50 +0000 (23:14 +0000)]
Auto merge of #29295 - little-dude:rustfmt_librustc_unicode, r=nrc

I didn't see anything particularly weird here. The last commit has the only changes I'm not 100% sure about.

I ignored tables.rs since it's genrated, but I updated the python script that generates it.

?r @nrc

8 years agoAuto merge of #29274 - thepowersgang:issues-29107-const-unsafe-fn-order, r=nikomatsakis
bors [Mon, 26 Oct 2015 21:23:32 +0000 (21:23 +0000)]
Auto merge of #29274 - thepowersgang:issues-29107-const-unsafe-fn-order, r=nikomatsakis

This PR switches the implemented ordering from `unsafe const fn` (as was in the original RFC) to `const unsafe fn` (which is what the lang team decided on)

8 years agoPrint the codegen worker # when using time-passes
Jonas Schievink [Mon, 26 Oct 2015 20:03:03 +0000 (21:03 +0100)]
Print the codegen worker # when using time-passes

8 years agoAuto merge of #29384 - nikomatsakis:mir-not-stable-beta, r=alexcrichton
bors [Mon, 26 Oct 2015 19:34:14 +0000 (19:34 +0000)]
Auto merge of #29384 - nikomatsakis:mir-not-stable-beta, r=alexcrichton

8 years agoDisable MIR on beta/stable until we've resolved #29227 is resolved.
Niko Matsakis [Mon, 26 Oct 2015 19:05:35 +0000 (15:05 -0400)]
Disable MIR on beta/stable until we've resolved #29227 is resolved.

8 years agoAuto merge of #29287 - Ryman:fn_nopat, r=alexcrichton
bors [Mon, 26 Oct 2015 17:44:37 +0000 (17:44 +0000)]
Auto merge of #29287 - Ryman:fn_nopat, r=alexcrichton

Previously, if you copied a signature from a trait definition such as:

```rust
fn foo<'a>(&'a Bar) -> bool {}
```

and moved it into an `impl`, there would be an error message:

"unexpected token `'a`"

Adding to the error message that a pattern is expected should help
users to find the actual problem with using a lifetime here.

8 years agotest: Add regression test for "source trait is private"
Alex Crichton [Mon, 26 Oct 2015 16:17:09 +0000 (09:17 -0700)]
test: Add regression test for "source trait is private"

8 years agorustfmt librustc_unicode
Corentin Henry [Sun, 25 Oct 2015 10:19:14 +0000 (11:19 +0100)]
rustfmt librustc_unicode

8 years agoRemove NodeArg
Seo Sanghyeon [Mon, 26 Oct 2015 16:32:04 +0000 (01:32 +0900)]
Remove NodeArg

8 years agoRemove use of 'just' in trpl/installing-rust.md
Charlotte Spencer [Mon, 26 Oct 2015 16:29:54 +0000 (16:29 +0000)]
Remove use of 'just' in trpl/installing-rust.md

The beginning of the work that needs to be done as part of #28835.

8 years agoRevert "Remove unnecessary trait accessibility check."
Alex Crichton [Mon, 26 Oct 2015 16:16:05 +0000 (09:16 -0700)]
Revert "Remove unnecessary trait accessibility check."

This reverts commit f4f95eb3a9f2c3c38679db84aabbb7cdb46d2641.

8 years agoRevert "Add UFCS privacy test."
Alex Crichton [Mon, 26 Oct 2015 16:16:01 +0000 (09:16 -0700)]
Revert "Add UFCS privacy test."

This reverts commit b3e1aca40f889a565bfa2607b82b80fe7cbcefea.

8 years agoAuto merge of #29310 - mdinger:book_playpen, r=steveklabnik
bors [Mon, 26 Oct 2015 15:50:45 +0000 (15:50 +0000)]
Auto merge of #29310 - mdinger:book_playpen, r=steveklabnik

Makes rustbook code playpen links follow the style set in https://github.com/rust-lang/rust/pull/28963. This is basically cut and paste from the other one. The link looks better and still works so I assume it's good.

![rustbook](https://cloud.githubusercontent.com/assets/4156987/10717631/7a74f8ae-7b34-11e5-8870-35b5fc2526a4.png)

Fixes https://github.com/rust-lang/rust/issues/29308

r? @steveklabnik

8 years agoDistinguish argument from local variable
Seo Sanghyeon [Mon, 26 Oct 2015 15:46:11 +0000 (00:46 +0900)]
Distinguish argument from local variable

8 years agoAuto merge of #29280 - Ryman:bad_docattr, r=Manishearth
bors [Mon, 26 Oct 2015 13:58:50 +0000 (13:58 +0000)]
Auto merge of #29280 - Ryman:bad_docattr, r=Manishearth

As is, this attr would lead to the "///" prefix being in the output text.

8 years agoAuto merge of #29247 - dcarral:missing_word_trpl, r=steveklabnik
bors [Mon, 26 Oct 2015 12:08:51 +0000 (12:08 +0000)]
Auto merge of #29247 - dcarral:missing_word_trpl, r=steveklabnik

I somehow missed a word behind the numbers while going through this section, don't know what the best approach would be though since "**available** addresses" sounds good to me, too".

8 years agoAuto merge of #29312 - apasel422:issue-21410, r=alexcrichton
bors [Mon, 26 Oct 2015 10:16:52 +0000 (10:16 +0000)]
Auto merge of #29312 - apasel422:issue-21410, r=alexcrichton

Closes #21410.
Closes #24972.

8 years agoreference: clarify impl
Aleksey Kladov [Mon, 26 Oct 2015 09:31:17 +0000 (12:31 +0300)]
reference: clarify impl

Another kind of nominal types in Rust are trait objects, so the following is valid

```rust
trait A {

}

impl A {

}
```

8 years agoAuto merge of #29303 - petrochenkov:unistrimp, r=eddyb
bors [Mon, 26 Oct 2015 08:27:59 +0000 (08:27 +0000)]
Auto merge of #29303 - petrochenkov:unistrimp, r=eddyb

And use `VariantData` instead of `P<VariantData>` in `Item_` and `Variant_`

Improvements suggested by @eddyb in https://github.com/rust-lang/rust/pull/28816#discussion_r42483587 and https://github.com/rust-lang/rust/pull/28816#discussion_r42483648

plugin-[breaking-change]

r? @eddyb

8 years agoAuto merge of #29301 - reddraggone9:patch-1, r=alexcrichton
bors [Mon, 26 Oct 2015 06:37:12 +0000 (06:37 +0000)]
Auto merge of #29301 - reddraggone9:patch-1, r=alexcrichton

Added a single character to fix a typo in a doc comment.

8 years agoAuto merge of #29306 - alexcrichton:yet-another-windows-dist-fix, r=vadimcn
bors [Mon, 26 Oct 2015 04:48:00 +0000 (04:48 +0000)]
Auto merge of #29306 - alexcrichton:yet-another-windows-dist-fix, r=vadimcn

We don't need the support libgcc SEH library, but we do need the C++ standard
library for running the compiler itself.

cc #29208
Closes #29294

8 years agoAuto merge of #29299 - tbu-:pr_btreemap_example_dup, r=alexcrichton
bors [Mon, 26 Oct 2015 02:56:27 +0000 (02:56 +0000)]
Auto merge of #29299 - tbu-:pr_btreemap_example_dup, r=alexcrichton

8 years agoAdd tests for #21410 and #24972
Andrew Paseltiner [Sun, 25 Oct 2015 21:47:22 +0000 (17:47 -0400)]
Add tests for #21410 and #24972

Closes #21410.
Closes #24972.

8 years agoAuto merge of #29296 - zazdxscf:compiletest_noargs_show_help, r=alexcrichton
bors [Mon, 26 Oct 2015 00:19:51 +0000 (00:19 +0000)]
Auto merge of #29296 - zazdxscf:compiletest_noargs_show_help, r=alexcrichton

instead of this panic:
```
thread '<main>' panicked at 'index out of bounds: the len is 1 but the
index is 1', src/libcollections/vec.rs:1110
```

It still panics, just like `-h` does, so it should be okay in this
regard.

8 years agoAuto merge of #29284 - apasel422:tests, r=alexcrichton
bors [Sun, 25 Oct 2015 20:31:48 +0000 (20:31 +0000)]
Auto merge of #29284 - apasel422:tests, r=alexcrichton

Closes #22781.
Closes #23891.
Closes #24956.
Closes #25145.
Closes #25693.
Closes #26095.
Closes #26459.
Closes #27320.
Closes #27895.

8 years agoUpdate the playpen link for code in the rust book to agree with rustdoc's new style
mdinger [Sun, 25 Oct 2015 20:18:09 +0000 (16:18 -0400)]
Update the playpen link for code in the rust book to agree with rustdoc's new style

8 years agoreformat the docs for hidden code in rust sections
Ricardo Signes [Sun, 25 Oct 2015 19:58:50 +0000 (15:58 -0400)]
reformat the docs for hidden code in rust sections

As displayed before this commit, I found the book confusing in its
explanation of `#`-led comments in `rust` blocks.  Possibly the
biggest confusion was because the many-dashes construct does not
become an HR element in the Markdown translator used, so things were
not being properly set off.

This change should more clearly show the as-rendered content as
rendered, and the as-coded content as code.

8 years agoSay that `std::env::{set_var, unset_var}` *may* panic
Tobias Bucher [Sun, 25 Oct 2015 20:03:42 +0000 (20:03 +0000)]
Say that `std::env::{set_var, unset_var}` *may* panic

Previously the documentation suggested that the documentation about the
panics are guarantees.

8 years agoAuto merge of #29266 - apasel422:wf, r=alexcrichton
bors [Sun, 25 Oct 2015 18:34:29 +0000 (18:34 +0000)]
Auto merge of #29266 - apasel422:wf, r=alexcrichton

Using these traits in an object context previously resulted in an RFC 1214 warning.

8 years agomk: Package libstdc++-6.dll on x86_64 MinGW
Alex Crichton [Sun, 25 Oct 2015 17:28:47 +0000 (10:28 -0700)]
mk: Package libstdc++-6.dll on x86_64 MinGW

We don't need the support libgcc SEH library, but we do need the C++ standard
library for running the compiler itself.

cc #29208

8 years agoAuto merge of #29254 - alexcrichton:stabilize-1.5, r=brson
bors [Sun, 25 Oct 2015 16:38:38 +0000 (16:38 +0000)]
Auto merge of #29254 - alexcrichton:stabilize-1.5, r=brson

This commit stabilizes and deprecates library APIs whose FCP has closed in the
last cycle, specifically:

Stabilized APIs:

* `fs::canonicalize`
* `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists,
   is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait.
* `Formatter::fill`
* `Formatter::width`
* `Formatter::precision`
* `Formatter::sign_plus`
* `Formatter::sign_minus`
* `Formatter::alternate`
* `Formatter::sign_aware_zero_pad`
* `string::ParseError`
* `Utf8Error::valid_up_to`
* `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}`
* `<[T]>::split_{first,last}{,_mut}`
* `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated
  but will be once 1.5 is released.
* `str::{R,}MatchIndices`
* `str::{r,}match_indices`
* `char::from_u32_unchecked`
* `VecDeque::insert`
* `VecDeque::shrink_to_fit`
* `VecDeque::as_slices`
* `VecDeque::as_mut_slices`
* `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`)
* `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`)
* `Vec::resize`
* `str::slice_mut_unchecked`
* `FileTypeExt`
* `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}`
* `BinaryHeap::from` - `from_vec` deprecated in favor of this
* `BinaryHeap::into_vec` - plus a `Into` impl
* `BinaryHeap::into_sorted_vec`

Deprecated APIs

* `slice::ref_slice`
* `slice::mut_ref_slice`
* `iter::{range_inclusive, RangeInclusive}`
* `std::dynamic_lib`

Closes #27706
Closes #27725
cc #27726 (align not stabilized yet)
Closes #27734
Closes #27737
Closes #27742
Closes #27743
Closes #27772
Closes #27774
Closes #27777
Closes #27781
cc #27788 (a few remaining methods though)
Closes #27790
Closes #27793
Closes #27796
Closes #27810
cc #28147 (not all parts stabilized)

8 years agostd: Stabilize library APIs for 1.5
Alex Crichton [Thu, 22 Oct 2015 23:28:45 +0000 (16:28 -0700)]
std: Stabilize library APIs for 1.5

This commit stabilizes and deprecates library APIs whose FCP has closed in the
last cycle, specifically:

Stabilized APIs:

* `fs::canonicalize`
* `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists,
   is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait.
* `Formatter::fill`
* `Formatter::width`
* `Formatter::precision`
* `Formatter::sign_plus`
* `Formatter::sign_minus`
* `Formatter::alternate`
* `Formatter::sign_aware_zero_pad`
* `string::ParseError`
* `Utf8Error::valid_up_to`
* `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}`
* `<[T]>::split_{first,last}{,_mut}`
* `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated
  but will be once 1.5 is released.
* `str::{R,}MatchIndices`
* `str::{r,}match_indices`
* `char::from_u32_unchecked`
* `VecDeque::insert`
* `VecDeque::shrink_to_fit`
* `VecDeque::as_slices`
* `VecDeque::as_mut_slices`
* `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`)
* `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`)
* `Vec::resize`
* `str::slice_mut_unchecked`
* `FileTypeExt`
* `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}`
* `BinaryHeap::from` - `from_vec` deprecated in favor of this
* `BinaryHeap::into_vec` - plus a `Into` impl
* `BinaryHeap::into_sorted_vec`

Deprecated APIs

* `slice::ref_slice`
* `slice::mut_ref_slice`
* `iter::{range_inclusive, RangeInclusive}`
* `std::dynamic_lib`

Closes #27706
Closes #27725
cc #27726 (align not stabilized yet)
Closes #27734
Closes #27737
Closes #27742
Closes #27743
Closes #27772
Closes #27774
Closes #27777
Closes #27781
cc #27788 (a few remaining methods though)
Closes #27790
Closes #27793
Closes #27796
Closes #27810
cc #28147 (not all parts stabilized)

8 years agosyntax/rustc_front: Simplify VariantData::fields
Vadim Petrochenkov [Sun, 25 Oct 2015 15:33:51 +0000 (18:33 +0300)]
syntax/rustc_front: Simplify VariantData::fields

And use VariantData instead of P<VariantData> in Item_ and Variant_

8 years agoAuto merge of #29281 - skeleten:issue-28189, r=steveklabnik
bors [Sun, 25 Oct 2015 14:41:06 +0000 (14:41 +0000)]
Auto merge of #29281 - skeleten:issue-28189, r=steveklabnik

Closes #28189

8 years agoFix doc comment typo
Lee Jenkins [Sun, 25 Oct 2015 14:17:27 +0000 (09:17 -0500)]
Fix doc comment typo

Added a single character to fix a typo in a doc comment.

8 years agoAuto merge of #29279 - Ryman:strtests, r=alexcrichton
bors [Sun, 25 Oct 2015 12:44:33 +0000 (12:44 +0000)]
Auto merge of #29279 - Ryman:strtests, r=alexcrichton

8 years agoDocument possible panics for `std::env::{set_var, unset_var}`
Tobias Bucher [Sun, 25 Oct 2015 12:04:29 +0000 (12:04 +0000)]
Document possible panics for `std::env::{set_var, unset_var}`

8 years agoRemove key duplication from `BTreeMap` example in `collections`
Tobias Bucher [Sun, 25 Oct 2015 12:03:21 +0000 (12:03 +0000)]
Remove key duplication from `BTreeMap` example in `collections`