about summary refs log tree commit diff
path: root/src/librustc_interface
AgeCommit message (Collapse)AuthorLines
2019-09-07Rollup merge of #64243 - petrochenkov:cmdattr, r=alexcrichtonMazdak Farrokhzad-1/+3
Move injection of attributes from command line to `libsyntax_ext` Just a tiny bit of code generation that wasn't moved into `libsyntax_ext` in https://github.com/rust-lang/rust/pull/62771.
2019-09-07Rollup merge of #63919 - matthewjasper:remove-gensymmed, r=petrochenkovMazdak Farrokhzad-11/+16
Use hygiene for AST passes AST passes are now able to have resolve consider their expansions as if they were opaque macros defined either in some module in the current crate, or a fake empty module with `#[no_implicit_prelude]`. * Add an ExpnKind for AST passes. * Remove gensyms in AST passes. * Remove gensyms in`#[test]`, `#[bench]` and `#[test_case]`. * Allow opaque macros to define tests. * Move tests for unit tests to their own directory. * Remove `Ident::{gensym, is_gensymed}` - `Ident::gensym_if_underscore` still exists. cc #60869, #61019 r? @petrochenkov
2019-09-06Move injection of attributes from command line to `libsyntax_ext`Vadim Petrochenkov-1/+3
2019-09-05Simplify std lib injectionMatthew Jasper-1/+1
2019-09-05Remove rustc_diagnostic_macros featureMark Rousskov-4/+0
2019-09-05Replace diagnostic plugins with macro_rulesMark Rousskov-22/+11
2019-09-05Make use of hygiene in AST passesMatthew Jasper-11/+16
2019-09-02Remove `lower_to_hir()` call from `prepare_output()`.Nicholas Nethercote-1/+0
It's a false dependency. The result isn't used and there are no relevant side-effects.
2019-09-02Don't call `self.parse()` in `Compiler::crate_name()` unless necessary.Nicholas Nethercote-10/+11
2019-08-28Allow running rustdoc on proc-macro crates without specifying '--crate-type ↵Aaron Hill-16/+32
proc-macro' Add a test to make sure that this works
2019-08-25HirIdify hir::Crate.modulesljedrz-7/+8
2019-08-24Improve Rustdoc's handling of procedural macrosAaron Hill-21/+16
Fixes #58700 Fixes #58696 Fixes #49553 Fixes #52210 This commit removes the special rustdoc handling for proc macros, as we can now retrieve their span and attributes just like any other item. A new command-line option is added to rustdoc: `--crate-type`. This takes the same options as rustc's `--crate-type` option. However, all values other than `proc-macro` are treated the same. This allows Rustdoc to enable 'proc macro mode' when handling a proc macro crate. In compiletest, a new 'rustdoc-flags' option is added. This allows us to pass in the '--proc-macro-crate' flag in the absence of Cargo. I've opened [an additional PR to Cargo](https://github.com/rust-lang/cargo/pull/7159) to support passing in this flag. These two PRS can be merged in any order - the Cargo changes will not take effect until the 'cargo' submodule is updated in this repository.
2019-08-20Deprecate using rustc_plugin without the rustc_driver dylib.Simon Sapin-1/+1
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-10Remove Option from resolverMark Rousskov-16/+16
2019-08-06Don't use remap-path-prefix in dep-info files.Eric Huss-1/+1
2019-07-30Auto merge of #62766 - alexcrichton:stabilize-pipelined-compilation, r=oli-obkbors-2/+2
rustc: Stabilize options for pipelined compilation This commit stabilizes options in the compiler necessary for Cargo to enable "pipelined compilation" by default. The concept of pipelined compilation, how it's implemented, and what it means for rustc are documented in #60988. This PR is coupled with a PR against Cargo (rust-lang/cargo#7143) which updates Cargo's support for pipelined compliation to rustc, and also enables support by default in Cargo. (note that the Cargo PR cannot land until this one against rustc lands). The technical changes performed here were to stabilize the functionality proposed in #60419 and #60987, the underlying pieces to enable pipelined compilation support in Cargo. The issues have had some discussion during stabilization, but the newly stabilized surface area here is: * A new `--json` flag was added to the compiler. * The `--json` flag can be passed multiple times. * The value of the `--json` flag is a comma-separated list of directives. * The `--json` flag cannot be combined with `--color` * The `--json` flag must be combined with `--error-format=json` * The acceptable list of directives to `--json` are: * `diagnostic-short` - the `rendered` field of diagnostics will have a "short" rendering matching `--error-format=short` * `diagnostic-rendered-ansi` - the `rendered` field of diagnostics will be colorized with ansi color codes embedded in the string field * `artifacts` - JSON blobs will be emitted for artifacts being emitted by the compiler The unstable `-Z emit-artifact-notifications` and `--json-rendered` flags have also been removed during this commit as well. Closes #60419 Closes #60987 Closes #60988
2019-07-28Fix `cfg(parallel_compiler)` modeVadim Petrochenkov-3/+0
Fix rebase
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-31/+8
rustbuild Remove some random unnecessary lint `allow`s
2019-07-27syntax_ext: `proc_macro_decls` -> `proc_macro_harness`Vadim Petrochenkov-2/+2
Few other minor renamings for consistency. Remove one unused dependency from `rustc_passes`. Fix libsyntax tests. Fix rebase.
2019-07-27Move standard library injection into libsyntax_extVadim Petrochenkov-1/+6
2019-07-27Move test harness generation into libsyntax_extVadim Petrochenkov-1/+1
2019-07-26rustc: Stabilize options for pipelined compilationAlex Crichton-2/+2
This commit stabilizes options in the compiler necessary for Cargo to enable "pipelined compilation" by default. The concept of pipelined compilation, how it's implemented, and what it means for rustc are documented in #60988. This PR is coupled with a PR against Cargo (rust-lang/cargo#7143) which updates Cargo's support for pipelined compliation to rustc, and also enables support by default in Cargo. (note that the Cargo PR cannot land until this one against rustc lands). The technical changes performed here were to stabilize the functionality proposed in #60419 and #60987, the underlying pieces to enable pipelined compilation support in Cargo. The issues have had some discussion during stabilization, but the newly stabilized surface area here is: * A new `--json` flag was added to the compiler. * The `--json` flag can be passed multiple times. * The value of the `--json` flag is a comma-separated list of directives. * The `--json` flag cannot be combined with `--color` * The `--json` flag must be combined with `--error-format=json` * The acceptable list of directives to `--json` are: * `diagnostic-short` - the `rendered` field of diagnostics will have a "short" rendering matching `--error-format=short` * `diagnostic-rendered-ansi` - the `rendered` field of diagnostics will be colorized with ansi color codes embedded in the string field * `artifacts` - JSON blobs will be emitted for artifacts being emitted by the compiler The unstable `-Z emit-artifact-notifications` and `--json-rendered` flags have also been removed during this commit as well. Closes #60419 Closes #60987 Closes #60988
2019-07-26Introduce built-in macros through libcoreVadim Petrochenkov-1/+4
2019-07-25Rollup merge of #62735 - petrochenkov:galloc, r=alexcrichtonMazdak Farrokhzad-15/+1
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-3/+3
cleanup: Remove `extern crate serialize as rustc_serialize`s
2019-07-24Gate binary dependency information behind -Zbinary-dep-depinfoMark Rousskov-11/+13
2019-07-24Add binary dependencies to dep-info filesMark Rousskov-3/+20
2019-07-24syntax_ext: Turn `#[global_allocator]` into a regular attribute macroVadim Petrochenkov-14/+1
2019-07-24Merge `rustc_allocator` into `libsyntax_ext`Vadim Petrochenkov-2/+1
2019-07-23cleanup: Remove `extern crate serialize as rustc_serialize`sVadim Petrochenkov-3/+3
2019-07-19hygiene: Tweak naming some moreVadim Petrochenkov-1/+1
2019-07-19Adjust other names after the `Mark` renamingVadim Petrochenkov-1/+1
2019-07-18Emit artifact notifications for dependency filesJeremy Fitzhardinge-6/+14
2019-07-11Move rustc_borrowck -> rustc_ast_borrowckMatthew Jasper-2/+2
2019-07-09Remove unused dependenciesShotaro Yamada-1/+0
2019-07-07rustc: Remove `dylib` crate type from most rustc cratesAlex Crichton-1/+1
Now that procedural macros no longer link transitively to libsyntax, this shouldn't be needed any more! This commit is an experiment in removing all dynamic libraries from rustc except for librustc_driver itself. Let's see how far we can get with that!
2019-07-05Rollup merge of #62168 - ljedrz:the_culmination_of_hiridification, r=ZoxcMazdak Farrokhzad-7/+8
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 #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-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-6/+7
2019-07-04Rollup merge of #62039 - jeremystucki:needless_lifetimes, r=eddybMazdak Farrokhzad-5/+5
Remove needless lifetimes (rustc)
2019-07-03Rollup merge of #62128 - ehuss:extra-filename-warning, r=matthewjasperMark Rousskov-3/+3
Adjust warning of -C extra-filename with -o. If `--emit` includes multiple unnamed outputs, and `-o` was specified, and `-C extra-filename` was specified, the compiler would warn that `-C extra-filename` was ignored, but this is not true. The "adapting" of the filenames includes the extra-filename info. Since this is a little convoluted and hard to follow, here is a little chart to summarize when running with `rustc foo.rs -o xyz -C extra-filename=asdf` `--emit` | Result ---------|-------- `link` | `xyz` (extra-filename ignored) `link,dep-info` | `xyzasdf`, `xyzasdf.d` (this PR removes the incorrect warning) As to whether or not this behavior is the best choice is another question.
2019-07-03Remove needless lifetimesJeremy Stucki-5/+5
2019-06-25Adjust warning of -C extra-filename with -o.Eric Huss-3/+3
2019-06-24Enable internal lints in bootstrapflip1995-1/+0
2019-06-22Prefer to use `has_errors` to `err_count`Matthew Jasper-1/+1
2019-06-14Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-1/+1
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-9/+9
2019-06-12Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-9/+3