Commit Graph

52008 Commits

Author SHA1 Message Date
Benjamin Herr
dfd0e937ac librustc: replace unreachable! with bug!() 2016-03-31 22:04:23 +02:00
Benjamin Herr
bcdaccfbbe librustc: replace span_bug calls with span_bug!() 2016-03-31 22:04:23 +02:00
Benjamin Herr
859b5a141c librustc: replace tcx.sess.bug calls with bug!() 2016-03-31 22:04:23 +02:00
Benjamin Herr
fc7ec6b614 librustc: add {span_,}bug! macros
... as single "internal compiler error" entry point.

The macros pass `file!()`, `line!()` and `format_args!(...)` on to a
cold, never-inlined function, ultimately calling `bug()` or `span_bug()`
on the `Handler` from `session::diagnostic()` via the tcx in tls or,
failing that, panicking directly.
2016-03-31 22:04:23 +02:00
Tobias Bucher
0872cc37bc Remove incorrect comment about PartialEq implementation 2016-03-31 21:19:17 +02:00
Tobias Bucher
28e45bb96a Fix a typo in the doc comment of std::os::unix:🧵:JoinHandleExt 2016-03-31 19:28:06 +02:00
bors
3399d19a2c Auto merge of #31938 - jseyfried:autoderef_privacy, r=nikomatsakis
Integrate privacy into field and method selection

