about summary refs log tree commit diff
path: root/src/librustc_driver
AgeCommit message (Collapse)AuthorLines
2019-08-30Auto merge of #63827 - andjo403:out-of-process-rustc-in-rustdoc, ↵bors-0/+9
r=Mark-Simulacrum Run doctests via out-of-process rustc closes #63638
2019-08-30Auto merge of #63402 - estebank:strip-margin, r=oli-obkbors-5/+7
Strip code to the left and right in diagnostics for long lines Fix #62999.
2019-08-29support rustdoc test from stdin to rustcAndreas Jonson-0/+9
2019-08-22Auto merge of #63175 - jsgf:argsfile, r=jsgfbors-8/+82
rustc: implement argsfiles for command line Many tools, such as gcc and gnu-ld, support "args files" - that is, being able to specify @file on the command line. This causes `file` to be opened and parsed for command line options. They're separated with whitespace; whitespace can be quoted with double or single quotes, and everything can be \\-escaped. Args files may recursively include other args files via `@file2`. See https://sourceware.org/binutils/docs/ld/Options.html#Options for the documentation of gnu-ld's @file parameters. This is useful for very large command lines, or when command lines are being generated into files by other tooling.
2019-08-21Add terminal_width debugging flagEsteban Küber-5/+7
2019-08-20Move argfile expansion into run_compilerJeremy Fitzhardinge-235/+67
This will make @path work with miri and other non-standard entrypoints. Also since this simplifies librustc_driver::args, move it into a simple source file. Also remove the tests since they're doing nothing more than checking `str::lines` has the right behaviour.
2019-08-20Restore the rustc_plugin crate in the sysrootSimon Sapin-0/+1
It was accidentally removed in a rebase of https://github.com/rust-lang/rust/pull/62727 Fixes https://github.com/rust-lang/rust/issues/63729
2019-08-19rustc: implement argsfiles for command lineJeremy Fitzhardinge-4/+246
This makes `rustc` support `@path` arguments on the command line. The `path` is opened and the file is interpreted as new command line options which are logically inserted at that point in the command-line. The options in the file are one per line. The file is UTF-8 encoded, and may have either Unix or Windows line endings. It does not support recursive use of `@path`. This is useful for very large command lines, or when command-lines are being generated into files by other tooling.
2019-08-19Use named arguments for formatting usage message.Jeremy Fitzhardinge-5/+5
It was getting a bit awkward.
2019-08-20Deprecate using rustc_plugin without the rustc_driver dylib.Simon Sapin-0/+3
CC https://github.com/rust-lang/rust/pull/59800 https://github.com/rust-lang/rust/commit/7198687bb2df13a3298ef1e8f594753073d6b9e8 Fix https://github.com/rust-lang/rust/issues/62717
2019-08-15`Ident::with_empty_ctxt` -> `Ident::with_dummy_span`Vadim Petrochenkov-1/+1
`Ident` has had a full span rather than just a `SyntaxContext` for a long time now.
2019-08-09Cleanup historical stability commentsMark Rousskov-15/+6
These weren't removed by ccbcc720a679ae76155a8 most likely by accident, let's clean them up now.
2019-07-28Deny `unused_lifetimes` through rustbuildVadim Petrochenkov-2/+0
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-1/+0
rustbuild Remove some random unnecessary lint `allow`s
2019-07-27Break dependencies between `syntax_ext` and some other cratesVadim Petrochenkov-11/+0
Move `source_uitil` macros into `syntax_ext` Cleanup dependencies of `rustc_driver`
2019-07-25Rollup merge of #62735 - petrochenkov:galloc, r=alexcrichtonMazdak Farrokhzad-2/+0
Turn `#[global_allocator]` into a regular attribute macro It was a 99% macro with exception of some diagnostic details. As a result of the change, `#[global_allocator]` now works in nested modules and even in nameless blocks. Fixes https://github.com/rust-lang/rust/issues/44113 Fixes https://github.com/rust-lang/rust/issues/58072
2019-07-25Rollup merge of #62901 - petrochenkov:serde, r=CentrilMazdak Farrokhzad-2/+2
cleanup: Remove `extern crate serialize as rustc_serialize`s
2019-07-24Merge `rustc_allocator` into `libsyntax_ext`Vadim Petrochenkov-2/+0
2019-07-23normalize use of backticks for compiler messages in remaining modulesSamy Kacimi-2/+2
https://github.com/rust-lang/rust/issues/60532
2019-07-23cleanup: Remove `extern crate serialize as rustc_serialize`sVadim Petrochenkov-2/+2
2019-07-15Use more descriptive Compilation enum in rustc interface callbacksIgor Matuszewski-12/+15
2019-07-15Add Callbacks::after_expansionIgor Matuszewski-0/+9
2019-07-11Move rustc_borrowck -> rustc_ast_borrowckMatthew Jasper-1/+1
2019-07-11Remove rustc_mir dependency from rustc_borrowckMatthew Jasper-2/+2
2019-07-10Move pp::Printer helpers to direct implMark Rousskov-1/+0
2019-07-10Move pp::Printer out field to owned StringMark Rousskov-2/+1
This enforces that eof() must be called to get the String out, and generally is better from an API perspective. No users of pretty printing pre-allocate the buffer.
2019-07-10print_crate returns String instead of taking an out pointerMark Rousskov-6/+3
2019-07-10Replace src: &mut dyn Read with StringMark Rousskov-11/+10
2019-07-09Auto merge of #62233 - matthewjasper:exit-arm-scopes, r=pnkfelixbors-10/+10
Exit arm scopes Due to a bug in the HIR CFG construction, borrows for arm scopes were incorrectly leaking into other arms. This PR also includes some drive-by improvements to `-Zunpretty=hir,identified` that would have been helpful while investigating this. Closes #62107
2019-07-09Remove unused dependenciesShotaro Yamada-1/+0
2019-07-06Add arm ids for -Zunpretty=hir,identifiedMatthew Jasper-10/+10
2019-07-05Rollup merge of #62168 - ljedrz:the_culmination_of_hiridification, r=ZoxcMazdak Farrokhzad-2/+2
The (almost) culmination of HirIdification It's finally over. This PR removes old `FIXME`s and renames some functions so that the `HirId` variant has the shorter name. All that remains (and rightfully so) is stuff in `resolve`, `save_analysis` and (as far as I can tell) in a few places where we can't replace `NodeId` with `HirId`.
2019-07-05Rollup merge of #62110 - nnethercote:improve-Ztime-passes, r=ZoxcMazdak Farrokhzad-6/+26
Improve -Ztime-passes Two improvements that make `-Ztime-passes` more useful. r? @Zoxc
2019-07-05Rollup merge of #61545 - flip1995:internal_lints, r=oli-obkMazdak Farrokhzad-1/+0
Implement another internal lints cc #49509 This adds ~~two~~ one internal lint~~s~~: 1. LINT_PASS_IMPL_WITHOUT_MACRO: Make sure, that the `{declare,impl}_lint_pass` macro is used to implement lint passes. cc #59669 2. ~~USAGE_OF_TYCTXT_AND_SPAN_ARGS: item 2 on the list in #49509~~ ~~With 2. I wasn't sure, if this lint should be applied everywhere. That means a careful review of 0955835 would be great. Also 73fb9b4 allows this lint on some functions. Should I also apply this lint there?~~ TODO (not directly relevant for review): - [ ] https://github.com/rust-lang/rust/pull/59316#discussion_r280186517 (not sure yet, if this works or how to query for `rustc_private`, since it's not in [`Features`](https://doc.rust-lang.org/nightly/nightly-rustc/syntax/feature_gate/struct.Features.html) :thinking: cc @eddyb) - [x] https://github.com/rust-lang/rust/pull/61735#discussion_r292389870 - [x] Check explicitly for the `{declare,impl}_lint_pass!` macros r? @oli-obk
2019-07-05Auto merge of #62099 - Mark-Simulacrum:syntax-print-clean-2, r=eddybbors-71/+61
Remove io::Result from syntax::print Since we're now writing directly to the vector, there's no need to thread results through the whole printing infrastructure
2019-07-05Add a "total" measurement to -Ztime-passes.Nicholas Nethercote-6/+26
This is useful for getting the total compilation time at the end. To do this, the patch changes `print_time_passes_entry` to not increment the depth, which means that `print_time_passes_entry_internal` is no longer needed.
2019-07-04rename hir::map::local_def_id_from_hir_id to local_def_idljedrz-1/+1
2019-07-04rename hir::map::local_def_id to local_def_id_from_node_idljedrz-1/+1
2019-07-03Remove needless lifetimesJeremy Stucki-10/+10
2019-06-29Remove io::Result from syntax::printMark Rousskov-54/+44
Since we're now writing directly to the vector, there's no need to thread results through the whole printing infrastructure
2019-06-29Replace pretty-printer Box<dyn Write> with &mut StringMark Rousskov-17/+17
2019-06-24Enable internal lints in bootstrapflip1995-1/+0
2019-06-24HirIdify driver::pretty::HirPrinterSupport::node_pathljedrz-6/+5
2019-06-24HIR: rename find_by_hir_id to findljedrz-1/+1
2019-06-24HIR: remove the NodeId findljedrz-2/+2
2019-06-24HIR: rename get_parent_node_by_hir_id to get_parent_nodeljedrz-1/+1
2019-06-20rename hir::map::get_by_hir_id to getljedrz-3/+3
2019-06-20remove hir::map::getljedrz-2/+4
2019-06-20make blocks::Code work with HirIdljedrz-1/+2
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-1/+1