about summary refs log tree commit diff
path: root/src/librustc_driver
AgeCommit message (Collapse)AuthorLines
2017-07-03do not append an extra newline charCengiz Can-1/+1
2017-07-03use PAGER to view --explain output #32665Cengiz Can-3/+43
2017-07-02report the total number of errors on compilation failureAriel Ben-Yehuda-46/+37
Prior to this PR, when we aborted because a "critical pass" failed, we displayed the number of errors from that critical pass. While that's the number of errors that caused compilation to abort in *that place*, that's not what people really want to know. Instead, always report the total number of errors, and don't bother to track the number of errors from the last pass that failed. This changes the compiler driver API to handle errors more smoothly, and therefore is a compiler-api-[breaking-change]. Fixes #42793.
2017-07-02Revert "Change error count messages"Ariel Ben-Yehuda-1/+2
This reverts commit 5558c64f33446225739c1153b43d2e309bb4f50e.
2017-06-28Shift mir-dataflow from `rustc_borrowck` to `rustc_mir` crate.Felix S. Klock II-1/+2
Turn `elaborate_drops` and `rustc_peek` implementations into MIR passes that also live in `rustc_mir` crate. Rewire things so `rustc_driver` uses the `ElaborateDrops` from `rustc_mir` crate.
2017-06-26Implement `quote!` and other `proc_macro` API.Jeffrey Seyfried-1/+0
2017-06-23Modify --explain to handle hidden code (`# ...`) and indented code blocks.kennytm-6/+13
2017-06-20Switch to the crates.io `getopts` crateAlex Crichton-10/+10
This commit deletes the in-tree `getopts` crate in favor of the crates.io-based `getopts` crate. The main difference here is with a new builder-style API, but otherwise everything else remains relatively standard.
2017-06-19Bump version and stage0 compilerAlex Crichton-5/+0
2017-06-19Auto merge of #39409 - pnkfelix:mir-borrowck2, r=nikomatsakisbors-0/+3
MIR EndRegion Statements (was MIR dataflow for Borrows) This PR adds an `EndRegion` statement to MIR (where the `EndRegion` statement is what terminates a borrow). An earlier version of the PR implemented a dataflow analysis on borrow expressions, but I am now factoring that into a follow-up PR so that reviewing this one is easier. (And also because there are some revisions I want to make to that dataflow code, but I want this PR to get out of WIP status...) This is a baby step towards MIR borrowck. I just want to get the review process going while I independently work on the remaining steps.
2017-06-17Auto merge of #42650 - nrc:save-slim, r=eddybbors-3/+0
save-analysis: remove a lot of stuff This commits us to the JSON format and the more general def/ref style of output, rather than also supporting different data formats for different data structures. This does not affect the RLS at all, but will break any clients of the CSV form - AFAIK there are none (beyond a few of my own toy projects) - DXR stopped working long ago. r? @eddyb
2017-06-16Auto merge of #42598 - cramertj:track-more-metadata, r=nikomatsakisbors-1/+2
Track more crate metadata Part of https://github.com/rust-lang/rust/issues/41417 r? @nikomatsakis
2017-06-14suppress trait errors that are implied by other errorsAriel Ben-Yehuda-1/+4
Instead of suppressing only trait errors that are "exact duplicates", display only the "most high-level" error when there are multiple trait errors with the same span that imply each-other. e.g. when there are both `[closure]: Fn` and `[closure]: FnOnce`, omit displaying the `[closure]: FnOnce` bound.
2017-06-14Auto merge of #42433 - marco-c:profiling, r=alexcrichtonbors-3/+5
Build instruction profiler runtime as part of compiler-rt r? @alexcrichton This is #38608 with some fixes. Still missing: - [x] testing with profiler enabled on some builders (on which ones? Should I add the option to some of the already existing configurations, or create a new configuration?); - [x] enabling distribution (on which builders?); - [x] documentation.
2017-06-14on-demand dylib dependency formatsTaylor Cramer-1/+1
2017-06-13On-demand is_const_fnTaylor Cramer-0/+1
2017-06-14Remove CSV format of save-analysis dataNick Cameron-3/+0
2017-06-12Add post-pass to remove EndRegions of unborrowed extents.Felix S. Klock II-0/+3
2017-06-10rustc: make the comon case of tcx.infer_ctxt(()) nicer.Eduard-Mihai Burtescu-1/+1
2017-06-04Merge branch 'profiling' of github.com:whitequark/rust into profilingMarco Castelluccio-3/+5
2017-06-01fix librustc_driver testsNiko Matsakis-16/+14
2017-05-24Rollup merge of #42150 - citizen428:feature/error-count-messages, ↵Mark Simulacrum-2/+1
r=Mark-Simulacrum Change error count messages See #33525 for details. r? @Mark-Simulacrum
2017-05-24Change error count messagesMichael Kohl-2/+1
See #33525 for details.
2017-05-23Rollup merge of #42016 - pietroalbini:stabilize/loop_break_value, r=nikomatsakisCorey Farwell-1/+1
Stabilize the loop_break_value feature Tracking issue: #37339. Documentation PRs already sent to the various repositories.
2017-05-18Give a nicer error for non-Unicode arguments to rustc and rustdocJosh Stone-1/+10
Previously, any non-Unicode argument would panic rustc: ``` $ rustc $'foo\x80bar' error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: "foo�bar"', /checkout/src/libcore/result.rs:859 note: Run with `RUST_BACKTRACE=1` for a backtrace. ``` Now it gives a clean error: ``` $ rustc $'foo\x80bar' error: Argument 1 is not valid Unicode: "foo�bar" ``` Maybe fixes #15890, although we still can't *compile* arbitrary file names.
2017-05-17Auto merge of #41911 - michaelwoerister:querify_trait_def, r=nikomatsakisbors-0/+3
Remove interior mutability from TraitDef by turning fields into queries This PR gets rid of anything `std::cell` in `TraitDef` by - moving the global list of trait impls from `TraitDef` into a query, - moving the list of trait impls relevent for some self-type from `TraitDef` into a query - moving the specialization graph of trait impls into a query, and - moving `TraitDef::object_safety` into a query. I really like how querifying things not only helps with incremental compilation and on-demand, but also just plain makes the code cleaner `:)` There are also some smaller fixes in the PR. Commits can be reviewed separately. r? @eddyb or @nikomatsakis
2017-05-17Stabilize the loop_break_value featurePietro Albini-1/+1
2017-05-16Auto merge of #41907 - est31:macro_unused, r=jseyfriedbors-0/+2
Add lint for unused macros Addresses parts of #34938, to add a lint for unused macros. We now output warnings by default when we encounter a macro that we didn't use for expansion. Issues to be resolved before this PR is ready for merge: - [x] fix the NodeId issue described above - [x] remove all unused macros from rustc and the libraries or set `#[allow(unused_macros)]` next to them if they should be kept for some reason. This is needed for successful boostrap and bors to accept the PR. -> #41934 - [x] ~~implement the full extent of #34938, that means the macro match arm checking as well.~~ *let's not do this for now*
2017-05-15Remove interior mutability from TraitDef by turning fields into queries.Michael Woerister-0/+3
2017-05-15Remove (direct) rustc_llvm dependency from rustc_driverRobin Kruppe-49/+11
This does not actually improve build times, since it still depends on rustc_trans, but is better layering and fits the multi-backend future slightly better.
2017-05-15Remove rustc_llvm dependency from librustcRobin Kruppe-0/+3
Consequently, session creation can no longer initialize LLVM. The few places that use the compiler without going through rustc_driver/CompilerCalls thus need to be careful to manually initialize LLVM (via rustc_trans!) immediately after session creation. This means librustc is not rebuilt when LLVM changes.
2017-05-14Remove rustc_llvm dependency from rustc_metadataRobin Kruppe-4/+9
Move the code for loading metadata from rlibs and dylibs from rustc_metadata into rustc_trans, and introduce a trait to avoid introducing a direct dependency on rustc_trans. This means rustc_metadata is no longer rebuilt when LLVM changes.
2017-05-13rustc: stop interning CodeExtent, it's small enough.Eduard-Mihai Burtescu-6/+5
2017-05-13rustc: treat ReEarlyBound as free without replacing it with ReFree.Eduard-Mihai Burtescu-2/+3
2017-05-13rustc: use DefId instead of CodeExtent for FreeRegion's scope.Eduard-Mihai Burtescu-14/+14
2017-05-13Add lint for unused macrosest31-0/+2
2017-05-13Auto merge of #41847 - alexcrichton:less-unstable-annotations, r=eddybbors-5/+6
rustc: Add a new `-Z force-unstable-if-unmarked` flag This commit adds a new `-Z` flag to the compiler for use when bootstrapping the compiler itself. We want to be able to use crates.io crates, but we also want the usage of such crates to be as ergonomic as possible! To that end compiler crates are a little tricky in that the crates.io crates are not annotated as unstable, nor do they expect to pull in unstable dependencies. To cover all these situations it's intended that the compiler will forever now bootstrap with `-Z force-unstable-if-unmarked`. This flags serves a dual purpose of forcing crates.io crates to themselves be unstable while also allowing them to use other "unstable" crates.io crates. This should mean that adding a dependency to compiler no longer requires upstream modification with unstable/staged_api attributes for inclusion!
2017-05-12Auto merge of #41757 - alexcrichton:stabilize-crt-static, r=japaricbors-14/+16
rustc: Stabilize `-C target-feature=+crt-static` This commit stabilizes the `crt-static` feature accepted by the compiler. Note that this does not stabilize the `#[cfg]` attribute for `crt-static` as that's going to be covered by #29717. This only stabilizes a few small pieces: * The `crt-static` feature as accepted by the `-C target-feature` flag, and its connection with the platform-specific definition of `crt-static`. * The semantics of `--print cfg` printing out activated `crt-static` feature, if available. This should be enough to get the benefits of `crt-static` on stable Rust with MSVC and with musl, but sidsteps the issue of stabilizing #29717 first. Closes #37406
2017-05-11rustc: Remove #![unstable] annotationAlex Crichton-3/+4
These are now no longer necessary with `-Z force-unstable-if-unmarked`
2017-05-10rustc: Add a new `-Z force-unstable-if-unmarked` flagAlex Crichton-2/+2
This commit adds a new `-Z` flag to the compiler for use when bootstrapping the compiler itself. We want to be able to use crates.io crates, but we also want the usage of such crates to be as ergonomic as possible! To that end compiler crates are a little tricky in that the crates.io crates are not annotated as unstable, nor do they expect to pull in unstable dependencies. To cover all these situations it's intended that the compiler will forever now bootstrap with `-Z force-unstable-if-unmarked`. This flags serves a dual purpose of forcing crates.io crates to themselves be unstable while also allowing them to use other "unstable" crates.io crates. This should mean that adding a dependency to compiler no longer requires upstream modification with unstable/staged_api attributes for inclusion!
2017-05-08incr.comp.: Hash more pieces of crate metadata to detect changes there.Michael Woerister-2/+1
2017-05-07Add support for Hexagon v60 HVX intrinsicsMichael Wu-0/+3
2017-05-04rustc: Stabilize `-C target-feature=+crt-static`Alex Crichton-14/+16
This commit stabilizes the `crt-static` feature accepted by the compiler. Note that this does not stabilize the `#[cfg]` attribute for `crt-static` as that's going to be covered by #29717. This only stabilizes a few small pieces: * The `crt-static` feature as accepted by the `-C target-feature` flag, and its connection with the platform-specific definition of `crt-static`. * The semantics of `--print cfg` printing out activated `crt-static` feature, if available. This should be enough to get the benefits of `crt-static` on stable Rust with MSVC and with musl, but sidsteps the issue of stabilizing #29717 first. Closes #37406
2017-05-02remove `mir_passes` from `Session` and add a FIXMENiko Matsakis-3/+4
2017-05-02fix librustc_driverNiko Matsakis-0/+1
2017-05-02pacify the mercilous tidyNiko Matsakis-1/+2
2017-05-02support inlining by asking for optimizer mir for calleesNiko Matsakis-1/+1
I tested this with it enabled 100% of the time, and we were able to run mir-opt tests successfully.
2017-05-02remove `Pass` and (temporarily) drop `Inline`Niko Matsakis-1/+1
2017-05-02rename `mir_map` to `queries` and remove `build_mir_for_crate`Niko Matsakis-10/+1
2017-05-02convert the `inline` pass to use the new multi resultNiko Matsakis-1/+1
This involves changing various details about that system, though the basic shape remains the same.