This PR integrates privacy checking into field and method selection so that an inaccessible field/method can not stop an accessible field/method from being used (fixes #12808 and fixes #22684).
r? @eddyb
2016-03-31 09:09:34 -07:00
Валерий Лашманов
33db2d65ff added missing refcell ref/refmut coercions to unsized 2016-03-31 10:11:59 -04:00
Amanieu d'Antras
9a28d4edc9 Change Arc to use compare_exchange instead of compare_and_swap 2016-03-31 13:15:20 +01:00
Amanieu d'Antras
e72c8fb754 Fix formatting in the documentation for AtomicIsize::compare_exchange_weak 2016-03-31 13:14:25 +01:00
Tobias Bucher
10caca24f0 Improve E0277 error message in a generic context
This now mentions that you can restrict type parameters to be able to
call functions of traits.
2016-03-31 11:15:36 +02:00
David AO Lozano
9094935b46 Using only one Mibbit link for access the two channels 2016-03-31 02:49:15 -06:00
David AO Lozano
c233f2ee29 Adding #rust-beginners to README and pointing the two channels on getting-started 2016-03-31 02:49:05 -06:00
David AO Lozano
90d7440f54 Misspelled beginners in one place 2016-03-31 02:48:50 -06:00
David AO Lozano
823f239ae5 Book: in beginner guide change irc channel #rust → #rust-beginners 2016-03-31 02:47:46 -06:00
Vadim Petrochenkov
1cbdf4e7d3 syntax: Extra diagnostics for _ used in an identifier position 2016-03-31 10:15:36 +03:00
Jeffrey Seyfried
5428e6e273 Remove accidental println! 2016-03-31 06:23:45 +00:00
bors
4583dc9b13 Auto merge of #32439 - jseyfried:visible_suggestions, r=nrc
diagnostics: make paths to external items more visible

This PR changes the reported path for an external item so that it is visible from at least one local module (i.e. it does not use any inaccessible external modules) if possible. If the external item's crate was declared with an `extern crate`, the path is guarenteed to use the `extern crate`.

Fixes #23224, fixes #23355, fixes #26635, fixes #27165.

r? @nrc
2016-03-30 21:13:43 -07:00
Jonathan S
589108baf6 Test that HashMap, HashSet, and their iterators are properly covariant 2016-03-30 22:02:36 -05:00
Jonathan S
1639f2d289 Fix the variances of HashMap and HashSet iterators 2016-03-30 22:02:36 -05:00
Jonathan S
285a40a906 Make HashMap's RawBucket covariant 2016-03-30 22:01:31 -05:00
Alan Somers
0b0af5847f Register new FreeBSD snapshot
Actual file is at https://people.freebsd.org/~asomers/rust/rust-stage0-2016-03-18-235d774-freebsd-x86_64-390b9a9f60f3d0d6a52c04d939a0355f572d03b3.tar.bz2
2016-03-31 02:47:33 +00:00
James Miller
63321ca193 Turn break critical edges into a MIR pass
Also adds a new set of passes to run just before translation that
"prepare" the MIR for codegen. Removal of landing pads, region erasure
and break critical edges are run in this pass.

Also fixes some merge/rebase errors.
2016-03-31 15:13:24 +13:00
Matt Brubeck
d93fb02a5e Update Rust version in the Rustonomicon Vec chapter
I verified that the final code compiles in Rust 1.9.0-nightly.
2016-03-30 16:59:38 -07:00
bors
30a3849f22 Auto merge of #32628 - Manishearth:rollup, r=Manishearth
Rollup of 4 pull requests

- Successful merges: #32259, #32494, #32612, #32618
- Failed merges: #32562
2016-03-30 16:41:08 -07:00
Manish Goregaokar
458fae709c Rollup merge of #32618 - ProgVal:patch-1, r=steveklabnik
Book: Fix phrasing: “an associated type” → “an object with an associated type”.

From what I understood, `graph` is the object from which we create a trait object, and the associated types are `Graph::N` and `Graph::E`.
2016-03-31 05:04:59 +05:30
Manish Goregaokar
cb5af8901a Rollup merge of #32612 - frewsxcv:unnecessary-coercions, r=alexcrichton
Remove no longer necessary coercions to fn pointer types.

Originally added in 8fe9e4dff6.

Everything appears to build fine without the coercions, so they can
presumably be removed.
2016-03-31 05:04:59 +05:30
Manish Goregaokar
74546e8ab7 Rollup merge of #32494 - pnkfelix:gate-parser-recovery-via-debugflag, r=nrc
Gate parser recovery via debugflag

Gate parser recovery via debugflag

Put in `-Z continue_parse_after_error`

This works by adding a method, `fn abort_if_no_parse_recovery`, to the
diagnostic handler in `syntax::errors`, and calling it after each
error is emitted in the parser.

(We might consider adding a debugflag to do such aborts in other
places where we are currently attempting recovery, such as resolve,
but I think the parser is the really important case to handle in the
face of #31994 and the parser bugs of varying degrees that were
injected by parse error recovery.)

r? @nikomatsakis
2016-03-31 05:04:59 +05:30
Manish Goregaokar
9957081e78 Rollup merge of #32259 - oli-obk:move_const_eval, r=alexcrichton
move `const_eval` and `check_match` out of `librustc` into their own crate

r? @arielb1
2016-03-31 05:04:59 +05:30
Jeffrey Seyfried
da41e583d6 Fix fallout in tests 2016-03-30 22:00:48 +00:00
Jeffrey Seyfried
0c6f067961 Add method visible_item_path to CStore 2016-03-30 22:00:46 +00:00
Jeffrey Seyfried
48c20b0e73 Improve tests 2016-03-30 21:26:35 +00:00
Vadim Petrochenkov
38bef43652 privacy: Cleanup check_field 2016-03-30 21:26:35 +00:00
Jeffrey Seyfried
48b048deb7 Clean up the privacy visitor 2016-03-30 21:26:35 +00:00
Jeffrey Seyfried
8762fc31db Add tests for #12808 and #22684 2016-03-30 21:26:35 +00:00
Jeffrey Seyfried
09af5036da Fix fallout in tests 2016-03-30 21:26:35 +00:00
Jeffrey Seyfried
6f16c5c81f Autoderef privacy for methods 2016-03-30 21:26:35 +00:00
Jeffrey Seyfried
62d181f474 Autoderef privacy for fields 2016-03-30 21:26:32 +00:00
Felix S. Klock II
e1d8ad3fb0 fix compile-fail and parse-fail tests by blindly opting back into
parser recovery (so that expected errors match up)

I'm opting into parser recovery in all these cases out of expediency,
not because the error messages you get with recovery enabled are
actually all that usable in all cases listed.
2016-03-30 22:23:54 +02:00
Felix S. Klock II
2646663b5a Put in -Z continue-parse-after-error
This works by adding a boolean flag, `continue_after_error`, to
`syntax::errors::Handler` that can be imperatively set to `true` or
`false` via a new `fn set_continue_after_error`.

The flag starts off true (since we generally try to recover from
compiler errors, and `Handler` is shared across all phases).

Then, during the `phase_1_parse_input`, we consult the setting of the
`-Z continue-parse-after-error` debug flag to determine whether we
should leave the flag set to `true` or should change it to `false`.

----

(We might consider adding a debugflag to do such aborts in other
places where we are currently attempting recovery, such as resolve,
but I think the parser is the really important case to handle in the
face of #31994 and the parser bugs of varying degrees that were
injected by parse error recovery.)
2016-03-30 22:23:48 +02:00
bors
bfacabc6a2 Auto merge of #32621 - steveklabnik:rollup, r=steveklabnik
Rollup of 7 pull requests

- Successful merges: #32580, #32591, #32603, #32605, #32606, #32607, #32608
- Failed merges:
2016-03-30 11:33:31 -07:00
Sean McArthur
fc8cf9c5af specialize ToString for str 2016-03-30 10:40:06 -07:00
Valentin Lorentz
b1b37384cd Book: Fix phrasing: “an associated type” → “a trait with an associated type”. 2016-03-30 19:34:53 +02:00
Steve Klabnik
2ba860677c Rollup merge of #32608 - tshepang:grammar, r=aturon
doc: "of the" seems more correct than "to the"

It's also less ambiguous
2016-03-30 10:16:55 -07:00
Steve Klabnik
709be98804 Rollup merge of #32607 - tshepang:we-gots-intoiterator, r=apasel422
doc: no need for an explicit iter()
2016-03-30 10:16:55 -07:00
Steve Klabnik
1978a9951b Rollup merge of #32606 - tshepang:typo, r=bluss
doc: fix typo
2016-03-30 10:16:55 -07:00
Steve Klabnik
45d633db26 Rollup merge of #32605 - tshepang:not-needed, r=Manishearth
doc: "mut" not needed for the examples
2016-03-30 10:16:54 -07:00
Steve Klabnik
662e7af0f9 Rollup merge of #32603 - tshepang:capitalise, r=bluss
doc: first letter should be upper case
2016-03-30 10:16:54 -07:00
Steve Klabnik
6f885c3c15 Rollup merge of #32591 - CryZe:patch-1, r=steveklabnik
Fix panic_fmt in the Book

While implementing panic_fmt for the GameCube I noticed that the parameters given to it were completely broken. Turns out that panic_fmt requires the C ABI to work correctly. This should be fixed in the documentation, so that others don't make the same mistake. Thanks to mbrubeck in the IRC for helping me figure this out.

Not specifying extern for lang_items correctly should potentially also be a compiler error.
2016-03-30 10:16:54 -07:00
Steve Klabnik
9f403abba2 Rollup merge of #32580 - durka:patch-17, r=steveklabnik
verb agreement in core::convert docs
2016-03-30 10:16:54 -07:00