summary refs log tree commit diff
path: root/src/librustc_driver/lib.rs
AgeCommit message (Collapse)AuthorLines
2017-04-11Fix some nitsSimonas Kazlauskas-1/+3
2017-04-11Initial attempt at implementing optimization fuel and re-enabling struct ↵Austin Hicks-0/+8
field reordering.
2017-03-27Rollup merge of #40751 - nrc:save-callback, r=eddybAlex Crichton-2/+4
save-analysis: allow clients to get data directly without writing to a file.
2017-03-27Fix various useless derefs and slicingsOliver Schneider-5/+5
2017-03-23Remove internal liblogAlex Crichton-0/+2
This commit deletes the internal liblog in favor of the implementation that lives on crates.io. Similarly it's also setting a convention for adding crates to the compiler. The main restriction right now is that we want compiler implementation details to be unreachable from normal Rust code (e.g. requires a feature), and by default everything in the sysroot is reachable via `extern crate`. The proposal here is to require that crates pulled in have these lines in their `src/lib.rs`: #![cfg_attr(rustbuild, feature(staged_api, rustc_private))] #![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))] This'll mean that by default they're not using these attributes but when compiled as part of the compiler they do a few things: * Mark themselves as entirely unstable via the `staged_api` feature and the `#![unstable]` attribute. * Allow usage of other unstable crates via `feature(rustc_private)` which is required if the crate relies on any other crates to compile (other than std).
2017-03-23save-analysis: allow clients to get data directly without writing to a fileNick Cameron-2/+4
2017-03-12Improve wording in the -{W,A,F,D} optionsTobias Schottdorf-1/+1
Fixes #28708.
2017-02-28remove special-case code for statics and just use `borrowck_fn`Niko Matsakis-0/+1
Fixes #38520
2017-01-26rustc: don't call the HIR AST.Eduard-Mihai Burtescu-1/+1
2017-01-22better comment wordingking6cong-1/+1
2017-01-22Remove unused `extern crate`s.Jeffrey Seyfried-1/+0
2017-01-22Warn on unused `#[macro_use]` imports.Jeffrey Seyfried-1/+0
2017-01-17run rustdoc tests in the same sort of thread rustc runs inNiko Matsakis-16/+28
2017-01-08Auto merge of #38679 - alexcrichton:always-deny-warnings, r=nrcbors-1/+1
Remove not(stage0) from deny(warnings) Historically this was done to accommodate bugs in lints, but there hasn't been a bug in a lint since this feature was added which the warnings affected. Let's completely purge warnings from all our stages by denying warnings in all stages. This will also assist in tracking down `stage0` code to be removed whenever we're updating the bootstrap compiler.
2016-12-31Split CtxtArenas into GlobalArenas and CtxtInterners.Mark Simulacrum-0/+1
CtxtInterners contains a single DroplessArena, while GlobalArenas contains the TypedArenas still required for the remaining Drop-containing types.
2016-12-29Remove not(stage0) from deny(warnings)Alex Crichton-1/+1
Historically this was done to accommodate bugs in lints, but there hasn't been a bug in a lint since this feature was added which the warnings affected. Let's completely purge warnings from all our stages by denying warnings in all stages. This will also assist in tracking down `stage0` code to be removed whenever we're updating the bootstrap compiler.
2016-12-29Change --crate-type metadata to --emit=metadataNick Cameron-1/+2
2016-12-02rustc: add --print target-spec optionDoug Goldstein-0/+3
This option provides the user the ability to dump the configuration that is in use by rustc for the target they are building for. Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2016-11-30Update the bootstrap compilerAlex Crichton-2/+0
Now that we've got a beta build, let's use it!
2016-11-20Move `MetaItemKind`'s `Name` to a field of `MetaItem`.Jeffrey Seyfried-1/+2
2016-11-20Refactor `CrateConfig`.Jeffrey Seyfried-45/+19
2016-11-10rustc_typeck: correctly track "always-diverges" and "has-type-errors".Eduard Burtescu-2/+0
2016-11-09Rollup merge of #37636 - karpinski:issue-34915, r=nikomatsakisEduard-Mihai Burtescu-1/+6
Marking the 'no-stack-check' codegen option as deprecated (Issue #34915) Attempts to finish resolving issue #34915. Based on pull request #35156, which was closed due to inactivity.
2016-11-08Adding a deprecation warning for no-stack-check codegen option.karpinski-1/+6
2016-11-03Stabilize `..` in tuple (struct) patternsVadim Petrochenkov-1/+1
2016-10-30Replace all uses of SHA-256 with BLAKE2b.Michael Woerister-0/+1
2016-10-29Move `CrateConfig` from `Crate` to `ParseSess`.Jeffrey Seyfried-28/+17
2016-10-22Rename `loader.rs` -> `locator.rs`.Jeffrey Seyfried-3/+2
2016-10-15include LLVM version in `--version --verbose`Zack M. Davis-0/+4
This is in the matter of #28405.
2016-10-12Rollup merge of #37066 - nrc:stderr, r=alexcrichtonAlex Crichton-1/+1
Error monitor should emit error to stderr instead of stdout We are pretty consistent about emitting to stderr, except for when there is actually an error, in which case we emit to stdout. This seems a bit backwards. This PR just changes that exception to emit to stderr. This is useful for the RLS since the LS protocol uses stdout (grrr). r? @alexcrichton
2016-10-12Stabilise `?`Nick Cameron-1/+1
cc [`?` tracking issue](https://github.com/rust-lang/rust/issues/31436)
2016-10-10Error monitor should emit error to stderr instead of stdoutNick Cameron-1/+1
2016-09-30Change the sigs of set_print/set_panic to allow restoring the default objectsBrian Anderson-2/+2
2016-09-28Allow supplying an error destination via the compiler driverNick Cameron-19/+20
Allows replacing stderr with a buffer from the client. Also, some refactoring around run_compiler.
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.