about summary refs log tree commit diff
path: root/src/librustc_driver
AgeCommit message (Collapse)AuthorLines
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.
2019-11-09Move next_node_id to ResolverMark Rousskov-11/+2
This doesn't migrate the pretty-printing everybody loops, which will be done in the next few commits.
2019-11-09Rollup merge of #66172 - jsgf:stabilize-atfile, r=nikomatsakisMazdak Farrokhzad-17/+1
Stabilize @file command line arguments Issue https://github.com/rust-lang/rust/issues/63576
2019-11-07move PResult to librustc_errorsMazdak Farrokhzad-1/+2
2019-11-06Stabilize @file command line argumentsJeremy Fitzhardinge-17/+1
Issue https://github.com/rust-lang/rust/issues/63576
2019-10-25Remove lint callback from driverMark Rousskov-2/+0
This is leftover from a restructuring of lint registration for drivers; it should now happen via the register_lints field on Config rather than this function.
2019-10-24rustc_driver: Remove unnecessary use of crate storeVadim Petrochenkov-4/+4
2019-10-23Rollup merge of #65193 - Mark-Simulacrum:lockless-lintstore, r=nikomatsakisMazdak Farrokhzad-9/+19
Lockless LintStore This removes mutability from the lint store after registration. Each commit stands alone, for the most part, though they don't make sense out of sequence. The intent here is to move LintStore to a more parallel-friendly architecture, although also just a cleaner one from an implementation perspective. Specifically, this has the following changes: * We no longer implicitly register lints when registering lint passes * For the most part this means that registration calls now likely want to call something like: `lint_store.register_lints(&Pass::get_lints())` as well as `register_*_pass`. * In theory this is a simplification as it's much easier for folks to just register lints and then have passes that implement whichever lint however they want, rather than necessarily tying passes to lints. * Lint passes still have a list of associated lints, but a followup PR could plausibly change that * This list must be known for a given pass type, not instance, i.e., `fn get_lints()` is the signature instead of `fn get_lints(&self)` as before. * We do not store pass objects, instead storing constructor functions. This means we always get new passes when running lints (this happens approximately once though for a given compiler session, so no behavior change is expected). * Registration API is _much_ simpler: generally all functions are just taking `Fn() -> PassObject` rather than several different `bool`s.
2019-10-22Add some documentationMark Rousskov-0/+1
2019-10-19move parse_cfgspecs to rustc_interfaceMazdak Farrokhzad-1/+1
2019-10-17Update API to be more compatible with plugin needsMark Rousskov-0/+3
Move to using Box<dyn Fn() -> ...> so that we can let plugins register state. This also adds a callback that'll get called from plugin registration so that Clippy and other tools can register lints without using the plugin API. The plugin API still works, but this new API is more compatible with drivers other than rustc.
2019-10-17Create lint store during plugin registrationMark Rousskov-6/+13
Remove lint store from Session
2019-10-17Lints being from a plugin is dependent on the lint, not the registrationMark Rousskov-3/+2
2019-10-14rustc_metadata: Privatize private code and remove dead codeVadim Petrochenkov-1/+1
2019-10-13refactor session::config::build_session_options_and_crate_configMazdak Farrokhzad-1/+2
2019-09-29Rollup merge of #64799 - Aaron1011:fix/double-panic, r=Mark-SimulacrumMazdak Farrokhzad-1/+1
Fix double panic when printing query stack during an ICE On the latest nightly, any call to `bug` or `span_bug` will result in two panics - the first one as a normal result of calling `bug` / `span_bug`, and the second as a result of trying to print the query stack from the panic handler. This is caused by the query-printing code attempting to acquire a lock on `HandlerInnder`, which is still being held by `bug`. This PR moves the actual panic out of `HandlerInner`, into `Handler`. This allows us to release the lock on `HandlerInner` before triggering the panic, ensuring that the panic handler will be able to acquire the lock if necessary.
2019-09-28Rollup merge of #64847 - mati865:env_logger, r=alexcrichtonMazdak Farrokhzad-1/+1
Upgrade env_logger to 0.7 `./x.py test` passed locally.
2019-09-27-Z unpretty message: include expanded,hygieneMazdak Farrokhzad-3/+3
2019-09-27Remove unpretty=flowgraph.Mazdak Farrokhzad-164/+14
2019-09-27Remove librustc_ast_borrowck from driver & interface.Mazdak Farrokhzad-1/+0
2019-09-26Use existing Handler to print query stackAaron Hill-1/+1
When the panic handler is run, the existing Handler may be in a weird state if it was responsible for triggering the panic. By using a freshly created Handler, we avoid trying to re-entrantly lock a HandlerInner, which was causing a double panic on ICEs.
2019-09-26Rename `MetaItem.node` to `MetaItem.kind`varkor-1/+1
2019-09-26Upgrade env_logger to 0.7Mateusz MikuĊ‚a-1/+1
2019-09-23Introduce a diagnostic stashing API.Mazdak Farrokhzad-2/+1
2019-09-23Auto merge of #64272 - Mark-Simulacrum:parallel-handler, r=estebankbors-7/+6
Refactor librustc_errors::Handler API This should be reviewed by-commit. The last commit moves all fields into an inner struct behind a single lock; this is done to prevent possible deadlocks in a multi-threaded compiler, as well as inconsistent state observation.
2019-09-17Rollup merge of #64486 - matthewjasper:hygiene-debugging, r=petrochenkovTyler Mandry-2/+7
Print out more information for `-Zunpretty=expanded,hygiene` I've found this helpful when trying to understand how hygiene works. Closes #16420
2019-09-17Print syntax contexts and marks when printing hygiene informationMatthew Jasper-2/+7