summary refs log tree commit diff
path: root/src/librustc/util
AgeCommit message (Collapse)AuthorLines
2015-08-11Stabilize the Duration APISteven Fackler-2/+2
This commit stabilizes the `std::time` module and the `Duration` type. `Duration::span` remains unstable, and the `Display` implementation for `Duration` has been removed as it is still being reworked and all trait implementations for stable types are de facto stable. This is a [breaking-change] to those using `Duration`'s `Display` implementation. Conflicts: src/librustc/lib.rs src/libstd/time/duration.rs
2015-07-27std: Deprecate a number of unstable featuresAlex Crichton-1/+2
Many of these have long since reached their stage of being obsolete, so this commit starts the removal process for all of them. The unstable features that were deprecated are: * cmp_partial * fs_time * hash_default * int_slice * iter_min_max * iter_reset_fuse * iter_to_vec * map_in_place * move_from * owned_ascii_ext * page_size * read_and_zero * scan_state * slice_chars * slice_position_elem * subslice_offset
2015-07-24Unify the upvar variables found in closures with the actual types of theNiko Matsakis-14/+24
upvars after analysis is done. Remove the `closure_upvars` helper and just consult this list of type variables directly.
2015-07-24Introduce ClosureSubsts rather than just having random fields in theNiko Matsakis-2/+5
TyClosure variant; thread this through wherever closure substitutions are expected, which leads to a net simplification. Simplify trans treatment of closures in particular.
2015-07-24introduce a Vec<Ty> to TyClosure for storing upvar typesNiko Matsakis-1/+1
2015-07-14Transition to the new object lifetime defaults, replacing the oldNiko Matsakis-4/+0
defaults completely.
2015-07-12Auto merge of #26895 - jroesch:modernize-typeck-names, r=nikomatsakisbors-2/+2
This PR modernizes some names in the type checker. The only remaining snake_case name in ty.rs is `ctxt` which should be resolved by @eddyb's pending refactor. We can bike shed over the names, it would just be nice to bring the type checker inline with modern Rust. r? @eddyb cc @nikomatsakis
2015-07-10Rename TypeWithMutability to TypeAndMutJared Roesch-2/+2
2015-07-08Remove snake_case names from ty.rsJared Roesch-2/+2
2015-07-08Report memory use in time-passes on WindowsPeter Atashian-5/+40
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-07-04rustc: simplify ty::MethodOrigin and avoid trait item indices.Eduard Burtescu-29/+0
2015-07-04rustc: remove unused MethodStaticClosure variant of MethodOrigin.Eduard Burtescu-3/+0
2015-07-03Fix some merge conflictsNiko Matsakis-9/+10
2015-07-03Add a boolean flag to ExistentialBounds tracking whether theNiko Matsakis-0/+4
region-bound is expected to change in Rust 1.3, but don't use it for anything in this commit. Note that this is not a "significant" part of the type (it's not part of the formal model) so we have to normalize this away or trans starts to get confused because two equal types wind up with distinct LLVM types.
2015-07-02Auto merge of #26722 - arielb1:log-deadlock, r=eddybbors-2/+9
These are RefCell deadlocks that cause the rustc task to die with the stderr lock held, causing a real deadlock. Fixes #26717. r? @eddyb
2015-07-02Report memory use in time-passesNick Cameron-2/+38
Reports the resident set size after each pass (linux-only).
2015-07-01Fix deadlocks with RUST_LOG=rustc::middle::tyAriel Ben-Yehuda-2/+9
These are RefCell deadlocks that cause the rustc task to die with the stderr lock held, causing a real deadlock. Fixes #26717.
2015-06-27Begin refactor type checking stateJared Roesch-1/+1
This first patch starts by moving around pieces of state related to type checking. The goal is to slowly unify the type checking state into a single typing context. This initial patch moves the ParameterEnvironment into the InferCtxt and moves shared tables from Inherited and ty::ctxt into their own struct Tables. This is the foundational work to refactoring the type checker to enable future evolution of the language and tooling.
2015-06-26rustc: switch most remaining middle::ty functions to methods.Eduard Burtescu-6/+6
2015-06-26rustc: move some functions in middle::ty working on Ty to methods.Eduard Burtescu-1/+1
2015-06-26rustc: combine type-flag-checking traits and fns and into one trait.Eduard Burtescu-3/+2
2015-06-23Remove the mostly unecessary ParamBounds structJared Roesch-33/+0
2015-06-19rustc: remove Repr and UserString.Eduard Burtescu-26/+4
2015-06-19rustc: replace Repr/UserString impls with Debug/Display ones.Eduard Burtescu-982/+476
2015-06-19Move AST Repr impls to Debug impls in libsyntax.Eduard Burtescu-42/+12
2015-06-19rustc: remove some unused UserString and Repr impls.Eduard Burtescu-26/+1
2015-06-19rustc: use the TLS type context in Repr and UserString.Eduard Burtescu-513/+571
2015-06-19rustc: leave only one free top-level function in ppaux, and private.Eduard Burtescu-352/+193
2015-06-19rustc: use Repr and UserString instead of ppaux::ty_to_string.Eduard Burtescu-13/+19
2015-06-19rustc: reduce ppaux's public footprint to 5 functions.Eduard Burtescu-103/+67
2015-06-12Split TyArray into TyArray and TySlice.Eli Friedman-6/+5
Arrays and slices are closely related, but not that closely; making the separation more explicit is generally more clear.
2015-06-12Cleanup: rename middle::ty::sty and its variants.Eli Friedman-26/+26
Use camel-case naming, and use names which actually make sense in modern Rust.
2015-06-10Removed many pointless calls to *iter() and iter_mut()Joshua Landau-5/+5
2015-06-10Auto merge of #26141 - eddyb:ast_map, r=nikomatsakisbors-1/+1
Gets libsyntax one step closer to running on stable (see #24518). Closes #24757, erickt's previous attempt at this.
2015-06-10syntax: move ast_map to librustc.Eduard Burtescu-1/+1
2015-06-08Skip useless recursion in freshening and late-bound-region substitutioAriel Ben-Yehuda-2/+2
Before: 581.72user 4.75system 7:42.74elapsed 126%CPU (0avgtext+0avgdata 1176224maxresident)k llvm took 359.183 After: 550.63user 5.09system 7:20.28elapsed 126%CPU (0avgtext+0avgdata 1165516maxresident)k llvm took 354.801
2015-06-08review changes - only show closure ids in verbose modeNick Cameron-3/+14
2015-06-08Tidying up, fix some minor linkage bugs, use ty flags to avoid caching ↵Nick Cameron-5/+8
closure types.
2015-06-02Auto merge of #25868 - alexcrichton:issue-25505, r=brsonbors-12/+29
The compiler already has special support for fixing up verbatim paths with disks on Windows to something that can be correctly passed down to gcc, and this commit adds support for verbatim UNC paths as well. Closes #25505
2015-05-28rustc: Fixup verbatim UNC paths as well on WindowsAlex Crichton-12/+29
The compiler already has special support for fixing up verbatim paths with disks on Windows to something that can be correctly passed down to gcc, and this commit adds support for verbatim UNC paths as well. Closes #25505
2015-05-26Implement defaults for associated typesAriel Ben-Yehuda-1/+1
2015-05-15Don't use <Duration as Display>::display() in time passesNick Cameron-4/+9
2015-05-14Auto merge of #24920 - alexcrichton:duration, r=aturonbors-2/+2
This commit is an implementation of [RFC 1040][rfc] which is a redesign of the currently-unstable `Duration` type. The API of the type has been scaled back to be more conservative and it also no longer supports negative durations. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1040-duration-reform.md The inner `duration` module of the `time` module has now been hidden (as `Duration` is reexported) and the feature name for this type has changed from `std_misc` to `duration`. All APIs accepting durations have also been audited to take a more flavorful feature name instead of `std_misc`. Closes #24874
2015-05-13std: Redesign Duration, implementing RFC 1040Alex Crichton-2/+2
This commit is an implementation of [RFC 1040][rfc] which is a redesign of the currently-unstable `Duration` type. The API of the type has been scaled back to be more conservative and it also no longer supports negative durations. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1040-duration-reform.md The inner `duration` module of the `time` module has now been hidden (as `Duration` is reexported) and the feature name for this type has changed from `std_misc` to `duration`. All APIs accepting durations have also been audited to take a more flavorful feature name instead of `std_misc`. Closes #24874
2015-05-12Create a FreshFloatTy separate from FreshIntTyAriel Ben-Yehuda-1/+2
There is no subtyping relationship between the types (or their non-freshened variants), so they can not be merged. Fixes #22645 Fixes #24352 Fixes #23825 Should fix #25235 (no test in issue). Should fix #19976 (test is outdated).
2015-05-11Auto merge of #25085 - carols10cents:remove-old-tilde, r=steveklabnikbors-1/+1
There were still some mentions of `~[T]` and `~T`, mostly in comments and debugging statements. I tried to do my best to preserve meaning, but I might have gotten some wrong-- I'm happy to fix anything :)
2015-05-05rustc: Fix more verbatim paths leaking to gccAlex Crichton-0/+38
Turns out that a verbatim path was leaking through to gcc via the PATH environment variable (pointing to the bundled gcc provided by the main distribution) which was wreaking havoc when gcc itself was run. The fix here is to just stop passing verbatim paths down by adding more liberal uses of `fix_windows_verbatim_for_gcc`. Closes #25072
2015-05-03Update old uses of ~ in comments and debugging statementsCarol Nichols-1/+1
2015-04-30Stop using Rc in TraitRef and TraitDefAriel Ben-Yehuda-1/+1
The former stopped making sense when we started interning substs and made TraitRef a 2-word copy type, and I'm moving the latter into an arena as they live as long as the type context.
2015-04-23Structural changes for associated constantsSean Patrick Santos-1/+32
Introduces new variants and types in syntax::ast, middle::ty, and middle::def.