about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2016-03-31librustc: replace unimplemented!() with bug!()Benjamin Herr-69/+71
2016-03-31librustc: replace unreachable! with bug!()Benjamin Herr-21/+21
2016-03-31librustc: replace span_bug calls with span_bug!()Benjamin Herr-176/+162
2016-03-31librustc: replace tcx.sess.bug calls with bug!()Benjamin Herr-132/+95
2016-03-31librustc: add {span_,}bug! macrosBenjamin Herr-0/+49
... 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-31Auto merge of #31938 - jseyfried:autoderef_privacy, r=nikomatsakisbors-518/+236
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-30Auto merge of #32439 - jseyfried:visible_suggestions, r=nrcbors-291/+396
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-31Rollup merge of #32618 - ProgVal:patch-1, r=steveklabnikManish Goregaokar-1/+1
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-31Rollup merge of #32612 - frewsxcv:unnecessary-coercions, r=alexcrichtonManish Goregaokar-12/+0
Remove no longer necessary coercions to fn pointer types. Originally added in 8fe9e4dff6d9d0fdd940835ae377edcb3754f8c1. Everything appears to build fine without the coercions, so they can presumably be removed.
2016-03-31Rollup merge of #32494 - pnkfelix:gate-parser-recovery-via-debugflag, r=nrcManish Goregaokar-11/+50
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-31Rollup merge of #32259 - oli-obk:move_const_eval, r=alexcrichtonManish Goregaokar-775/+908
move `const_eval` and `check_match` out of `librustc` into their own crate r? @arielb1
2016-03-30Fix fallout in testsJeffrey Seyfried-285/+285
2016-03-30Add method `visible_item_path` to `CStore`Jeffrey Seyfried-6/+111
2016-03-30Improve testsJeffrey Seyfried-15/+30
2016-03-30privacy: Cleanup check_fieldVadim Petrochenkov-55/+26
2016-03-30Clean up the privacy visitorJeffrey Seyfried-414/+25
2016-03-30Add tests for #12808 and #22684Jeffrey Seyfried-0/+77
2016-03-30Fix fallout in testsJeffrey Seyfried-4/+3
2016-03-30Autoderef privacy for methodsJeffrey Seyfried-14/+46
2016-03-30Autoderef privacy for fieldsJeffrey Seyfried-35/+48
2016-03-30fix compile-fail and parse-fail tests by blindly opting back intoFelix S. Klock II-11/+31
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-30Put in `-Z continue-parse-after-error`Felix S. Klock II-0/+19
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-30Book: Fix phrasing: “an associated type” → “a trait with an ↵Valentin Lorentz-1/+1
associated type”.
2016-03-30Rollup merge of #32608 - tshepang:grammar, r=aturonSteve Klabnik-8/+8
doc: "of the" seems more correct than "to the" It's also less ambiguous
2016-03-30Rollup merge of #32607 - tshepang:we-gots-intoiterator, r=apasel422Steve Klabnik-1/+1
doc: no need for an explicit iter()
2016-03-30Rollup merge of #32605 - tshepang:not-needed, r=ManishearthSteve Klabnik-2/+2
doc: "mut" not needed for the examples
2016-03-30Rollup merge of #32603 - tshepang:capitalise, r=blussSteve Klabnik-1/+1
doc: first letter should be upper case
2016-03-30Rollup merge of #32591 - CryZe:patch-1, r=steveklabnikSteve Klabnik-2/+2
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-30Rollup merge of #32580 - durka:patch-17, r=steveklabnikSteve Klabnik-10/+10
verb agreement in core::convert docs
2016-03-30Remove no longer necessary coercions to fn pointer types.Corey Farwell-12/+0
Originally added in 8fe9e4dff6d9d0fdd940835ae377edcb3754f8c1. Everything appears to build fine without the coercions, so they can presumably be removed.
2016-03-30move `const_eval` and `check_match` out of `librustc`Oliver Schneider-744/+877
2016-03-30doc: no need for an explicit iter()Tshepang Lekhonkhobe-1/+1
2016-03-30rename `rustc_const_eval` to `rustc_const_math`Oliver Schneider-29/+29
2016-03-30Auto merge of #32581 - GuillaumeGomez:patch-3, r=steveklabnikbors-0/+85
Add doc examples on pointer types r? @steveklabnik Fixes #29336
2016-03-30doc: "of the" seems more correct than "to the"Tshepang Lekhonkhobe-8/+8
It's also less ambiguous
2016-03-29Auto merge of #32571 - eddyb:llvm-back-to-back, r=alexcrichtonbors-39/+16
Weed out dependencies on librustc_llvm and librustc. Found while working on #32570. cc @nikomatsakis
2016-03-29Fix panic_fmt in the BookChristopher Serr-2/+2
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-29Auto merge of #32557 - dotdash:issue-32518, r=nikomatsakisbors-17/+152
Use weak_odr linkage when reusing definitions across codegen units When reuing a definition across codegen units, we obviously cannot use internal linkage, but using external linkage means that we can end up with multiple conflicting definitions of a single symbol across multiple crates. Since the definitions should all be equal semantically, we can use weak_odr linkage to resolve the situation. Fixes #32518 r? @nikomatsakis
2016-03-29doc: "mut" not needed for the examplesTshepang Lekhonkhobe-3/+3
2016-03-29rustc_platform_intrinsics: remove unused rustc dependency.Eduard Burtescu-22/+11
2016-03-29Remove unnecessary dependencies on rustc_llvm.Eduard Burtescu-17/+5
2016-03-29verb agreement in core::convert docsAlex Burka-10/+10
2016-03-29Auto merge of #32567 - soltanmm:clean-up, r=nikomatsakisbors-72/+56
Refactor s.t. TypeRelation implementors in `infer` don't escape InferCtxt Some clean-up so that we can go back to the future of #31867 as opposed to #32542. r? @nikomatsakis
2016-03-29Use weak_odr linkage when reusing definitions across codegen unitsBjörn Steinbrink-17/+152
When reuing a definition across codegen units, we obviously cannot use internal linkage, but using external linkage means that we can end up with multiple conflicting definitions of a single symbol across multiple crates. Since the definitions should all be equal semantically, we can use weak_odr linkage to resolve the situation. Fixes #32518
2016-03-29Auto merge of #32564 - frewsxcv:patch-27, r=alexcrichtonbors-1/+1
Prefer HTTPS when linking to 131002.net.
2016-03-29Auto merge of #32541 - troplin:chain-bufread, r=alexcrichtonbors-0/+54
Implement BufRead for Chain Addresses #32536
2016-03-28Auto merge of #32438 - kamalmarhubi:intoiterator-example, r=steveklabnikbors-43/+43
style: Use `iter` for IntoIterator parameter names This commit standardizes the codebase on `iter` for parameters with IntoIterator bounds. Previously about 40% of IntoIterator parameters were named `iterable`, with most of the rest being named `iter`. There was a single place where it was named `iterator`.
2016-03-28Refactor s.t. TypeRelation implementors don't escape InferCtxtMasood Malekghassemi-45/+56
2016-03-28Remove some dead codeMasood Malekghassemi-27/+0
2016-03-28Auto merge of #32479 - eddyb:eof-not-even-twice, r=nikomatsakisbors-14/+49
Prevent bumping the parser past the EOF. Makes `Parser::bump` after EOF into an ICE, forcing callers to avoid repeated EOF bumps. This ICE is intended to break infinite loops where EOF wasn't stopping the loop. For example, the handling of EOF in `parse_trait_items`' recovery loop fixes #32446. But even without this specific fix, the ICE is triggered, which helps diagnosis and UX. This is a `[breaking-change]` for plugins authors who eagerly eat multiple EOFs. See https://github.com/docopt/docopt.rs/pull/171 for such an example and the necessary fix.