about summary refs log tree commit diff
path: root/src/librustc_driver/test.rs
AgeCommit message (Collapse)AuthorLines
2015-11-26Use the TypeOrigin variants qualified.Ms2ger-2/+2
2015-11-18Update unit tests in driver.Niko Matsakis-2/+3
2015-11-10Rustfmting librustc_driver.Jose Narvaez-122/+103
2015-11-04Remove use of RefCell<DefMap> in resolve_lifetimeJonathan S-1/+1
2015-10-28Remove 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-09Misc fixupsNick Cameron-3/+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-1/+1
2015-09-22Use Names in HIR ItemsVadim Petrochenkov-1/+1
2015-09-14move middle::ty and related modules to middle/ty/Ariel Ben-Yehuda-1/+1
2015-09-03Add an intital HIR and lowering stepNick Cameron-13/+17
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-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-07-10Change some instances of .connect() to .join()Wesley Wiser-1/+1
2015-07-01Update librustc_driver/test.rsJared Roesch-1/+1
2015-06-28Fix librustc_driver/test.rsJared Roesch-1/+1
2015-06-26rustc: switch most remaining middle::ty functions to methods.Eduard Burtescu-10/+10
2015-06-26rustc: make ty::mk_* constructors into methods on ty::ctxt.Eduard Burtescu-37/+31
2015-06-26rustc: combine type-flag-checking traits and fns and into one trait.Eduard Burtescu-7/+7
2015-06-20Auto merge of #26417 - brson:feature-err, r=steveklabnikbors-0/+2
It now says '#[feature] may not be used on the stable release channel'. I had to convert this error from a lint to a normal compiler error. I left the lint previously-used for this in place since removing it is a breaking change. It will just go unused until the end of time. Fixes #24125
2015-06-18Make a better error message for using #[feature] on stable rustBrian Anderson-0/+2
It now says '#[feature] may not be used on the stable release channel'. I had to convert this error from a lint to a normal compiler error. I left the lint previously-used for this in place since removing it is a breaking change. It will just go unused until the end of time. Fixes #24125
2015-06-19rustc: remove Repr and UserString.Eduard Burtescu-35/+25
2015-06-19rustc: replace Repr/UserString impls with Debug/Display ones.Eduard Burtescu-7/+4
2015-06-19rustc: use the TLS type context in Repr and UserString.Eduard Burtescu-19/+19
2015-06-19rustc: use Repr and UserString instead of ppaux::ty_to_string.Eduard Burtescu-2/+2
2015-06-19rustc: enforce stack discipline on ty::ctxt.Eduard Burtescu-14/+16
2015-06-19rustc_resolve: don't require redundant arguments to resolve_crate.Eduard Burtescu-1/+1
2015-06-12Cleanup: rename middle::ty::sty and its variants.Eli Friedman-1/+1
Use camel-case naming, and use names which actually make sense in modern Rust.
2015-06-10syntax: move ast_map to librustc.Eduard Burtescu-1/+2
2015-05-14syntax: refactor (Span)Handler and ParseSess constructors to be methods.Eduard Burtescu-2/+2
2015-04-24fix rustc_driver testsNiko Matsakis-1/+3
2015-04-17Fix some missing casesNiko Matsakis-1/+6
2015-04-02Rollup merge of #23895 - nikomatsakis:fn-trait-inheritance-add-impls, r=pnkfelixManish Goregaokar-9/+9
The primary purpose of this PR is to add blanket impls for the `Fn` traits of the following (simplified) form: impl<F:Fn> Fn for &F impl<F:FnMut> FnMut for &mut F However, this wound up requiring two changes: 1. A slight hack so that `x()` where `x: &mut F` is translated to `FnMut::call_mut(&mut *x, ())` vs `FnMut::call_mut(&mut x, ())`. This is achieved by just autoderef'ing one time when calling something whose type is `&F` or `&mut F`. 2. Making the infinite recursion test in trait matching a bit more tailored. This involves adding a notion of "matching" types that looks to see if types are potentially unifiable (it's an approximation). The PR also includes various small refactorings to the inference code that are aimed at moving the unification and other code into a library (I've got that particular change in a branch, these changes just lead the way there by removing unnecessary dependencies between the compiler and the more general unification code). Note that per rust-lang/rfcs#1023, adding impls like these would be a breaking change in the future. cc @japaric cc @alexcrichton cc @aturon Fixes #23015.
2015-04-01Auto merge of #23109 - nikomatsakis:closure-region-hierarchy, r=pnkfelixbors-0/+1
Adjust internal treatment of the region hierarchy around closures. Work towards #3696. r? @pnkfelix
2015-04-01Implement the new region hierarchy rules, in which regions from distinctNiko Matsakis-0/+1
hierarchies are judged based on the lexical relationship of their respective fn bodies.
2015-03-31std: Remove #[old_orphan_check] from PartialEqAlex Crichton-6/+5
This is a deprecated attribute that is slated for removal, and it also affects all implementors of the trait. This commit removes the attribute and fixes up implementors accordingly. The primary implementation which was lost was the ability to compare `&[T]` and `Vec<T>` (in that order). This change also modifies the `assert_eq!` macro to not consider both directions of equality, only the one given in the left/right forms to the macro. This modification is motivated due to the fact that `&[T] == Vec<T>` no longer compiles, causing hundreds of errors in unit tests in the standard library (and likely throughout the community as well). cc #19470 [breaking-change]
2015-03-31Port over type inference to using the new type relation stuffNiko Matsakis-9/+9
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-64/+64
Now that support has been removed, all lingering use cases are renamed.
2015-03-02Use `const`s instead of `static`s where appropriateFlorian Zeitz-1/+1
This changes the type of some public constants/statics in libunicode. Notably some `&'static &'static [(char, char)]` have changed to `&'static [(char, char)]`. The regexp crate seems to be the sole user of these, yet this is technically a [breaking-change]
2015-02-28Separate most of rustc::lint::builtin into a separate crate.Huon Wilson-0/+2
This pulls out the implementations of most built-in lints into a separate crate, to reduce edit-compile-test iteration times with librustc_lint and increase parallelism. This should enable lints to be refactored, added and deleted much more easily as it slashes the edit-compile cycle to get a minimal working compiler to test with (`make rustc-stage1`) from librustc -> librustc_typeck -> ... -> librustc_driver -> libcore -> ... -> libstd to librustc_lint -> librustc_driver -> libcore -> ... libstd which is significantly faster, mainly due to avoiding the librustc build itself. The intention would be to move as much as possible of the infrastructure into the crate too, but the plumbing is deeply intertwined with librustc itself at the moment. Also, there are lints for which diagnostics are registered directly in the compiler code, not in their own crate traversal, and their definitions have to remain in librustc. This is a [breaking-change] for direct users of the compiler APIs: callers of `rustc::session::build_session` or `rustc::session::build_session_` need to manually call `rustc_lint::register_builtins` on their return value. This should make #22206 easier.
2015-02-24Use arrays instead of vectors in testsVadim Petrochenkov-5/+5
2015-02-22Fix test falloutsFlavio Percoco-1/+1
2015-02-18rollup merge of #22502: nikomatsakis/deprecate-bracket-bracketAlex Crichton-1/+1
Conflicts: src/libcollections/slice.rs src/libcollections/str.rs src/librustc/middle/lang_items.rs src/librustc_back/rpath.rs src/librustc_typeck/check/regionck.rs src/libstd/ffi/os_str.rs src/libsyntax/diagnostic.rs src/libsyntax/parse/parser.rs src/libsyntax/util/interner.rs src/test/run-pass/regions-refcell.rs
2015-02-18Replace all uses of `&foo[]` with `&foo[..]` en masse.Niko Matsakis-1/+1
2015-02-18Opt for .cloned() over .map(|x| x.clone()) etc.Kevin Butler-1/+1
2015-02-11Added DestructionScope variant to CodeExtent, representing the areaFelix S. Klock II-2/+2
immediately surrounding a node that is a terminating_scope (e.g. statements, looping forms) during which the destructors run (the destructors for temporaries from the execution of that node, that is). Introduced DestructionScopeData newtype wrapper around ast::NodeId, to preserve invariant that FreeRegion and ScopeChain::BlockScope carry destruction scopes (rather than arbitrary CodeExtents). Insert DestructionScope and block Remainder into enclosing CodeExtents hierarchy. Add more doc for DestructionScope, complete with ASCII art. Switch to constructing DestructionScope rather than Misc in a number of places, mostly related to `ty::ReFree` creation, and use destruction-scopes of node-ids at various calls to liberate_late_bound_regions. middle::resolve_lifetime: Map BlockScope to DestructionScope in `fn resolve_free_lifetime`. Add the InnermostDeclaringBlock and InnermostEnclosingExpr enums that are my attempt to clarify the region::Context structure, and that later commmts build upon. Improve the debug output for `CodeExtent` attached to `ty::Region::ReScope`. Loosened an assertion in `rustc_trans::trans::cleanup` to account for `DestructionScope`. (Perhaps this should just be switched entirely over to `DestructionScope`, rather than allowing for either `Misc` or `DestructionScope`.) ---- Even though the DestructionScope is new, this particular commit should not actually change the semantics of any current code.
2015-02-07Feature-gate #![no_std]Keegan McAllister-1/+1
Fixes #21833. [breaking-change]
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-1/+1
2015-02-04More test fixesManish Goregaokar-2/+1