]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #29188 - nikomatsakis:remove-contraction, r=pnkfelix
bors [Thu, 29 Oct 2015 11:14:27 +0000 (11:14 +0000)]
Auto merge of #29188 - nikomatsakis:remove-contraction, r=pnkfelix

This fixes #29048 (though I think adding better transactional support would be a better fix for that issue, but that is more difficult). It also simplifies region inference and changes the model to a pure data flow one, as discussed in [this internals thread](https://internals.rust-lang.org/t/rough-thoughts-on-the-impl-of-region-inference-mir-etc/2800). I am not 100% sure though if this PR is the right thing to do -- or at least maybe not at this moment, so thoughts on that would be appreciated.

r? @pnkfelix
cc @arielb1

8 years agoAuto merge of #29442 - rjbs:docs-comma-splice, r=steveklabnik
bors [Thu, 29 Oct 2015 09:12:26 +0000 (09:12 +0000)]
Auto merge of #29442 - rjbs:docs-comma-splice, r=steveklabnik

This is two sentences that have been comma spliced, and should
be split with a full stop.  (This error made me stop and re-read,
and I submit this as an actual improvement to readability, not
as a grammar weird-o!)

8 years agoAuto merge of #29441 - Ryman:match_refactor_msg, r=alexcrichton
bors [Thu, 29 Oct 2015 06:56:52 +0000 (06:56 +0000)]
Auto merge of #29441 - Ryman:match_refactor_msg, r=alexcrichton

This helps for the case where a match, such as below:
```rust
let foo = match foo {
    Some(x) => x,
    None => 0
};
```
gets refactored to no longer need the match, but the match keyword has been left accidentally:

```rust
let foo = match foo.unwrap_or(0);
```

This can be hard to spot as the expression grows more complex.

r? @alexcrichton

8 years agoAuto merge of #29432 - taralx:patch-2, r=alexcrichton
bors [Thu, 29 Oct 2015 05:08:56 +0000 (05:08 +0000)]
Auto merge of #29432 - taralx:patch-2, r=alexcrichton

Discarding errors is bad, m'kay?

8 years agoAuto merge of #29289 - DiamondLovesYou:pnacl-std-crates, r=alexcrichton
bors [Thu, 29 Oct 2015 03:20:13 +0000 (03:20 +0000)]
Auto merge of #29289 - DiamondLovesYou:pnacl-std-crates, r=alexcrichton

8 years agoAuto merge of #29444 - steveklabnik:rollup, r=steveklabnik
bors [Thu, 29 Oct 2015 01:25:34 +0000 (01:25 +0000)]
Auto merge of #29444 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #29264, #29405, #29417, #29435, #29437, #29438
- Failed merges:

8 years agosplit a run-on sentence
Ricardo Signes [Wed, 28 Oct 2015 23:15:20 +0000 (19:15 -0400)]
split a run-on sentence

This is two sentences that have been comma spliced, and should
be split with a full stop.  (This error made me stop and re-read,
and I submit this as an actual improvement to readability, not
as a grammar weird-o!)

8 years agoRollup merge of #29438 - jethrogb:topic/book-rbstrlit, r=alexcrichton
Steve Klabnik [Thu, 29 Oct 2015 00:27:35 +0000 (20:27 -0400)]
Rollup merge of #29438 - jethrogb:topic/book-rbstrlit, r=alexcrichton

The raw byte string literal syntax in the syntax index was incorrect. Also added links to the reference for raw and/or byte string literals.

8 years agoRollup merge of #29437 - brson:authors, r=alexcrichton
Steve Klabnik [Thu, 29 Oct 2015 00:27:35 +0000 (20:27 -0400)]
Rollup merge of #29437 - brson:authors, r=alexcrichton

8 years agoRollup merge of #29435 - djrollins:diverging-function-doc, r=Manishearth
Steve Klabnik [Thu, 29 Oct 2015 00:27:35 +0000 (20:27 -0400)]
Rollup merge of #29435 - djrollins:diverging-function-doc, r=Manishearth

I put the reference under the function return operator `->` rather than near the suggested `!` operators as I thought it was more relevant there.

Resolves #29431

8 years agoRollup merge of #29417 - pmarcelll:assert-doc, r=steveklabnik
Steve Klabnik [Thu, 29 Oct 2015 00:27:34 +0000 (20:27 -0400)]
Rollup merge of #29417 - pmarcelll:assert-doc, r=steveklabnik

