Commit Graph

47731 Commits

Author SHA1 Message Date
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
Eli Friedman
e7d3ae606e Make quote plugin use parsing functions which explicitly panic.
Rename parse_* to parse_*_panic, and add parse_attribute_panic.
2015-10-28 14:11:31 -07: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
bors
88fade54e1 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
```
2015-10-28 06:00:19 +00:00
Eli Friedman
56ba8feed6 Update libsyntax tests. 2015-10-27 20:09:10 -07:00
Eli Friedman
e5024924ad Make fatal errors more consistent. 2015-10-27 20:09:10 -07:00
Eli Friedman
329e487e58 Start pushing panics outward in lexer. 2015-10-27 20:09:10 -07:00
Eli Friedman
de95857129 Don't panic for fatal errors in attribute parsing. 2015-10-27 20:09:10 -07:00
Eli Friedman
c141f47c24 Delete unnecessary ParserAttr trait. 2015-10-27 20:09:10 -07:00
Eli Friedman
1dd87dcfea Don't use panicking helpers in Parser. 2015-10-27 20:09:10 -07:00
bors
8974297b4a Auto merge of #29313 - arielb1:projection-overflow, r=eddyb
This turns the crashes into overflow errors.

r? @eddyb
2015-10-28 03:07:28 +00:00
bors
f7172490f8 Auto merge of #29311 - steveklabnik:doc_iterator_trait, r=alexcrichton
This cleans up descriptions, adds more examples, and increases
consistency between similar methods.
2015-10-28 01:17:12 +00:00
Brian Anderson
002b3b32fe Bump version to 1.6 2015-10-27 17:47:43 -07:00
Vadim Petrochenkov
243a524d06 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
2015-10-28 03:38:22 +03:00
Marcell Pardavi
ad8dcb64bf 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
2015-10-28 00:56:27 +01:00
bors
e0e2627374 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.
2015-10-27 22:56:39 +00:00
Niko Matsakis
d0a84e0500 Add some debug printouts to librustc_privacy 2015-10-27 18:30:46 -04:00
Simonas Kazlauskas
99f9bb16ab Adjust src/grammar for the introduced <- op 2015-10-27 23:06:37 +02:00
bors
8a72584f97 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.
2015-10-27 21:04:59 +00:00
Ariel Ben-Yehuda
7f772bb84e 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
2015-10-27 23:02:23 +02:00
Simonas Kazlauskas
c1a238c4f5 Add tests for newly introduced syntax
Also add some (regression) tests for discovered parser oddities
2015-10-27 21:55:10 +02:00
Simonas Kazlauskas
662082cb7e Update unused_parens lint for placement-in arrow 2015-10-27 21:55:10 +02:00
Simonas Kazlauskas
972c1c6a5f Fix restrictions when parsing rhs of equalities 2015-10-27 21:55:10 +02:00
Simonas Kazlauskas
58c299f81d Fix prefix range expressions being not parsed 2015-10-27 21:55:04 +02:00
Simonas Kazlauskas
884b58913a Add a test for #29071
Fixes #29071
2015-10-27 21:55:04 +02:00
Simonas Kazlauskas
471f5a1f9a 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.
2015-10-27 21:55:04 +02:00
bors
a1e2a5538a Auto merge of #26421 - nham:fix_21546, r=pnkfelix
Fixes #21546.
2015-10-27 19:15:29 +00:00
Vadim Petrochenkov
8cef018d52 Comments and formatting 2015-10-27 21:56:48 +03:00
Marcell Pardavi
b6f5e7238a Small fix in the book
Fixes #29401.

r? @steveklabnik
2015-10-27 19:02:47 +01:00