about summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2016-05-30Auto merge of #33909 - michaelwoerister:frame-pointer-fix, r=nikomatsakisbors-1/+6
Emit "no-frame-pointer-elim" attribute for closures, shims, and glue. This will hopefully let `perf` give better backtraces. r? @nikomatsakis
2016-05-30Rollup merge of #33914 - GuillaumeGomez:improve_err_expl, r=GuillaumeGomezManish Goregaokar-2/+56
Improve err expl r? @steveklabnik
2016-05-30Rollup merge of #33913 - GuillaumeGomez:improve_e0133, r=GuillaumeGomezManish Goregaokar-1/+13
Improve E0133 error explanation r? @steveklabnik
2016-05-30Rollup merge of #33793 - GuillaumeGomez:compile_fail, r=GuillaumeGomezManish Goregaokar-1/+3
Fix compile_fail tag Fixes #33780 r? @steveklabnik
2016-05-29Auto merge of #33929 - petrochenkov:pathir, r=eddybbors-221/+150
Separate bindings from other patterns in HIR Now when name resolution is done on AST, we can avoid dumping everything that looks like an identifier into `PatKind::Ident` in HIR. `hir::PatKind::Ident` is removed, fresh bindings are now called `hir::PatKind::Binding`, everything else goes to `hir::PatKind::Path`. I intend to do something with `PatKind::Path`/`PatKind::QPath` as well using resolution results, but it requires some audit and maybe some deeper refactoring of relevant resolution/type checking code to do it properly. I'm submitting this part of the patch earlier to notify interested parties that I'm working on this. cc @jseyfried r? @eddyb
2016-05-29Improve E0161 error explanationGuillaume Gomez-2/+1
2016-05-28Address review commentsVadim Petrochenkov-8/+5
2016-05-28Refactor away some functions from hir::pat_utilVadim Petrochenkov-160/+108
2016-05-28Rollup merge of #33854 - petrochenkov:prefvis, r=eddybManish Goregaokar-11/+4
Apply visit_path to import prefixes by default Overriding `visit_path` is not enough to visit all paths, some import prefixes are not visited and `visit_path_list_item` need to be overridden as well. This PR removes this catch, it should be less error prone this way. Also, the prefix is visited once now, not repeatedly for each path list item. r? @eddyb
2016-05-28Rollup merge of #33852 - arielb1:autoderef-iterator, r=eddybManish Goregaokar-49/+73
refactor autoderef to avoid prematurely registering obligations Refactor `FnCtxt::autoderef` to use an external iterator and to not register any obligation from the main autoderef loop, but rather to register them after (and if) the loop successfully completes. Fixes #24819 Fixes #25801 Fixes #27631 Fixes #31258 Fixes #31964 Fixes #32320 Fixes #33515 Fixes #33755 r? @eddyb
2016-05-28Rollup merge of #33822 - soltanmm:dot-vec-div-mag-square, r=nikomatsakisManish Goregaokar-12/+15
Propagate obligations through projection Up next: generating region obligations in inference. r? @nikomatsakis
2016-05-28Separate bindings from other patterns in HIRVadim Petrochenkov-69/+53
2016-05-27improve E0152 error explanationGuillaume Gomez-0/+11
2016-05-27Improve E0133 error explanationGuillaume Gomez-1/+13
2016-05-27Improve E0138 error explanationGuillaume Gomez-1/+24
2016-05-27Improve E0137 error explanatIonGuillaume Gomez-1/+22
2016-05-27Emit "no-frame-pointer-elim" attribute for closures, shims, and glue.Michael Woerister-1/+6
2016-05-27Rollup merge of #33644 - petrochenkov:selfast, r=nrcManish Goregaokar-19/+16
The AST part of https://github.com/rust-lang/rust/pull/33505. https://github.com/rust-lang/rust/pull/33505 isn't landed yet, so this PR is based on top of it. r? @nrc plugin-[breaking-change] cc #31645 @Manishearth
2016-05-27Rollup merge of #33639 - petrochenkov:dotdot, r=nmatsakisManish Goregaokar-51/+118
cc https://github.com/rust-lang/rust/issues/33627 r? @nikomatsakis plugin-[breaking-change] cc https://github.com/rust-lang/rust/issues/31645 @Manishearth
2016-05-27Rollup merge of #33351 - birkenfeld:loop-label-spans, r=pnkfelixManish Goregaokar-38/+44
This makes the \"shadowing labels\" warning *not* print the entire loop as a span, but only the lifetime. Also makes #31719 go away, but does not fix its root cause (the span of the expanded loop is still wonky, but not used anymore).
2016-05-27* Fix compile_fail tag (in some cases, it compiled whereas it wasn't ↵Guillaume Gomez-1/+3
expected to and was still considered 'ok') * Fix error explanations tests/tags
2016-05-26Auto merge of #33783 - michaelwoerister:collector-cleanup-2, r=nikomatsakisbors-0/+10
trans::collector: Remove some redundant calls to erase_regions(). r? @Aatch
2016-05-26Replace pat_adjust_pos with an iterator adapterVadim Petrochenkov-29/+36
2016-05-26Address review commentsVadim Petrochenkov-6/+6
2016-05-26Implement `..` in tuple (struct) patternsVadim Petrochenkov-51/+111
2016-05-25Auto merge of #33667 - pnkfelix:fixes-to-mir-dataflow, r=arielb1bors-4/+5
Fixes to mir dataflow Fixes to mir dataflow This collects a bunch of changes to `rustc_borrowck::borrowck::dataflow` (which others have pointed out should probably migrate to some crate that isn't tied to the borrow-checker -- but I have not attempted that here, especially since there are competing approaches to dataflow that we should also evaluate). These changes: 1. Provide a family of related analyses: MovingOutStatements (which is what the old AST-based dataflo computed), as well as MaybeInitialized, MaybeUninitalized, and DefinitelyInitialized. * (The last two are actually inverses of each other; we should pick one and drop the other.) 2. Fix bugs in the pre-existing analysis implementation, which was untested and thus some obvious bugs went unnoticed, which brings us to the third point: 3. Add a unit test infrastructure for the MIR dataflow analysis. * The tests work by adding a new intrinsic that is able to query the analysis state for a particular expression (technically, a particular L-value). * See the examples in compile-fail/mir-dataflow/inits-1.rs and compile-fail/mir-dataflow/uninits-1.rs * These tests are only checking the results for MaybeInitialized, MaybeUninitalized, and DefinitelyInitialized; I am not sure if it will be feasible to generalize this testing strategy to the MovingOutStatements dataflow operator.
2016-05-25Add a new AST-only type variant `ImplicitSelf`Vadim Petrochenkov-11/+12
2016-05-25Remove ExplicitSelf from ASTVadim Petrochenkov-10/+6
2016-05-25catch attempts to leak obligations out of snapshotsAriel Ben-Yehuda-47/+70
2016-05-25trans: save metadata even with -Z no-trans.Eduard Burtescu-1/+1
2016-05-25trans: remove item_symbols from metadata and CrateContext.Eduard Burtescu-6/+1
2016-05-25trans: move exported_symbol to Instance::symbol_name.Eduard Burtescu-0/+2
2016-05-25trans: force absolute item paths within symbols.Eduard Burtescu-3/+33
2016-05-25rustc: use a simpler scheme for plugin registrar symbol names.Eduard Burtescu-0/+10
2016-05-25refactor autoderef to avoid registering obligationsAriel Ben-Yehuda-2/+3
Refactor `FnCtxt::autoderef` to use an external iterator and to not register any obligation from the main autoderef loop, but rather to register them after (and if) the loop successfully completes. Fixes #24819 Fixes #25801 Fixes #27631 Fixes #31258 Fixes #31964 Fixes #32320 Fixes #33515 Fixes #33755
2016-05-24Apply visit_path to import prefixes by defaultVadim Petrochenkov-11/+4
2016-05-24syntax/hir: give loop labels a spanGeorg Brandl-38/+44
This makes the "shadowing labels" warning *not* print the entire loop as a span, but only the lifetime. Also makes #31719 go away, but does not fix its root cause (the span of the expanded loop is still wonky, but not used anymore).
2016-05-23trans::collector: Remove some redundant calls to erase_regions().Michael Woerister-0/+10
2016-05-22Propagate obligations through projectionMasood Malekghassemi-12/+15
2016-05-21Auto merge of #33752 - mrhota:internal_docs, r=steveklabnikbors-7/+35
Internal docs This PR is a rebase of #30621. That PR can be closed. CC @ticki @Aatch @cyplo
2016-05-21Improve internal documentation and code styleTicki-7/+35
Fix some code layout, remove some unnecessary returns, fix typos, punctuation, and comment consistency.
2016-05-20Rollup merge of #33683 - sanxiyn:paren-span, r=nikomatsakisGuillaume Gomez-1/+5
Preserve span when lowering ExprKind::Paren Fix #33681.
2016-05-20Auto merge of #33553 - alexcrichton:cdylibs, r=brsonbors-5/+10
rustc: Add a new crate type, cdylib This commit is an implementation of [RFC 1510] which adds a new crate type, `cdylib`, to the compiler. This new crate type differs from the existing `dylib` crate type in a few key ways: * No metadata is present in the final artifact * Symbol visibility rules are the same as executables, that is only reachable `extern` functions are visible symbols * LTO is allowed * All libraries are always linked statically This commit is relatively simple by just plubming the compiler with another crate type which takes different branches here and there. The only major change is an implementation of the `Linker::export_symbols` function on Unix which now actually does something. This helps restrict the public symbols from a cdylib on Unix. With this PR a "hello world" `cdylib` is 7.2K while the same `dylib` is 2.4MB, which is some nice size savings! [RFC 1510]: https://github.com/rust-lang/rfcs/pull/1510 Closes #33132
2016-05-19rustc: Add a new crate type, cdylibAlex Crichton-5/+10
This commit is an implementation of [RFC 1510] which adds a new crate type, `cdylib`, to the compiler. This new crate type differs from the existing `dylib` crate type in a few key ways: * No metadata is present in the final artifact * Symbol visibility rules are the same as executables, that is only reachable `extern` functions are visible symbols * LTO is allowed * All libraries are always linked statically This commit is relatively simple by just plubming the compiler with another crate type which takes different branches here and there. The only major change is an implementation of the `Linker::export_symbols` function on Unix which now actually does something. This helps restrict the public symbols from a cdylib on Unix. With this PR a "hello world" `cdylib` is 7.2K while the same `dylib` is 2.4MB, which is some nice size savings! [RFC 1510]: https://github.com/rust-lang/rfcs/pull/1510 Closes #33132
2016-05-19Auto merge of #33694 - arielb1:fuzzy-on-unimplemented, r=nikomatsakisbors-26/+72
implement fuzzy matching in on_unimplemented Fixes #31062 r? @nikomatsakis
2016-05-18Auto merge of #33688 - jonathandturner:fix_old_school, r=nikomatsakisbors-2/+2
Fix for old school error issues, improvements to new school This PR: * Fixes some old school error issues, specifically #33559, #33543, #33366 * Improves wording borrowck errors with match patterns * De-emphasize multi-line spans, so we don't color the single source character when we're trying to say "span starts here" * Rollup of #33392 (which should help fix #33390) r? @nikomatsakis
2016-05-18implement fuzzy matching in on_unimplementedAriel Ben-Yehuda-26/+72
2016-05-18Auto merge of #33476 - nikomatsakis:incr-comp-xcrate, r=mwbors-128/+232
track incr. comp. dependencies across crates This PR refactors the compiler's incremental compilation hashing so that it can track dependencies across crates. The main bits are: - computing a hash representing the metadata for an item we are emitting - we do this by making `MetaData(X)` be the current task while computing metadata for an item - this naturally registers reads from any tables and things that we read for that purpose - we can then hash all the inputs to those tables - tracking when we access metadata - we do this by registering a read of `MetaData(X)` for each foreign item `X` whose metadata we read - hashing metadata from foreign items - we do this by loading up metadata from a file in the incr. comp. directory - if there is no file, we use the SVH for the entire crate There is one very simple test only at this point. The next PR will be focused on expanding out the tests. Note that this is based on top of https://github.com/rust-lang/rust/pull/33228 r? @michaelwoerister
2016-05-19Be smart about span of parenthesized expression in macroSeo Sanghyeon-1/+4
2016-05-18add task for linkingNiko Matsakis-0/+2
In MSVC (at least), linking requires accessing metadata, which generates reads.