summary refs log tree commit diff
path: root/src/librustc_driver
AgeCommit message (Collapse)AuthorLines
2017-04-20Properly adjust filenames when multiple emissionsSimonas Kazlauskas-4/+3
Fixes #40993
2017-03-12Improve wording in the -{W,A,F,D} optionsTobias Schottdorf-1/+1
Fixes #28708.
2017-03-12Auto merge of #40446 - arielb1:rollup, r=alexcrichtonbors-1/+1
Rollup of 12 pull requests - Successful merges: #40146, #40299, #40315, #40319, #40344, #40345, #40372, #40373, #40400, #40404, #40419, #40431 - Failed merges:
2017-03-11Auto merge of #40220 - jseyfried:ast_macro_def, r=nrcbors-3/+0
syntax: add `ast::ItemKind::MacroDef`, simplify hygiene info This PR - adds a new variant `MacroDef` to `ast::ItemKind` for `macro_rules!` and eventually `macro` items, - [breaking-change] forbids macro defs without a name (`macro_rules! { () => {} }` compiles today), - removes `ast::MacroDef`, and - no longer uses `Mark` and `Invocation` to identify and characterize macro definitions. - We used to apply (at least) two `Mark`s to an expanded identifier's `SyntaxContext` -- the definition mark(s) and the expansion mark(s). We now only apply the latter. r? @nrc
2017-03-11Rollup merge of #40431 - fsasm:master, r=BurntSushiAriel Ben-Yehuda-1/+1
rustc: Whitelist the FMA target feature This commit adds the entry `"fma\0"` to the whitelist for the x86 target. LLVM already supports fma but rustc did not directly. Previously rustc permitted `+fma` in the target-feature argument and enabled the use of FMA instructions, but it did not list it in the configuration and attributes. fixes #40406
2017-03-11Auto merge of #39648 - Aatch:mir-inlining-2, r=eddybbors-0/+1
[MIR] Implement Inlining Fairly basic implementation of inlining for MIR. Uses conservative heuristics for inlining. Doesn't handle a number of cases, but can be extended later. This is basically the same as the previous inlining PR, but without the span-related changes (as the bugs it was dealing with have since been fixed). /cc @rust-lang/compiler
2017-03-10Rollup merge of #40336 - alexcrichton:fast-dep-info, r=nrcAlex Crichton-0/+4
rustc: Exit quickly on only `--emit dep-info` This commit alters the compiler to exit quickly if the only output being emitted is `dep-info`, which doesn't need a lot of other information to generate. Closes #40328
2017-03-10rustc: Whitelist the FMA target featureFabjan Sukalia-1/+1
This commit adds the entry `"fma\0"` to the whitelist for the x86 target. LLVM already supports fma but rustc did not directly. Previously rustc permitted `+fma` in the target-feature argument and enabled the use of FMA instructions, but it did not list it in the configuration and attributes. fixes #40406
2017-03-10rustc: Exit quickly on only `--emit dep-info`Alex Crichton-0/+4
This commit alters the compiler to exit quickly if the only output being emitted is `dep-info`, which doesn't need a lot of other information to generate. Closes #40328
2017-03-10Remove ability for plugins to register a MIR passSimonas Kazlauskas-2/+1
In recent months there have been a few different people investigating how to make a plugin that registers a MIR-pass – one that isn’t intended to be eventually merged into rustc proper. The interface to register MIR passes was added primarily for miri (& later was found to make prototyping of rustc-proper MIR passes a tiny bit faster). Since miri does not use this interface anymore it seems like a good time to remove this "feature". For prototyping purposes a similar interface can be added by developers themselves in their custom rustc build.
2017-03-10Refactor out `ast::ItemKind::MacroDef`.Jeffrey Seyfried-3/+0
2017-03-10Initial implementation of inlining for MIRJames Miller-0/+1
Fairly basic implementation of inlining for MIR. Uses conservative heuristics for inlining.
2017-03-03Auto merge of #39927 - nikomatsakis:incr-comp-skip-borrowck-2, r=eddybbors-6/+18
transition borrowck to visit all **bodies** and not item-likes This is a better structure for incremental compilation and also more compatible with the eventual borrowck mir. It also fixes #38520 as a drive-by fix. r? @eddyb
2017-02-28Add warning cycle.Jeffrey Seyfried-0/+8
2017-02-28remove special-case code for statics and just use `borrowck_fn`Niko Matsakis-6/+18
Fixes #38520
2017-02-25rustc_const_eval: demand that the MIR qualify_consts ran on each evaluated body.Eduard-Mihai Burtescu-3/+2
2017-02-25rustc_typeck: rework coherence to be almost completely on-demand.Eduard-Mihai Burtescu-1/+1
2017-02-25rustc_typeck: move the leaves (generics, trait_def, adt_def) to on-demand.Eduard-Mihai Burtescu-0/+1
2017-02-25rustc: combine BareFnTy and ClosureTy into FnSig.Eduard-Mihai Burtescu-5/+7
2017-02-25rustc_typeck: lift CrateCtxt to TyCtxt.Eduard Burtescu-13/+11
2017-02-25rustc_mir: expose MIR building through ty::maps::Provider.Eduard-Mihai Burtescu-2/+3
2017-02-25rustc: introduce a query system for type information in ty::maps.Eduard Burtescu-1/+10
2017-02-25rustc: consolidate dep-tracked hashmaps in tcx.maps.Eduard-Mihai Burtescu-2/+4
2017-02-17Auto merge of #39752 - keeperofdakeys:macro-error, r=keeperofdakeysbors-4/+6
Refactor macro resolution errors + add derive macro suggestions Move legacy macro resolution error reporting to `finalize_current_module_macro_resolutions`, and provide suggestions for derive macros. Fixes #39323 cc https://github.com/rust-lang/rust/issues/30197 r? @jseyfried
2017-02-16Refactor macro resolution errors + add derive macro suggestionsJosh Driver-4/+6
2017-02-14Auto merge of #38561 - nagisa:rdrandseed, r=alexcrichtonbors-1/+1
Add intrinsics & target features for rd{rand,seed} One question is whether or not we want to map feature name `rdrnd` to `rdrand` instead. EDIT: as for use case, I would like to port my rdrand crate from inline assembly to these intrinsics.
2017-02-09driver: restore partially deleted commentAlex Burka-0/+1
2017-02-05Rollup merge of #39439 - king6cong:move, r=alexcrichtonCorey Farwell-2/+2
rename other than copy/remove
2017-02-04Fix testAndrew Cann-1/+1
2017-02-03Add warning for () to ! switchAndrew Cann-4/+4
2017-02-03add and use rename_or_copy_remove fn that fallback to copy & removeking6cong-1/+2
2017-02-03rename other than copy/removeking6cong-2/+1
2017-02-02Auto merge of #39402 - king6cong:master, r=nrcbors-5/+5
comment rewording and argument unifying
2017-01-30Merge ty::TyBox into ty::TyAdtVadim Petrochenkov-7/+4
2017-01-30unify time_passes argument passingking6cong-4/+4
2017-01-30doc comment rewordking6cong-1/+1
2017-01-26rustc: don't call the HIR AST.Eduard-Mihai Burtescu-87/+69
2017-01-26rustc: rename TyCtxt's `map` field to `hir`.Eduard-Mihai Burtescu-11/+11
2017-01-25rename `Tables` to `TypeckTables`Niko Matsakis-2/+2
2017-01-22better comment wordingking6cong-1/+1
2017-01-22Remove unused `extern crate`s.Jeffrey Seyfried-2/+0
2017-01-22Warn on unused `#[macro_use]` imports.Jeffrey Seyfried-1/+0
2017-01-20Rollup merge of #39142 - nikomatsakis:issue-38973, r=brsonAlex Crichton-16/+28
run rustdoc tests in the same sort of thread rustc runs in Not sure yet if this is the problem in #38973 but seems like an improvement regardless. r? @brson
2017-01-20Rollup merge of #39118 - jseyfried:token_tree_based_parser, r=nrcAlex Crichton-4/+4
Refactor the parser to consume token trees This is groundwork for efficiently parsing attribute proc macro invocations, bang macro invocations, and `TokenStream`-based attributes and fragment matchers. This improves parsing performance by 8-15% and expansion performance by 0-5% on a sampling of the compiler's crates. r? @nrc
2017-01-20Rollup merge of #38842 - abonander:proc_macro_attribute, r=jseyfriedAlex Crichton-11/+12
Implement `#[proc_macro_attribute]` This implements `#[proc_macro_attribute]` as described in https://github.com/rust-lang/rfcs/pull/1566 The following major (hopefully non-breaking) changes are included: * Refactor `proc_macro::TokenStream` to use `syntax::tokenstream::TokenStream`. * `proc_macro::tokenstream::TokenStream` no longer emits newlines between items, this can be trivially restored if desired * `proc_macro::TokenStream::from_str` does not try to parse an item anymore, moved to `impl MultiItemModifier for CustomDerive` with more informative error message * Implement `#[proc_macro_attribute]`, which expects functions of the kind `fn(TokenStream, TokenStream) -> TokenStream` * Reactivated `#![feature(proc_macro)]` and gated `#[proc_macro_attribute]` under it * `#![feature(proc_macro)]` and `#![feature(custom_attribute)]` are mutually exclusive * adding `#![feature(proc_macro)]` makes the expansion pass assume that any attributes that are not built-in, or introduced by existing syntax extensions, are proc-macro attributes * Fix `feature_gate::find_lang_feature_issue()` to not use `unwrap()` * This change wasn't necessary for this PR, but it helped debugging a problem where I was using the wrong feature string. * Move "completed feature gate checking" pass to after "name resolution" pass * This was necessary for proper feature-gating of `#[proc_macro_attribute]` invocations when the `proc_macro` feature flag isn't set. Prototype/Litmus Test: [Implementation](https://github.com/abonander/anterofit/blob/proc_macro/service-attr/src/lib.rs#L13) -- [Usage](https://github.com/abonander/anterofit/blob/proc_macro/service-attr/examples/post_service.rs#L35)
2017-01-17run rustdoc tests in the same sort of thread rustc runs inNiko Matsakis-16/+28
2017-01-17Teach Diagnostics to highlight textEsteban Küber-2/+2
2017-01-17Give the `StringReader` a `sess: &ParseSess`.Jeffrey Seyfried-4/+4
2017-01-16Move "completed feature gate checking" pass to after "name resolution" pass ↵Austin Bonander-11/+11
so proc-macro-attribute feature gate check can use resolve
2017-01-16Implement `#[proc_macro_attribute]`Austin Bonander-0/+1
* Add support for `#[proc_macro]` * Reactivate `proc_macro` feature and gate `#[proc_macro_attribute]` under it * Have `#![feature(proc_macro)]` imply `#![feature(use_extern_macros)]`, error on legacy import of proc macros via `#[macro_use]`