summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2015-08-11Fix breakage from previous cherry pickBrian Anderson-1/+0
2015-08-11Stabilize the Duration APISteven Fackler-4/+4
This commit stabilizes the `std::time` module and the `Duration` type. `Duration::span` remains unstable, and the `Display` implementation for `Duration` has been removed as it is still being reworked and all trait implementations for stable types are de facto stable. This is a [breaking-change] to those using `Duration`'s `Display` implementation. Conflicts: src/librustc/lib.rs src/libstd/time/duration.rs
2015-08-10Turn nonzeroing move hints back off by default.Felix S. Klock II-3/+3
This is a temporary workaround for the bugs that have been found in the implementation of PR #26173. * pnkfelix is unavailable in the short-term (i.e. for the next week) to fix them. * When the bugs are fixed, we will turn this back on by default. (If you want to play with the known-to-be-buggy optimization in the meantime, you can opt-back in via the debugging option that this commit is toggling.)
2015-08-03Auto merge of #26783 - eddyb:methrec, r=huonwbors-57/+23
After #26694, the overloaded operator and "impl not known at method lookup time" cases started triggering the lint. I've also added checks for overloaded autoderef and method calls via paths (i.e. `T::method()`). All new 8 test cases did not trigger the lint before #26694. r? @huonw
2015-08-04rustc: replace def::MethodProvenance with ty::ImplOrTraitItemContainer.Eduard Burtescu-57/+23
2015-07-30Implement Win64 eh_personality natively.Vadim Chugunov-0/+6
2015-07-30Rename the unstable option `--xpretty` to `--unpretty`Felix S. Klock II-2/+2
(Inspired by discussion with Gankro.)
2015-07-30Rollup merge of #27352 - nagisa:illegal-to-invalid-docs, r=steveklabnikManish Goregaokar-3/+3
r? @steveklabnik
2015-07-30Rollup merge of #26778 - jawline:master, r=pnkfelixManish Goregaokar-8/+8
Print the error message and then what is expected by the repeat count so the output makes more sense when there is an error in the const expression
2015-07-29Rollup merge of #27313 - nagisa:illegal-to-invalid, r=pnkfelixSteve Klabnik-2/+1
Improves diagnostics in various locations, namely: * A few error messages that orignally were a mix of an error message and suggestion how to fix it have been split up into two messages: an error and help/hint. * Never report “illegal”. Fixes https://github.com/rust-lang/rust/issues/27288
2015-07-29Modified to add 'found' to error message closes #26485Blake Loring-8/+8
2015-07-29Auto merge of #27260 - alexcrichton:cap-lints, r=nrcbors-1/+28
This commit is an implementation of [RFC 1193][rfc] which adds the ability to the compiler to cap the lint level for the entire compilation session. This flag will ensure that no lints will go above this level, and Cargo will primarily use this flag passing `--cap-lints allow` to all upstream dependencies. [rfc]: https://github.com/rust-lang/rfcs/pull/1193 Closes #27259
2015-07-28rustc: Add a --cap-lints flag to the compilerAlex Crichton-1/+28
This commit is an implementation of [RFC 1193][rfc] which adds the ability to the compiler to cap the lint level for the entire compilation session. This flag will ensure that no lints will go above this level, and Cargo will primarily use this flag passing `--cap-lints allow` to all upstream dependencies. [rfc]: https://github.com/rust-lang/rfcs/pull/1193 Closes #27259
2015-07-29Replace illegal with invalid in most diagnosticsSimonas Kazlauskas-2/+1
2015-07-28Auto merge of #27234 - oli-obk:move_get_name_get_ident_to_impl, r=eddybbors-94/+73
this has quite some fallout. but also made lots of stuff more readable imo [breaking-change] for plugin authors
2015-07-28remove `get_ident` and `get_name`, make `as_str` soundOliver Schneider-94/+73
2015-07-28Replace occurences of illegal in user facing docsSimonas Kazlauskas-3/+3
2015-07-28rustc and rustc::borrowck: pass fragment info down into trans.Felix S. Klock II-0/+39
2015-07-28debugflag to turn off nonzeroing move hint optimization.Felix S. Klock II-0/+5
(already thumbs-upped pre-rebase by nikomatsakis)
2015-07-28Auto merge of #26914 - alexcrichton:deprecate-easy, r=aturonbors-19/+17
Many of these have long since reached their stage of being obsolete, so this commit starts the removal process for all of them. The unstable features that were deprecated are: * box_heap * cmp_partial * fs_time * hash_default * int_slice * iter_min_max * iter_reset_fuse * iter_to_vec * map_in_place * move_from * owned_ascii_ext * page_size * read_and_zero * scan_state * slice_chars * slice_position_elem * subslice_offset
2015-07-27std: Deprecate a number of unstable featuresAlex Crichton-19/+17
Many of these have long since reached their stage of being obsolete, so this commit starts the removal process for all of them. The unstable features that were deprecated are: * cmp_partial * fs_time * hash_default * int_slice * iter_min_max * iter_reset_fuse * iter_to_vec * map_in_place * move_from * owned_ascii_ext * page_size * read_and_zero * scan_state * slice_chars * slice_position_elem * subslice_offset
2015-07-27Auto merge of #26876 - liigo:patch-3, r=Gankrobors-0/+3
2015-07-26Auto merge of #27297 - mitaa:cleanup_E0005, r=alexcrichtonbors-18/+19
This does two things: * removes ast::LocalSource, where only one variant was used because for-loop expansion has changed. One reason that this slipped into here is because the code in `check_local` which checks for `LocalSource::LocalFor` would report the same error as in `check_exhaustive` while using the wrong error code (E0005 instead of E0297). * silences the warning about already used diagnostic code E0005 (fixes #27279) passes `make check` locally.
2015-07-26Sidestep warning about repeated E0005 `span_err!` invocation.mitaa-12/+19
Fixes #27279
2015-07-26Remove `ast::LocalSource` with only one used variantmitaa-7/+1
`LocalSource` indicated wether a let binding originated from for-loop desugaring to enable specialized error messages, but for-loop expansion has changed and this is now achieved through `MatchSource::ForLoopDesugar`.
2015-07-25Address tidyJared Roesch-7/+11
2015-07-25Rework cross crate error messagesJared Roesch-12/+44
2015-07-25Fix error message spansJared Roesch-30/+35
2015-07-25Correctly subst defaults with the in-scope substsJared Roesch-20/+30
2015-07-25Rebase fixesJared Roesch-10/+10
2015-07-25Refactor the default type parameter algorithmJared Roesch-22/+62
The algorithm was not correctly detecting conflicts after moving defaults into TypeVariableValue. The updated algorithm correctly detects and reports conflicts with information about where the conflict occured and which items the defaults were introduced by. The span's for said items are not being correctly attached and still need to be patched.
2015-07-25Fix bug with defaults not being restoredJared Roesch-10/+13
2015-07-25Remove defaults table and attach defaults directly to tyvarsJared Roesch-26/+73
2015-07-25Fix tidyJared Roesch-3/+4
2015-07-25Implement Default TyParam fallbackJared Roesch-6/+92
This patch allows type parameter defaults to influence type inference. This is a possible breaking change since it effects the way type inference works and will have different behavior when mixing defaults and literal fallback.
2015-07-25Auto merge of #27258 - nikomatsakis:issue-26952, r=eddybbors-31/+47
Correct regression in type-inference caused by failing to reconfirm that the object trait matches the required trait during trait selection. The existing code was checking that the object trait WOULD match (in a probe), but never executing the match outside of a probe. This corrects various regressions observed in the wild, including issue #26952. Fixes #26952. r? @eddyb cc @frankmcsherry
2015-07-25Auto merge of #26630 - eefriedman:recursive-static, r=pnkfelixbors-3/+23
***Edit: Fixed now.*** I'm pretty sure the way I'm using LLVMReplaceAllUsesWith here is unsafe... but before I figure out how to fix that, I'd like a reality-check: is this actually useful?
2015-07-24Add static_recursion feature gate.Eli Friedman-4/+26
2015-07-24Allow recursive static variables.Eli Friedman-3/+1
There isn't any particularly good reason for this restriction, so just get rid of it, and fix trans to handle this case.
2015-07-25Auto merge of #26963 - Manishearth:improve-diag, r=steveklabnikbors-31/+712
I'll be adding more commits to this PR as the weekend progresses. Was hoping to make this a mega-PR, but getting some eyes on this early would be nice too. r? @steveklabnik r? @eddyb on the object safety bits cc @michaelsproul Part of #24407
2015-07-24Auto merge of #27265 - steveklabnik:rollup, r=steveklabnikbors-0/+3
- Successful merges: #27137, #27145, #27177, #27193, #27212, #27220, #27229, #27235, #27238, #27244, #27251 - Failed merges:
2015-07-24Rollup merge of #27244 - Detegr:master, r=eddybSteve Klabnik-0/+3
Hi all. This is my first contribution to Rust and fixes an issue causing an invalid error message to be presented to the user when using unit struct as length of a repeat expression, issue #27008. The solution is based on suggestions by @oli-obk, but as I'm a complete newbie to this, I have no clue if I got them right :) The biggest concern I have is that if the `NodeId` I'm returning is the correct one or not (it's not meaningful in this case but I think it would be nice to get it right).
2015-07-25Address commentsManish Goregaokar-20/+28
2015-07-25Add long diagnostic for E0276Manish Goregaokar-1/+22
2015-07-25Add long diagnostic explanation for E0275Manish Goregaokar-1/+23
2015-07-25Add long diagnostics for E0272-274 (on_unimplemented)Manish Goregaokar-4/+77
2015-07-25Add E0270Manish Goregaokar-17/+87
2015-07-24Auto merge of #27087 - nikomatsakis:closure-exploration, r=nrcbors-191/+324
Refactors the "desugaring" of closures to expose the types of the upvars. This is necessary to be faithful with how actual structs work. The reasoning of the particular desugaring that I chose is explained in a fairly detailed comment. As a side-effect, recursive closure types are prohibited unless a trait object intermediary is used. This fixes #25954 and also eliminates concerns about unrepresentable closure types that have infinite size, I believe. I don't believe this can cause regressions because of #25954. (As for motivation, besides #25954 etc, this work is also intended as refactoring in support of incremental compilation, since closures are one of the thornier cases encountered when attempting to split node-ids into item-ids and within-item-ids. The goal is to eliminate the "internal def-id" distinction in astdecoding. However, I have to do more work on trans to really make progress there.) r? @nrc
2015-07-24Correct regression in type-inference caused by failing to reconfirm thatNiko Matsakis-31/+47
the object trait matches the required trait during trait selection. The existing code was checking that the object trait WOULD match (in a probe), but never executing the match outside of a probe. This corrects various regressions observed in the wild, including issue #26952. Fixes #26952.
2015-07-24Auto merge of #27215 - pnkfelix:fsk-placer-take-5-just-in, r=nikomatsakisbors-10/+46
Macro desugaring of `in PLACE { BLOCK }` into "simpler" expressions following the in-development "Placer" protocol. Includes Placer API that one can override to integrate support for `in` into one's own type. (See [RFC 809].) [RFC 809]: https://github.com/rust-lang/rfcs/blob/master/text/0809-box-and-in-for-stdlib.md Part of #22181 Replaced PR #26180. Turns on the `in PLACE { BLOCK }` syntax, while leaving in support for the old `box (PLACE) EXPR` syntax (since we need to support that at least until we have a snapshot with support for `in PLACE { BLOCK }`. (Note that we are not 100% committed to the `in PLACE { BLOCK }` syntax. In particular I still want to play around with some other alternatives. Still, I want to get the fundamental framework for the protocol landed so we can play with implementing it for non `Box` types.) ---- Also, this PR leaves out support for desugaring-based `box EXPR`. We will hopefully land that in the future, but for the short term there are type-inference issues injected by that change that we want to resolve separately.