summary refs log tree commit diff
path: root/src/librustc_driver
AgeCommit message (Collapse)AuthorLines
2015-11-21backport: Fix hygiene regression in patternsVadim Petrochenkov-1/+2
2015-11-04Remove contraction. The contraction rules predated the notion of anNiko Matsakis-10/+14
empty region, and they complicate region inference to no particular end. They also lead in some cases to spurious errors like #29048 (though in some cases these errors are helpful in tracking down missing constraints).
2015-10-26Disable MIR on beta/stable until we've resolved #29227 is resolved.Niko Matsakis-3/+13
2015-10-22fix bug in hir,identifiedNiko Matsakis-1/+1
2015-10-21save-analysis: don't recompute crate nameNick Cameron-9/+13
2015-10-09review commentsNick Cameron-16/+16
2015-10-09Misc fixupsNick Cameron-5/+6
2015-10-09Cache ids between lowering runsNick Cameron-7/+5
So that lowering is reproducible
2015-10-09Move `for` loop desugaring to loweringNick Cameron-46/+46
2015-10-09Add a lowering contextNick Cameron-8/+21
2015-10-08Rollup merge of #28872 - iwillspeak:master, r=ManishearthSteve Klabnik-1/+6
Currently the explain command line flag requires full error codes, complete with the leading zeros and the E at the beginning. This commit changes that, if you don't supply a full error code then the error number is padded out to the required size and the E is added to the beginning. This means that where previously you would need to write E0001, you can now write 0001, 001, 01 or just 1 to refer to the same error.
2015-10-07Make `--explain` Handle Partial Error CodesWill Speak-1/+6
Currently the explain command requires full erorr codes, complete with the leading zeros and the E at the beginning. This commit changes that, if you don't supply a full erorr code then the error number is padded out to the required size and the E is added to the beginning. This means that where previously you would need to write E0001, you can now write 0001, 001, 01 or jsut 1 to refer to the same error.
2015-10-06rename `dump` to `mir_map`, which seems more suitableNiko Matsakis-1/+1
2015-10-06make mir map available to later passes (currently unused)Niko Matsakis-2/+3
2015-10-04do MIR construction after pattern evaluation for now to sidestepNiko Matsakis-3/+3
various annoying edge cases
2015-10-02Auto merge of #28650 - sanxiyn:attr-usage, r=nrcbors-0/+4
This is technically a [breaking-change]. Fix #2809. Fix #22746.
2015-10-02Auto merge of #28768 - alexcrichton:dep-info++, r=brsonbors-34/+31
This PR closes out #28716 and #28735 by making two changes to the compiler: 1. The `--emit` flag to the compiler now supports the ability to specify the output file name of a partuclar emit type. For example `--emit dep-info=bar.d,asm=foo.s,link` is now accepted. 2. The dep-info emission now emits a dummy target for all input file names to protect against deleted files.
2015-10-02rustc: Emit phony targets for inputs in dep-infoAlex Crichton-1/+8
This helps protect against files being deleted to ensure that `make` won't emit errors. Closes #28735
2015-10-03Check attribute usageSeo Sanghyeon-0/+4
2015-10-01move direct accesses of `node` to go through `as_local_node_id`, unlessNiko Matsakis-1/+1
they are being used as an opaque "position identifier"
2015-10-01move job of creating local-def-ids to ast-map (with a few stragglers)Niko Matsakis-2/+2
2015-09-30rustc: Support output filenames for each emit typeAlex Crichton-33/+23
Currently the compiler supports the ability to emit multiple output types as part of one compilation (e.g. asm, LLVM IR, bytecode, link, dep-info, etc). It does not, however, support the ability to customize the output filename for each of these output types. The `-o` flag is ignored if multiple emit types are specified (and the compiler emits a warning about this). Normally this doesn't matter too much, but in the case of `dep-info` it can lead to a number of problems (e.g. see #28716). By allowing customization of the output filename for each emit type we're able to solve the problems in that issue. This commit adds support for the `--emit` option to the compiler to look like: rustc foo.rs --emit dep-info=.deps/foo.d,link This indicates that the `dep-info` output type will be placed at `.deps/foo.d` and the `link` output type will otherwise be determined via the `--out-dir` and `-o` flags. Closes #28716
2015-09-24Cleanup interfaces of Name, SyntaxContext and IdentVadim Petrochenkov-1/+1
Make sure Name, SyntaxContext and Ident are passed by value Make sure Idents don't serve as keys (or parts of keys) in maps, Ident comparison is not well defined
2015-09-23Remove random Idents outside of libsyntaxVadim Petrochenkov-2/+1
2015-09-22Use Names in HIR ItemsVadim Petrochenkov-1/+1
2015-09-17Auto merge of #28454 - GSam:master, r=nrcbors-1/+3
This is so that the resolution results can be used after analysis, potentially for tool support
2015-09-17Add compiler option to keep mtwt tablesGarming Sam-1/+3
This is so that the resolution results can be used after analysis, potentially for tool support
2015-09-17Change to a multi-trait approachNick Cameron-3/+6
[breaking-change] for lint authors You must now implement LateLintPass or EarlyLintPass as well as LintPass and use either register_late_lint_pass or register_early_lint_pass, rather than register_lint_pass.
2015-09-17Changes to testsNick Cameron-4/+3
2015-09-17Add an early lint pass for lints that operate on the ASTNick Cameron-8/+6
There is a minor [breaking-change] for lint authors - some functions which were previously defined on `lint::Context` have moved to a trait - `LintContext`, you may need to import that trait to avoid name resolution errors.
2015-09-16Use ast attributes every where (remove HIR attributes).Nick Cameron-0/+1
This could be a [breaking-change] if your lint or syntax extension (is that even possible?) uses HIR attributes or literals.
2015-09-14move middle::ty and related modules to middle/ty/Ariel Ben-Yehuda-1/+1
2015-09-06add MIR crate and link it into the driverNiko Matsakis-0/+5
2015-09-03Move lints to HIRManish Goregaokar-1/+1
2015-09-03Add an intital HIR and lowering stepNick Cameron-101/+273
2015-08-25Respect `--color` when printing early errorsBarosl Lee-13/+16
Currently, `early_error` and `early_warn` in `librustc::session` always use `ColorConfig::Auto`. Modify them to follow the color configuration set by the `--color` option. As colored output is also printed during the early stage, parsing the `--color` option should be done as early as possible. However, there are still some cases when the output needs to be colored before knowing the exact color settings. In these cases, it will be defaulted to `ColorConfig::Auto`, which is the same as before. Fixes #27879.
2015-08-24fix other testAriel Ben-Yehuda-3/+5
2015-08-24Use a Vec instead of an HashMap for the scope hierarchyAriel Ben-Yehuda-18/+28
This increases regionck performance greatly - type-checking on librustc decreased from 9.1s to 8.1s. Because of Amdahl's law, total performance is improved only by about 1.5% (LLVM wizards, this is your opportunity to shine!). before: 576.91user 4.26system 7:42.36elapsed 125%CPU (0avgtext+0avgdata 1142192maxresident)k after: 566.50user 4.84system 7:36.84elapsed 125%CPU (0avgtext+0avgdata 1124304maxresident)k I am somewhat worried really need to find out why we have this Red Queen's Race going on here. Originally I suspected it may be a problem from RFC1214's warnings, but it seems to be an effect from other changes. However, the increase seems to be mostly in LLVM's time, so I guess it's the LLVM wizards' problem.
2015-08-21Add a `allow_asm` option so virtual ISA based targets (JS/PNaCl/WAsm) can ↵Richard Diamond-0/+3
disallow the asm! macro.
2015-08-17Add some SIMD target_feature cfg's when appropriate.Huon Wilson-1/+101
NB. this may not be 100% perfect.
2015-08-17feature gate `cfg(target_feature)`.Huon Wilson-3/+16
This is theoretically a breaking change, but GitHub search turns up no uses of it, and most non-built-in cfg's are passed via cargo features, which look like `feature = "..."`, and hence can't overlap.
2015-08-15Add issue for the rustc_private feature everywhereAlex Crichton-1/+1
2015-08-14rustc: Allow changing the default allocatorAlex Crichton-84/+82
This commit is an implementation of [RFC 1183][rfc] which allows swapping out the default allocator on nightly Rust. No new stable surface area should be added as a part of this commit. [rfc]: https://github.com/rust-lang/rfcs/pull/1183 Two new attributes have been added to the compiler: * `#![needs_allocator]` - this is used by liballoc (and likely only liballoc) to indicate that it requires an allocator crate to be in scope. * `#![allocator]` - this is a indicator that the crate is an allocator which can satisfy the `needs_allocator` attribute above. The ABI of the allocator crate is defined to be a set of symbols that implement the standard Rust allocation/deallocation functions. The symbols are not currently checked for exhaustiveness or typechecked. There are also a number of restrictions on these crates: * An allocator crate cannot transitively depend on a crate that is flagged as needing an allocator (e.g. allocator crates can't depend on liballoc). * There can only be one explicitly linked allocator in a final image. * If no allocator is explicitly requested one will be injected on behalf of the compiler. Binaries and Rust dylibs will use jemalloc by default where available and staticlibs/other dylibs will use the system allocator by default. Two allocators are provided by the distribution by default, `alloc_system` and `alloc_jemalloc` which operate as advertised. Closes #27389
2015-08-09Use https URLs to refer to rust-lang.org where appropriate.Eli Friedman-2/+2
Also fixes a few outdated links.
2015-08-05Auto merge of #27458 - mitaa:local_cpath, r=nikomatsakisbors-2/+2
This changes the current behaviour for two cases (that I know of) ```rust mod foo { extern crate bar; } // `bar::` changes to `foo::bar::` ``` ```rust extern crate bar as quux; // `bar::` changes to `quux::` ``` For example: ```rust mod foo { extern crate core; } fn assert_clone<T>() where T : Clone { } fn main() { assert_clone::<foo::core::atomic::AtomicBool>(); // error: the trait `core::clone::Clone` is not implemented for the type `core::atomic::AtomicBool` [E0277] // changes to // error: the trait `foo::core::clone::Clone` is not implemented for the type `foo::core::atomic::AtomicBool` [E0277] } ``` Notably the following test case broke: ```rust #[bench] fn bar(x: isize) { } //~^ ERROR mismatched types //~| expected `fn(&mut test::Bencher)` // changed to //~| expected `fn(&mut __test::test::Bencher)` ``` If a crate is linked multiple times the path with the least segments is stored. Partially addresses #1920. (this doesn't solve the issue raised about re-exports) r? @nikomatsakis
2015-08-03syntax: Implement #![no_core]Alex Crichton-1/+1
This commit is an implementation of [RFC 1184][rfc] which tweaks the behavior of the `#![no_std]` attribute and adds a new `#![no_core]` attribute. The `#![no_std]` attribute now injects `extern crate core` at the top of the crate as well as the libcore prelude into all modules (in the same manner as the standard library's prelude). The `#![no_core]` attribute disables both std and core injection. [rfc]: https://github.com/rust-lang/rfcs/pull/1184
2015-08-01Split off `LocalCrateReader` from `CrateReader`mitaa-2/+2
2015-07-30Rename the unstable option `--xpretty` to `--unpretty`Felix S. Klock II-3/+3
(Inspired by discussion with Gankro.)
2015-07-16Fixup #27046 with pattern bindingsManish Goregaokar-12/+12
2015-07-16Rollup merge of #27046 - nrc:driver-defaults, r=alexcrichtonManish Goregaokar-3/+9