…m 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 agoRollup merge of #29405 - pmarcelll:docs-fix, r=steveklabnik
Steve Klabnik [Thu, 29 Oct 2015 00:27:34 +0000 (20:27 -0400)]
Rollup merge of #29405 - pmarcelll:docs-fix, r=steveklabnik

Fixes #29401.

r? @steveklabnik

8 years agoRollup merge of #29264 - mdinger:colorify, r=steveklabnik
Steve Klabnik [Thu, 29 Oct 2015 00:27:34 +0000 (20:27 -0400)]
Rollup merge of #29264 - mdinger:colorify, r=steveklabnik

This is an alternative to https://github.com/rust-lang/rust/pull/29240 which fixes #15307 by adding colors to primitives and aliases instead of underlining.

Try to keep the discussion in https://github.com/rust-lang/rust/pull/29240 for now though so it can be kept track of.

A sample rendering is [here](http://mdinger.github.io/rust_std_colored/std/index.html)

8 years agoAuto merge of #29425 - apasel422:issue-29030, r=alexcrichton
bors [Wed, 28 Oct 2015 23:31:31 +0000 (23:31 +0000)]
Auto merge of #29425 - apasel422:issue-29030, r=alexcrichton

Closes #29030.

r? @alexcrichton

8 years agoMove test file to run-fail, since it does an unwrap
Niko Matsakis [Wed, 28 Oct 2015 22:48:06 +0000 (18:48 -0400)]
Move test file to run-fail, since it does an unwrap

8 years agoDo some slight refactoring, leave the rest for #29436
Niko Matsakis [Wed, 28 Oct 2015 20:42:47 +0000 (16:42 -0400)]
Do some slight refactoring, leave the rest for #29436

8 years agoUpdate docs for region inference to reflect current state better
Niko Matsakis [Wed, 28 Oct 2015 20:42:34 +0000 (16:42 -0400)]
Update docs for region inference to reflect current state better

8 years agoDon't "double check" var-sub-var constraints, which are handled in
Niko Matsakis [Mon, 26 Oct 2015 21:01:36 +0000 (17:01 -0400)]
Don't "double check" var-sub-var constraints, which are handled in
expansion already by growing the RHS to be bigger than LHS (all the way
to `'static` if necessary). This is needed because contraction doesn't
handle givens. Fixes #28934.

8 years agoremove SupSupConflict, which is now dead code
Niko Matsakis [Fri, 23 Oct 2015 00:30:22 +0000 (20:30 -0400)]
remove SupSupConflict, which is now dead code

8 years agoRegression test for #29048. Fixes #29048.
Niko Matsakis [Tue, 20 Oct 2015 14:23:31 +0000 (10:23 -0400)]
Regression test for #29048. Fixes #29048.

8 years agoRemove contraction. The contraction rules predated the notion of an
Niko Matsakis [Sat, 17 Oct 2015 00:19:25 +0000 (20:19 -0400)]
Remove contraction. The contraction rules predated the notion of an
empty region, and they complicate region inference to no particular end.
They also lead in some cases to spurious errors like #29048 (though in
some cases these errors are helpful in tracking down missing
constraints).

8 years agodo not dump extern def-ids with path for now
Niko Matsakis [Sat, 17 Oct 2015 00:18:37 +0000 (20:18 -0400)]
do not dump extern def-ids with path for now

8 years agolibsyntax: improve error message when a statement is prefixed with a match keyword
Kevin Butler [Tue, 27 Oct 2015 13:41:55 +0000 (13:41 +0000)]
libsyntax: improve error message when a statement is prefixed with a match keyword

8 years agoPort the standard crates to PNaCl/NaCl.
Richard Diamond [Sun, 25 Oct 2015 01:51:34 +0000 (20:51 -0500)]
Port the standard crates to PNaCl/NaCl.

8 years agoBook: Update raw/byte string literal in syntax index
Jethro Beekman [Wed, 28 Oct 2015 21:32:48 +0000 (14:32 -0700)]
Book: Update raw/byte string literal in syntax index

The raw byte string literal syntax in the syntax index was incorrect. Also added links to the reference for raw and/or byte string literals.

8 years agoAuto merge of #29415 - nikomatsakis:issue-29161, r=nikomatsakis
bors [Wed, 28 Oct 2015 21:37:42 +0000 (21:37 +0000)]
Auto merge of #29415 - nikomatsakis:issue-29161, r=nikomatsakis

Fix corner case in privacy that was causing ICEs when the `source_did` was not crate-local.

Full confession: I only kinda sorta understand this code, but afaict it's legit for `source_did` to be from another crate.

r? @alexcrichton

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 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 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 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