summary refs log tree commit diff
path: root/src/librustc_driver
AgeCommit message (Collapse)AuthorLines
2018-01-10Try to fix a perf regression by updating logMalo Jaffré-3/+3
Upgrade `log` to `0.4` in multiple crates.
2017-12-28Prefer to use attr::contains_name() and attr::find_by_name()Seiichi Uchida-1/+1
2017-12-22Auto merge of #46779 - Zoxc:par-merge-without-sync, r=arielb1bors-38/+12
Work towards thread safety in rustc This PR is split out from https://github.com/rust-lang/rust/pull/45912. It contains changes which do not require the `sync` module.
2017-12-22Auto merge of #46732 - estebank:silence-recovered-blocks, r=petrochenkovbors-2/+4
Do not emit type errors on recovered blocks When a parse error occurs on a block, the parser will recover and create a block with the statements collected until that point. Now a flag stating that a recovery has been performed in this block is propagated so that the type checker knows that the type of the block (which will be identified as `()`) shouldn't be checked against the expectation to reduce the amount of irrelevant diagnostic errors shown to the user. Fix #44579.
2017-12-21Do not emit type errors on recovered blocksEsteban Küber-2/+4
When a parse error occurs on a block, the parser will recover and create a block with the statements collected until that point. Now a flag stating that a recovery has been performed in this block is propagated so that the type checker knows that the type of the block (which will be identified as `()`) shouldn't be checked against the expectation to reduce the amount of irrelevant diagnostic errors shown to the user.
2017-12-22Rollup merge of #46814 - varkor:contrib-7, r=alexcrichtonkennytm-1/+17
Prevent rustc overwriting input files If rustc is invoked on a file that would be overwritten by the compilation, the compilation now fails, to avoid accidental loss. This resolves #13019. Kudos to @estebank, whose patch I finished off.
2017-12-21Remove useless RcJohn Kåre Alsaker-2/+2
2017-12-21Combine GlobalArenas and DroplessArena into AllArenasJohn Kåre Alsaker-36/+10
2017-12-19Move source-output conflict checking into `compile_input`varkor-14/+16
2017-12-18Prevent rustc overwriting input filesvarkor-1/+15
If rustc is invoked on a file that would be overwritten by the compilation, the compilation now fails, to avoid accidental loss. This resolves #13019.
2017-12-17Add sync module to rustc_data_structuresJohn Kåre Alsaker-1/+0
2017-12-16Auto merge of #46560 - Yoric:incr, r=michaelwoeristerbors-7/+15
Loading the dependency graph in the background Patch is a bit longer than I expected, due to the fact that most of this code relies upon a `Session` value, which is not `Sync`.
2017-12-15Resolves #46555 - Moving loading and decoding of dependency graph to ↵David Teller-7/+15
background thread
2017-12-15Rollup merge of #46705 - pornel:cargo-output, r=alexcrichtonSteve Klabnik-3/+2
Help Cargo tolerate RUSTFLAGS="--print=native-static-libs" Alternative to https://github.com/rust-lang/cargo/pull/4807 Having this "error" message was a mistake, as it's firing at exactly wrong time when Cargo is trying to read the output of other print commands.
2017-12-15Auto merge of #46537 - pnkfelix:two-phase-borrows, r=arielb1bors-4/+8
[MIR-borrowck] Two phase borrows This adds limited support for two-phase borrows as described in http://smallcultfollowing.com/babysteps/blog/2017/03/01/nested-method-calls-via-two-phase-borrowing/ The support is off by default; you opt into it via the flag `-Z two-phase-borrows` I have written "*limited* support" above because there are simple variants of the simple `v.push(v.len())` example that one would think should work but currently do not, such as the one documented in the test compile-fail/borrowck/two-phase-reservation-sharing-interference-2.rs (To be clear, that test is not describing something that is unsound. It is just providing an explicit example of a limitation in the implementation given in this PR. I have ideas on how to fix, but I want to land the work that is in this PR first, so that I can stop repeatedly rebasing this branch.)
2017-12-14trait alias falloutAlex Burka-0/+1
2017-12-14Use PathBuf instead of String where applicableOliver Schneider-24/+21
2017-12-13Expanded HIR `--unpretty hir,identified` to include HIR local id.Felix S. Klock II-4/+8
Having the HIR local id is useful for cases like understanding the ReScope identifiers, which are now derived from the HIR local id, and thus one can map an ReScope back to the HIR node, once one knows what those local ids are.
2017-12-13Remove message that prevents Cargo from working with --print=native-static-libsKornel-3/+2
2017-12-11move `resolve_lifetimes` into a proper queryNiko Matsakis-9/+2
Now that we made `resolve_lifetimes` into a query, elision errors no longer abort compilation, which affects some tests. Also, remove `dep_graph_crosscontaminate_tables` -- there is no a path in the dep-graph, though red-green handles it. The same scenario is (correctly) tested by issue-42602.rs in any case.
2017-12-07mir-borrowck returns closure requirements, mir-typeck enforcesNiko Matsakis-1/+1
2017-12-06Rollup merge of #46136 - tbu-:pr_werror, r=nikomatsakisCorey Farwell-1/+1
Clarify what `-D warnings` or `-F warnings` does They set all lints currently on the warning level to `deny` or `forbid`, respectively.
2017-12-04make `resolve_regions_and_report_errors` take an `OutlivesEnv`Niko Matsakis-4/+5
This revealed some shortcomings, one of which is fixed. Fixes #45937.
2017-12-01Changed the wording for the `warnings` lintTobias Bucher-1/+1
2017-11-25rustbuild: Enable WebAssembly backend by defaultAlex Crichton-15/+28
This commit alters how we compile LLVM by default enabling the WebAssembly backend. This then also adds the wasm32-unknown-unknown target to get compiled on the `cross` builder and distributed through rustup. Tests are not yet enabled for this target but that should hopefully be coming soon!
2017-11-23Auto merge of #45721 - nikomatsakis:hir-tree, r=arielb1bors-0/+42
add -Zunpretty=hir-tree This uses the debug impls to dump the raw HIR. Particularly useful when learning how the compiler works. cc @qmx
2017-11-20Clarify what `-D warnings` or `-F warnings` doesTobias Bucher-1/+1
They set all lints currently on the warning level to `deny` or `forbid`, respectively.
2017-11-17strip old lub-glb tests from `librustc_driver`Niko Matsakis-212/+0
Good riddance.
2017-11-15Auto merge of #45944 - eddyb:provide, r=nikomatsakisbors-26/+47
rustc_driver: expose a way to override query providers in CompileController. This API has been a long-time coming and will probably become the main method for custom drivers (that is, binaries other than `rustc` itself that use `librustc_driver`) to adapt the compiler's behavior.
2017-11-14rustc: move the MIR pass infrastructure and list to rustc_mir.Eduard-Mihai Burtescu-54/+0
2017-11-12rustc_driver: expose a way to override query providers in CompileController.Eduard-Mihai Burtescu-20/+45
2017-11-12rustc_driver: base extern query providers on local ones.Eduard-Mihai Burtescu-8/+4
2017-11-07Auto merge of #45666 - Amanieu:tls-model, r=alexcrichtonbors-0/+8
Allow overriding the TLS model This PR adds the ability to override the default "global-dynamic" TLS model with a more specific one through a target json option or a command-line option. This allows for better code generation in certain situations. This is similar to the `-ftls-model=` option in GCC and Clang.
2017-11-03[Syntax Breaking] Rename DefaultImpl to AutoImplleonardo.yvens-1/+1
DefaultImpl is a highly confusing name for what we now call auto impls, as in `impl Send for ..`. The name auto impl is not formally decided but for sanity anything is better than `DefaultImpl` which refers neither to `default impl` nor to `impl Default`.
2017-11-03Add support for specifying the TLS modelAmanieu d'Antras-0/+8
2017-11-02add -Zunpretty=hir-treeNiko Matsakis-0/+42
This uses the debug impls to dump the raw HIR. Particularly useful when learning how the compiler works.
2017-11-01Auto merge of #45538 - nikomatsakis:nll-liveness, r=pnkfelixbors-1/+0
enable non-lexical lifetimes in the MIR borrow checker This PR, joint work with @spastorino, fills out the NLL infrastructure and integrates it with the borrow checker. **Don't get too excited:** it includes still a number of hacks (the subtyping code is particularly hacky). However, it *does* kinda' work. =) The final commit demonstrates this by including a test that -- with both the AST borrowck and MIR borrowck -- reports an error by default. But if you pass `-Znll`, you only get an error from the AST borrowck, demonstrating that the integration succeeds: ``` struct MyStruct { field: String } fn main() { let mut my_struct = MyStruct { field: format!("Hello") }; let value = &my_struct.field; if value.is_empty() { my_struct.field.push_str("Hello, world!"); //~^ ERROR cannot borrow (Ast) } } ```
2017-11-01Auto merge of #45472 - michaelwoerister:incr-comp-caching-base, r=nikomatsakisbors-0/+7
incr.comp.: Implement compiler diagnostic persistence. This PR implements storing and loading diagnostics that the compiler generates and thus allows for emitting warnings during incremental compilation without actually re-evaluating the thing the warning originally came from. It also lays some groundwork for storing and loading type information and MIR in the incr. comp. cache. ~~It is still work in progress:~~ - ~~There's still some documentation to be added.~~ - ~~The way anonymous queries are handled might lead to duplicated emissions of warnings. Not sure if there is a better way or how frequent such duplication would be in practice.~~ Diagnostic message duplication is addressed separately in #45519. r? @nikomatsakis
2017-10-31remove the NLL pass (it is now invoked by mir borrowck)Niko Matsakis-1/+0
2017-10-25Auto merge of #44636 - GuillaumeGomez:little-error-msg, r=michaelwoeristerbors-2/+6
Add short error message-format Fixes #42653.
2017-10-25Fix librustc_driver unit test after API change.Michael Woerister-0/+2
2017-10-25incr.comp.: Implement query diagnostic persistence.Michael Woerister-0/+5
2017-10-24Introduce CrateDisambiguator newtype and fix testsIgor Matuszewski-4/+4
2017-10-23Use 128 bit instead of Symbol for crate disambiguatorIgor Matuszewski-10/+8
2017-10-20Add short message-formatGuillaume Gomez-2/+6
2017-10-16convert constant promotion into a queryNiko Matsakis-1/+2
2017-10-10Fixed client code for diagnostics migration, adding new methods to `trait ↵Felix S. Klock II-1/+0
BorrowckErrors` as necessary.
2017-10-10Auto merge of #44822 - frewsxcv:frewsxcv-eprintln, r=Kimundibors-1/+1
Migrate to eprint/eprintln macros where appropriate. None
2017-10-07Auto merge of #44860 - kennytm:fix-44731, r=alexcrichtonbors-1/+17
Fix issue #44731. Also excludes `impl Trait` from everybody_loops if it appears in the path. Fixes #44731.
2017-10-02incr.comp.: Remove saving and loading of legacy dep-graph.Michael Woerister-5/+5