Commit Graph

47638 Commits

Author SHA1 Message Date
bors
4d11db6501 Auto merge of #29129 - cuviper:impl-from-for-floats, r=alexcrichton
This is a spiritual successor to #28921, completing the "upcast" idea from rust-num/num#97.
2015-10-29 18:55:12 +00:00
bors
a18e0b2707 Auto merge of #29445 - igpay:patch-1, r=alexcrichton
This documentation confused me when trying to use truncate on a project. Originally, it was unclear whether truncate removed the last `len` elements, or whether it cut down the vector to be exactly `len` elements long. The example was also ambiguous.
2015-10-29 16:03:46 +00:00
bors
01fd4d6227 Auto merge of #29450 - defuz:patch-1, r=steveklabnik
r? @steveklabnik
2015-10-29 13:09:12 +00:00
bors
427140f771 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
2015-10-29 11:14:27 +00:00
Ivan Ivaschenko
94d9a8bc5f Trying to to be more accurate
r? @steveklabnik
2015-10-29 12:07:11 +02:00
bors
696cd7cf86 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!)
2015-10-29 09:12:26 +00:00
bors
2af9aabf3a 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
2015-10-29 06:56:52 +00:00
bors
3896a00536 Auto merge of #29432 - taralx:patch-2, r=alexcrichton
Discarding errors is bad, m'kay?
2015-10-29 05:08:56 +00:00
bors
e8e6892e3c Auto merge of #29289 - DiamondLovesYou:pnacl-std-crates, r=alexcrichton 2015-10-29 03:20:13 +00:00
Cameron Sun
39289d00fd Update docstring for truncate
This documentation confused me when trying to use truncate on a project. Originally, it was unclear whether truncate removed the last `len` elements, or whether it cut down the vector to be exactly `len` elements long. The example was also ambiguous.
2015-10-28 21:38:46 -04:00
bors
b4af35f7b1 Auto merge of #29444 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #29264, #29405, #29417, #29435, #29437, #29438
- Failed merges:
2015-10-29 01:25:34 +00:00
Ricardo Signes
618d22609e 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!)
2015-10-28 20:56:03 -04:00
Steve Klabnik
0809eaa7c0 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.
2015-10-28 20:27:35 -04:00
Steve Klabnik
319e97bfcf Rollup merge of #29437 - brson:authors, r=alexcrichton 2015-10-28 20:27:35 -04:00
Steve Klabnik
f1bc7f558f 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
2015-10-28 20:27:35 -04:00
Steve Klabnik
2f0b4ddfa9 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
2015-10-28 20:27:34 -04:00
Steve Klabnik
3f3b55bd4d Rollup merge of #29405 - pmarcelll:docs-fix, r=steveklabnik
Fixes #29401.

r? @steveklabnik
2015-10-28 20:27:34 -04:00
Steve Klabnik
43c553a7d3 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)
2015-10-28 20:27:34 -04:00
bors
8ca0acc25a Auto merge of #29425 - apasel422:issue-29030, r=alexcrichton
Closes #29030.

r? @alexcrichton
2015-10-28 23:31:31 +00:00
Josh Stone
1a19f9877a Comment how the significand limits lossless int->float conversion 2015-10-28 16:05:51 -07:00
Niko Matsakis
c2277de673 Move test file to run-fail, since it does an unwrap 2015-10-28 18:48:49 -04:00
Niko Matsakis
690206c74a Do some slight refactoring, leave the rest for #29436 2015-10-28 18:48:49 -04:00
Niko Matsakis
9ef241656f Update docs for region inference to reflect current state better 2015-10-28 18:48:49 -04:00
Niko Matsakis
c81ce8249c 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.
2015-10-28 18:48:49 -04:00
Niko Matsakis
6934618b7d remove SupSupConflict, which is now dead code 2015-10-28 18:48:49 -04:00
Niko Matsakis
18698c80c7 Regression test for #29048. Fixes #29048. 2015-10-28 18:48:49 -04:00
Niko Matsakis
41bca6dd76 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).
2015-10-28 18:48:49 -04:00
Niko Matsakis
60ab57e56d do not dump extern def-ids with path for now 2015-10-28 18:48:49 -04:00
Kevin Butler
99ecf4e2c9 libsyntax: improve error message when a statement is prefixed with a match keyword 2015-10-28 22:32:07 +00:00
Richard Diamond
a7d93c939a Port the standard crates to PNaCl/NaCl. 2015-10-28 17:23:28 -05:00
Jethro Beekman
14eef41378 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.
2015-10-28 14:38:04 -07:00
bors
e6ad039d2c 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
2015-10-28 21:37:42 +00:00
Brian Anderson
049e729bcb Update AUTHORS.txt for 1.5 2015-10-28 13:42:20 -07:00
Brian Anderson
93db1e2b6a Update mailmap 2015-10-28 13:40:52 -07:00
Brian Anderson
f32205d4ff Update AUTHORS.txt for 1.4 2015-10-28 13:28:57 -07:00
Brian Anderson
418ef78c5c Update mailmap 2015-10-28 13:28:19 -07:00
Brian Anderson
c9edcdb270 Tweak the add-authors.sh script 2015-10-28 13:20:42 -07:00
Daniel Rollins
90b776e5c7 Add diverging functions -> ! to syntax index
Resolves #29431
2015-10-28 19:56:57 +00:00
Niko Matsakis
19996d4cdf The source_did may not be local, so don't unwrap the
`as_local_node_id`, instead just compare against `Some(id)`.
Fixes #29161.
2015-10-28 15:38:09 -04:00
bors
65623dba0d 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.
2015-10-28 19:34:21 +00:00
JP Sugarbroad
9cdd73124a Log the error we get when we fail to load metadata from a library. 2015-10-28 11:19:33 -07:00
bors
e3f6a5606e Auto merge of #29233 - angelsl:msvc1, r=alexcrichton
Build compiler-rt/builtins with MSVC.

r? @alexcrichton
2015-10-28 17:38:10 +00:00
bors
e64515b036 Auto merge of #29419 - brson:bump, r=alexcrichton 2015-10-28 15:50:52 +00:00
bors
a4fa0657f2 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
2015-10-28 13:16:14 +00:00
Andrew Paseltiner
c9c2434075 Add test for #29030
Closes #29030.
2015-10-28 08:52:32 -04:00
bors
7e3c8cf17c 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`
```
2015-10-28 11:26:48 +00:00
bors
18ff06ecc1 Auto merge of #29402 - sanxiyn:if-let, r=steveklabnik 2015-10-28 09:39:43 +00:00
bors
a455edfa71 Auto merge of #29400 - gkoz:phantom_data, r=alexcrichton
None
2015-10-28 07:49:04 +00:00
angelsl
b09e8f51a2 Build compiler-rt/builtins with MSVC 2015-10-28 15:23:20 +08:00
angelsl
6e61c6f119 Update compiler-rt 2015-10-28 15:23:20 +08:00