summary refs log tree commit diff
path: root/src/librustc_driver/lib.rs
AgeCommit message (Collapse)AuthorLines
2016-10-19Stabilise `?`Nick Cameron-1/+1
cc [`?` tracking issue](https://github.com/rust-lang/rust/issues/31436)
2016-09-26appease tidyTim Neumann-1/+2
2016-09-26deduplicate inline is_nightly_build implementationsTim Neumann-4/+1
2016-09-26refactor away get_unstable_features_settingTim Neumann-2/+2
2016-09-19Auto merge of #36102 - GuillaumeGomez:rustc_metadata_diagnostics, ↵bors-0/+1
r=jonathandturner Rustc metadata diagnostics r? @jonathandturner
2016-09-15Default RUST_MIN_STACK to 16MiB for nowSimonas Kazlauskas-1/+2
2016-09-04Auto merge of #36203 - petrochenkov:uvsdot, r=nrcbors-2/+3
Replace `_, _` with `..` in patterns This is how https://github.com/rust-lang/rust/issues/33627 looks in action. Looks especially nice in leftmost/rightmost positions `(first, ..)`/`(.., last)`. I haven't touched libsyntax intentionally because the feature is still unstable.
2016-09-04Auto merge of #36132 - nrc:save-std, r=@eddybbors-1/+4
Add --Zsave-analysis-api This is a save-analysis variation which can be used with libraries distributed without their source (e.g., libstd). It will allow IDEs and other tools to get info about types and create URLs to docs and source, without the unnecessary clutter of internal-only save-analysis info. I'm sure we'll iterate somewhat on the design, but this is a first draft.
2016-09-04Replace `_, _` with `..`Vadim Petrochenkov-2/+3
2016-09-04Add librustc metadata error codes to global checkggomez-0/+1
2016-09-02rustc: Implement custom derive (macros 1.1)Alex Crichton-1/+1
This commit is an implementation of [RFC 1681] which adds support to the compiler for first-class user-define custom `#[derive]` modes with a far more stable API than plugins have today. [RFC 1681]: https://github.com/rust-lang/rfcs/blob/master/text/1681-macros-1.1.md The main features added by this commit are: * A new `rustc-macro` crate-type. This crate type represents one which will provide custom `derive` implementations and perhaps eventually flower into the implementation of macros 2.0 as well. * A new `rustc_macro` crate in the standard distribution. This crate will provide the runtime interface between macro crates and the compiler. The API here is particularly conservative right now but has quite a bit of room to expand into any manner of APIs required by macro authors. * The ability to load new derive modes through the `#[macro_use]` annotations on other crates. All support added here is gated behind the `rustc_macro` feature gate, both for the library support (the `rustc_macro` crate) as well as the language features. There are a few minor differences from the implementation outlined in the RFC, such as the `rustc_macro` crate being available as a dylib and all symbols are `dlsym`'d directly instead of having a shim compiled. These should only affect the implementation, however, not the public interface. This commit also ended up touching a lot of code related to `#[derive]`, making a few notable changes: * Recognized derive attributes are no longer desugared to `derive_Foo`. Wasn't sure how to keep this behavior and *not* expose it to custom derive. * Derive attributes no longer have access to unstable features by default, they have to opt in on a granular level. * The `derive(Copy,Clone)` optimization is now done through another "obscure attribute" which is just intended to ferry along in the compiler that such an optimization is possible. The `derive(PartialEq,Eq)` optimization was also updated to do something similar. --- One part of this PR which needs to be improved before stabilizing are the errors and exact interfaces here. The error messages are relatively poor quality and there are surprising spects of this such as `#[derive(PartialEq, Eq, MyTrait)]` not working by default. The custom attributes added by the compiler end up becoming unstable again when going through a custom impl. Hopefully though this is enough to start allowing experimentation on crates.io! syntax-[breaking-change]
2016-09-01save-analsysis: add save-analysis-api CLI flagNick Cameron-1/+4
2016-08-25Refactor away `AttrMetaMethods`.Jeffrey Seyfried-1/+0
2016-08-25Implement RFC#1559: allow all literals in attributes.Sergio Benitez-5/+7
2016-08-23Use idiomatic names for string-related methods names.Corey Farwell-1/+1
2016-08-11Remove the 'cfg' field from session::config::Options.Michael Woerister-13/+25
The 'cfg' in the Options struct is only the commandline-specified subset of the crate configuration and it's almost always wrong to read that instead of the CrateConfig in HIR crate node.
2016-08-11Add the notion of a dependency tracking status to commandline arguments.Michael Woerister-2/+4
Commandline arguments influence whether incremental compilation can use its compilation cache and thus their changes relative to previous compilation sessions need to be taking into account. This commit makes sure that one has to specify for every commandline argument whether it influences incremental compilation or not.
2016-08-10Auto merge of #34845 - bitshifter:issue-30961, r=alexcrichtonbors-0/+23
Add help for target CPUs, features, relocation and code models. Fix for https://github.com/rust-lang/rust/issues/30961. Requires PR https://github.com/rust-lang/llvm/pull/45 to be accepted first, and the .gitmodules for llvm to be updated before this can be merged.
2016-08-07Turn on new errors, json mode. Remove duplicate unicode testJonathan Turner-12/+3
2016-08-06Merge branch 'master' into issue-30961Cameron Hart-22/+16
2016-08-03begin auditing the C++ types in RustWrapperAriel Ben-Yehuda-1/+1
2016-07-31Don't gate methods `Fn(Mut,Once)::call(mut,once)` with feature ↵Vadim Petrochenkov-1/+0
`unboxed_closures` They are already gated with feature `fn_traits`
2016-07-29Auto merge of #34842 - cgswords:attr_enc, r=nrcbors-19/+14
Better attribute and metaitem encapsulation throughout the compiler This PR refactors most (hopefully all?) of the `MetaItem` interactions outside of `libsyntax` (and a few inside) to interact with MetaItems through the provided traits instead of directly creating / destruct / matching against them. This is a necessary first step to eventually converting `MetaItem`s to internally use `TokenStream` representations (which will make `MetaItem` interactions much nicer for macro writers once the new macro system is in place). r? @nrc
2016-07-27librustc_back: filter targets for only valid onesJonathan Creekmore-1/+1
Since we can know which targets are instantiable on a particular host, it does not make sense to list invalid targets in the target print code. Filter the list of targets to only include the targets that can be instantiated.
2016-07-25Adressed PR comments.cgswords-6/+3
2016-07-25General MetaItem encapsulation rewrites.cgswords-19/+17
2016-07-24Tidy ups for code gen options helpCameron Hart-12/+11
Remove duplication code gen options and updated help to reflect changes.
2016-07-19Merge branch 'master' into issue-30961Cameron Hart-14/+31
2016-07-16Merge branch 'master' into issue-30961Cameron Hart-3/+3
2016-07-14Remove emit from emitter, leaving emit_structJonathan Turner-14/+20
2016-07-14Remove BasicEmitterJonathan Turner-3/+14
2016-07-11Avoid passing around the thread-local interner in `librustc_metadata`.Jeffrey Seyfried-3/+3
2016-07-11Add help for target CPUs, features, relocation and code models.Cameron Hart-0/+24
2016-06-30Remove `after_expand` and `after_write_deps` CompileController entry pointsJeffrey Seyfried-1/+1
2016-06-23Move errors from libsyntax to its own crateJonathan Turner-11/+14
2016-05-25trans: save metadata even with -Z no-trans.Eduard Burtescu-4/+0
2016-05-18thread the DepGraph to session/crate-storeNiko Matsakis-4/+11
This is a [breaking-change] for plugin authors. You must now create a dep-graph earlier.
2016-05-10Also rename the print_from_ast.Pavel Sountsov-11/+11
2016-05-10Rename after_ast to after_hir_lowering.Pavel Sountsov-2/+2
2016-05-10Make --emit dep-info work correctly with -Z no-analysis again.Pavel Sountsov-13/+13
Previously, it would attempt to resolve some external crates that weren't necessary for dep-info output. Fixes #33231.
2016-05-09Reimplement pretty printingJeffrey Seyfried-0/+2
2016-05-08Auto merge of #33091 - sanxiyn:unused-trait-import-3, r=nrcbors-1/+0
Warn unused trait imports, rebased Rebase of #30021. Fix #25730.
2016-05-03Remove unused trait imports flagged by lintSeo Sanghyeon-1/+0
2016-05-02Auto merge of #33119 - nrc:pretty, r=pnkfelixbors-54/+63
Refactor pretty printing to use the compiler API
2016-05-03rebasingNick Cameron-1/+0
Note that this whole PR is a [breaking-change] for clients of the Compiler API.
2016-05-03Fix testsNick Cameron-1/+4
2016-05-03Refactor pretty printing to use more of the driverNick Cameron-11/+33
2016-05-03Use the compiler API to run pretty printing.Nick Cameron-53/+39
This commit still does a lot of building in pretty because we always run after parsing.
2016-05-03Make pretty printer take Session by refNick Cameron-3/+2
2016-05-02fix rebase flawsNiko Matsakis-3/+2