summary refs log tree commit diff
path: root/src/librustc_driver
AgeCommit message (Collapse)AuthorLines
2020-01-15Rollup merge of #68252 - matthiaskrgr:redundant_clones, r=oli-obkDylan DPC-2/+0
remove redundant clones, found by clippy
2020-01-15remove redundant clones, found by clippyMatthias Krüger-2/+0
2020-01-15Rollup merge of #68141 - euclio:replace-bindings-with-winapi, r=alexcrichtonYuki Okushi-13/+8
use winapi for non-stdlib Windows bindings
2020-01-11use winapi for non-stdlib Windows bindingsAndy Russell-13/+8
2020-01-11move rustc::lint::{context, passes} to rustc_lint.Mazdak Farrokhzad-7/+6
Also do some cleanup of the interface.
2020-01-11Rollup merge of #68043 - Zoxc:missing-timers, r=wesleywiserMazdak Farrokhzad-0/+2
Add some missing timers Based on https://github.com/rust-lang/rust/pull/67988 r? @wesleywiser
2020-01-10nix syntax::errors & prefer rustc_errors over errorsMazdak Farrokhzad-8/+8
2020-01-09Tweak timersJohn Kåre Alsaker-1/+0
2020-01-09Label unmarked timeJohn Kåre Alsaker-0/+3
2020-01-10Rollup merge of #68040 - sinkuu:unused, r=petrochenkovYuki Okushi-2/+0
Cleanup
2020-01-09Change -Z time event naming scheme and make them generic activitiesJohn Kåre Alsaker-1/+1
2020-01-09Remove unused dependenciesShotaro Yamada-2/+0
2020-01-08Remove `-Z continue-parse-after-error`Vadim Petrochenkov-1/+0
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-4/+5
2020-01-05Use self profile infrastructure for -Z time and -Z time-passesJohn Kåre Alsaker-3/+3
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-6/+6
2019-12-30Make things build againVadim Petrochenkov-1/+1
2019-12-24Deprecate Error::description for realDavid Tolnay-6/+1
`description` has been documented as soft-deprecated since 1.27.0 (17 months ago). There is no longer any reason to call it or implement it. This commit: - adds #[rustc_deprecated(since = "1.41.0")] to Error::description; - moves description (and cause, which is also deprecated) below the source and backtrace methods in the Error trait; - reduces documentation of description and cause to take up much less vertical real estate in rustdocs, while preserving the example that shows how to render errors without needing to call description; - removes the description function of all *currently unstable* Error impls in the standard library; - marks #[allow(deprecated)] the description function of all *stable* Error impls in the standard library; - replaces miscellaneous uses of description in example code and the compiler.
2019-12-22Format the worldMark Rousskov-380/+345
2019-12-21Use Arena inside hir::Crate.Camille GILLOT-1/+1
2019-12-11Fix fallout from rebaseAaron Hill-2/+0
2019-12-11rustc: Link LLVM directly into rustc againAlex Crichton-2/+7
This commit builds on #65501 continue to simplify the build system and compiler now that we no longer have multiple LLVM backends to ship by default. Here this switches the compiler back to what it once was long long ago, which is linking LLVM directly to the compiler rather than dynamically loading it at runtime. The `codegen-backends` directory of the sysroot no longer exists and all relevant support in the build system is removed. Note that `rustc` still supports a dynamically loaded codegen backend as it did previously, it just no longer supports dynamically loaded codegen backends in its own sysroot. Additionally as part of this the `librustc_codegen_llvm` crate now once again explicitly depends on all of its crates instead of implicitly loading them through the sysroot. This involved filling out its `Cargo.toml` and deleting all the now-unnecessary `extern crate` annotations in the header of the crate. (this in turn required adding a number of imports for names of macros too). The end results of this change are: * Rustbuild's build process for the compiler as all the "oh don't forget the codegen backend" checks can be easily removed. * Building `rustc_codegen_llvm` is much simpler since it's simply another compiler crate. * Managing the dependencies of `rustc_codegen_llvm` is much simpler since it's "just another `Cargo.toml` to edit" * The build process should be a smidge faster because there's more parallelism in the main rustc build step rather than splitting `librustc_codegen_llvm` out to its own step. * The compiler is expected to be slightly faster by default because the codegen backend does not need to be dynamically loaded. * Disabling LLVM as part of rustbuild is still supported, supporting multiple codegen backends is still supported, and dynamic loading of a codegen backend is still supported.
2019-12-03Move early lint declarations to librustc_sessionMark Rousskov-1/+1
2019-12-01Rollup merge of #66896 - RalfJung:queries, r=ZoxcMazdak Farrokhzad-7/+19
pass Queries to compiler callbacks https://github.com/rust-lang/rust/pull/66791 made it impossible to access the tcx in the callbacks; this should fix that. r? @Zoxc
2019-11-30Rollup merge of #66895 - Centril:rustc_feature, r=oli-obkMazdak Farrokhzad-15/+10
Feature gating *declarations* => new crate `rustc_feature` This PR moves the data-oriented parts of feature gating into its own crate, `rustc_feature`. The parts consist of some data types as well as `accepted`, `active`, `removed`, and `builtin_attrs`. Feature gate checking itself remains in `syntax::feature_gate::check`. The parts which define how to emit feature gate errors could probably be moved to `rustc_errors` or to the new `rustc_session` crate introduced in #66878. The visitor itself could probably be moved as a pass in `rustc_passes` depending on how the dependency edges work out. The PR also contains some drive-by cleanup of feature gate checking. As such, the PR probably best read commit-by-commit. r? @oli-obk cc @petrochenkov cc @Mark-Simulacrum
2019-11-30pass Queries to compiler callbacksRalf Jung-7/+19
2019-11-30move UnstableFeatures -> rustc_featureMazdak Farrokhzad-4/+2
2019-11-30builtin_attrs.rs -> rustc_featureMazdak Farrokhzad-1/+3
2019-11-30simplify gated cfgs logicMazdak Farrokhzad-13/+8
2019-11-26Review nits.Camille GILLOT-3/+0
2019-11-25Simplify early exits.Camille GILLOT-16/+9
2019-11-24Tidy.Camille GILLOT-1/+3
2019-11-24Move linking ouside the interface queries.Camille GILLOT-12/+23
2019-11-24Isolate compiler queries inside the Queries type.Camille GILLOT-91/+95
2019-11-24rustc_plugin: Remove support for syntactic pluginsVadim Petrochenkov-1/+1
2019-11-22Rollup merge of #66575 - Mark-Simulacrum:no-uii, r=petrochenkovMazdak Farrokhzad-61/+9
Remove pretty printing of specific nodes in AST The ability to print a specific item as identified by NodeId or path seems not particularly useful, and certainly carries quite a bit of complexity with it. This is intended to simplify our CLI parsing a bit and remove a non-uncomplicated piece of it; I largely did this to remove the dependency on NodeId from librustc/session but it's not really necessary to do so in this invasive a way. The alternative is moving it to librustc_interface or driver, probably.
2019-11-20Remove pretty printing of specific nodes in ASTMark Rousskov-61/+9
The ability to print a specific item as identified by NodeId or path seems not particularly useful, and certainly carries quite a bit of complexity with it.
2019-11-20Rollup merge of #66546 - aradzie:remove_duplicate_function, r=Dylan-DPCMazdak Farrokhzad-12/+1
Remove duplicate function Function `source_name` declared in file [src/librustc_driver/lib.rs](https://github.com/rust-lang/rust/blob/master/src/librustc_driver/lib.rs#L87) is a duplicate of the function by the same name declared in file [src/librustc/session/config.rs](https://github.com/rust-lang/rust/blob/master/src/librustc/session/config.rs#L511)
2019-11-19Remove duplicate functionAliaksandr Radzivanovich-12/+1
Function source_name declared in file src/librustc_driver/lib.rs is a duplicate of a function by the same name declared in file src/librustc/session/config.rs
2019-11-17Rename directory `rustc_plugin` -> `rustc_plugin_impl`Vadim Petrochenkov-1/+1
2019-11-17rustc_plugin: Remove the compatibility shimVadim Petrochenkov-1/+0
2019-11-16move DIAGNOSTICS usage to rustc_driverMazdak Farrokhzad-6/+11
2019-11-14Update rustc --explain to the new error codes formatGuillaume Gomez-2/+2
2019-11-13Rollup merge of #66297 - vakaras:edit-queries, r=oli-obkYuki Okushi-0/+2
Add a callback that allows compiler consumers to override queries. This pull request adds an additional callback that allows compiler consumers such as Prusti and MIRAI to override queries. My hope is that in this way it will be possible to get access to the internal compiler information (e.g. borrow checker) without major changes to the compiler. This pull request is work in progress because I am still testing if I can get the information which I need. cc @nikomatsakis r? @oli-obk
2019-11-12Rollup merge of #66276 - Mark-Simulacrum:sess-code-stats, r=nikomatsakisYuki Okushi-1/+1
Move lock into CodeStats Prevent (theoretical) accidental too-long borrows by ensuring only encapsulated locking.
2019-11-11Add a callback that allows compiler consumers to override queries.Vytautas Astrauskas-0/+2
2019-11-10Move lock into CodeStatsMark Rousskov-1/+1
Prevent accidental too-long borrows by ensuring only encapsulated locking.
2019-11-10Auto merge of #65324 - Centril:organize-syntax, r=petrochenkovbors-8/+10
Split libsyntax apart In this PR the general idea is to separate the AST, parser, and friends by a more data / logic structure (tho not fully realized!) by separating out the parser and macro expansion code from libsyntax. Specifically have now three crates instead of one (libsyntax): - libsyntax: - concrete syntax tree (`syntax::ast`) - definition of tokens and token-streams (`syntax::{token, tokenstream}`) -- used by `syntax::ast` - visitors (`syntax::visit`, `syntax::mut_visit`) - shared definitions between `libsyntax_expand` - feature gating (`syntax::feature_gate`) -- we could possibly move this out to its own crater later. - attribute and meta item utilities, including used-marking (`syntax::attr`) - pretty printer (`syntax::print`) -- this should possibly be moved out later. For now I've reduced down the dependencies to a single essential one which could be broken via `ParseSess`. This entails that e.g. `Debug` impls for `Path` cannot reference the pretty printer. - definition of `ParseSess` (`syntax::sess`) -- this is used by `syntax::{attr, print, feature_gate}` and is a common definition used by the parser and other things like librustc. - the `syntax::source_map` -- this includes definitions used by `syntax::ast` and other things but could ostensibly be moved `syntax_pos` since that is more related to this module. - a smattering of misc utilities not sufficiently important to itemize -- some of these could be moved to where they are used (often a single place) but I wanted to limit the scope of this PR. - librustc_parse: - parser (`rustc_parse::parser`) -- reading a file and such are defined in the crate root tho. - lexer (`rustc_parse::lexer`) - validation of meta grammar (post-expansion) in (`rustc_parse::validate_attr`) - libsyntax_expand -- this defines the infra for macro expansion and conditional compilation but this is not libsyntax_ext; we might want to merge them later but currently libsyntax_expand is depended on by librustc_metadata which libsyntax_ext is not. - conditional compilation (`syntax_expand::config`) -- moved from `syntax::config` to here - the bulk of this crate is made up of the old `syntax::ext` r? @estebank
2019-11-10move syntax::parse -> librustc_parseMazdak Farrokhzad-8/+10
also move MACRO_ARGUMENTS -> librustc_parse
2019-11-09Move pretty parsing into Session optionsMark Rousskov-279/+73
This allows us to query whether PpmEveryBodyLoops is set during expansion and run the everybody loops pass.