summary refs log tree commit diff
path: root/src/librustc_driver/driver.rs
AgeCommit message (Collapse)AuthorLines
2018-12-03Bump stack size to 32MBOliver Scherer-1/+1
2018-11-30proc_macro: introduce a "bridge" between clients (proc macros) and servers ↵Eduard-Mihai Burtescu-4/+4
(compiler front-ends).
2018-10-24Add `extern crate` items to extern preludeVadim Petrochenkov-1/+3
2018-10-19Prefer unwrap_or_else to unwrap_or in case of function calls/allocationsljedrz-1/+1
2018-10-17Auto merge of #54671 - petrochenkov:extpre2015, r=nikomatsakisbors-0/+1
resolve: Scale back hard-coded extern prelude additions on 2015 edition https://github.com/rust-lang/rust/pull/54404 stabilized `feature(extern_prelude)` on 2015 edition, including the hard-coded parts not passed with `--extern`. First of all, I'd want to confirm that this is intended stabilization, rather than a part of the "extended beta" scheme that's going to be reverted before releasing stable. (EDIT: to clarify - this is a question, I'm \*asking\* for confirmation, rather than give it.) Second, on 2015 edition extern prelude is not so fundamentally tied to imports and is a mere convenience, so this PR scales them back to the uncontroversial subset. The "uncontroversial subset" means that if libcore is injected it brings `core` into prelude, if libstd is injected it brings `std` and `core` into prelude. On 2015 edition this can be implemented through the library prelude (rather than hard-coding in the compiler) right now, I'll do it in a follow-up PR. UPDATE: The change is done for both 2015 and 2018 editions now as discussed below. Closes https://github.com/rust-lang/rust/issues/53166
2018-10-15rustc/session: improve allocationsljedrz-1/+1
2018-10-13Copy extern prelude from resolver to global contextVadim Petrochenkov-0/+1
2018-10-13rustc/driver: whitespace & formatting fixesljedrz-6/+8
2018-10-13rustc/driver: unwrap_or_else with function callsljedrz-7/+5
2018-10-13rustc/driver: remove explicit return, add explicit Noneljedrz-1/+1
2018-10-13rustc/driver: don't sort base if it only has one elementljedrz-2/+3
2018-10-13rustc/driver: improve common patternsljedrz-13/+7
2018-10-13rustc/driver: improve/remove allocationsljedrz-6/+6
2018-10-12rustc/driver: improve macro callsljedrz-1/+1
2018-09-13Suggest valid crate type if invalidPhilipp Hansch-7/+41
This adds a suggestion to the `invalid_crate_types` lint. The suggestion is based on the Levenshtein distance to existing crate types. If no suggestion is found it will show the lint without any suggestions.
2018-09-04Move #[test_case] to a syntax extensionJohn Renner-1/+0
2018-08-31Add deprecated_name argument to the register lint group functionsflip1995-2/+2
2018-08-19mv codemap() source_map()Donato Sciarra-2/+2
2018-08-14Rollup merge of #53226 - QuietMisdreavus:editions-for-all, r=estebankkennytm-1/+2
driver: set the syntax edition in phase 1 Fixes https://github.com/rust-lang/rust/issues/53203 It seems the way libsyntax handles the desired edition is to use a global, set via `syntax_pos::hygiene::set_default_edition`. Right now, this is set in the driver in `run_compiler`, which is the entry point for running the compiler all the way through to emitting files. Since rustdoc doesn't use this function, it wasn't properly setting this global. (When initially setting up editions in rustdoc, i'd assumed that setting `sessopts.edition` would have done this... `>_>`) This was "fixed" for doctests in https://github.com/rust-lang/rust/pull/52385, but rather than patching in a call to `set_default_edition` in all the places rustdoc sets up the compiler, i've instead moved the call in the driver to be farther in the process. This means that any use of `phase_1_parse_input` with the right session options will have the edition properly set without having to also remember to set libsyntax up separately. r? @rust-lang/compiler
2018-08-14syntax: gensym the injected std/core extern crates in the Rust 2018 edition.Eduard-Mihai Burtescu-1/+1
2018-08-09set the syntax edition in the driver's phase 1QuietMisdreavus-1/+2
2018-08-09Move Fingerprint to data structuresMark Rousskov-1/+1
2018-08-04Use diagnostic API on SessionMark Rousskov-1/+1
2018-08-04Normalize variants of CrateType to standard styleMark Rousskov-9/+9
This is a clippy-breaking change.
2018-08-03Store concrete crate stores where possibleMark Rousskov-8/+7
2018-08-02First pass at json outputWesley Wiser-0/+4
2018-08-02Basic profilingWesley Wiser-0/+11
2018-07-28Auto merge of #52355 - pietroalbini:zfeature, r=eddybbors-1/+5
Add the -Zcrate-attr=foo unstable rustc option This PR adds a new unstable option to `rustc`: `-Zcrate-attr=foo`. The option can be used to inject crate-level attributes from the CLI, and it's meant to be used by tools like Crater that needs to add their own attributes to a crate without changing the source code. The exact reason I need this is to implement "edition runs" in Crater: we need to add the preview feature flag to every crate, and editing the crates' source code on the fly might produce unexpected results, while a compiler flag is more reliable. cc https://github.com/rust-lang-nursery/crater/issues/282 @Mark-Simulacrum
2018-07-27Add the -Zcrate-attr=foo nightly rustc flag to inject crate attributesPietro Albini-1/+5
2018-07-27Use slices where a vector is not necessaryljedrz-4/+4
2018-07-23dump lints _after_ parsing macrosmark-7/+9
2018-07-23Extend ParseSess to support buffering lintsmark-0/+8
2018-07-18Auto merge of #52375 - oli-obk:the_early_lint_pass_gets_the_worm, r=Manishearthbors-1/+5
Lint `async` identifiers in 2018 preparation mode r? @Manishearth fixes https://github.com/rust-lang/rust/issues/49716
2018-07-14Lint the use of async as an identifierOliver Schneider-1/+5
2018-07-12Add missing dyn in driver.rsljedrz-1/+1
2018-07-12Deny bare trait objects in librustc_driverljedrz-11/+11
2018-07-05Do not run AST borrowck when -Zborrowck=mirSantiago Pastorino-1/+5
2018-06-24Attempt to fix hygiene for global_allocatorMark Mansi-1/+10
2018-06-19Parallel codeJohn Kåre Alsaker-5/+3
2018-06-14rustc: rename ty::maps to ty::query.Eduard-Mihai Burtescu-6/+6
2018-06-06Reduce the amount of unsafe code and mark handle_deadlock as unsafeJohn Kåre Alsaker-3/+4
2018-06-06Make queries block and handle query cyclesJohn Kåre Alsaker-3/+10
2018-06-05Add commentbjorn3-0/+12
2018-06-05Impl CompilerCalls for CompileController instead of AdHocCompilerCallsbjorn3-0/+57
2018-05-17Rename trans to codegen everywhere.Irina Popa-21/+21
2018-05-13Add a Rayon thread poolJohn Kåre Alsaker-1/+46
2018-05-13Add Sync bounds to the crate storeJohn Kåre Alsaker-2/+2
2018-05-07Make DepGraph::previous_work_products immutableWesley Wiser-9/+10
Fixes #50501
2018-04-23in unit tests, use `note` to dump multiple program clausesNiko Matsakis-4/+4
(rather than issuing multiple errors) Also, reorder so that the annotations are considered "used" when the lint runs.
2018-04-19add EDITIONS_NAME_LIST, make edition tracked, enforce that only stable ↵Kurtis Nusbaum-1/+1
editions are allowed to be used on non-nightly builds