summary refs log tree commit diff
path: root/src/librustc/util
AgeCommit message (Collapse)AuthorLines
2013-09-25Move the linearly-updated flag state into the Visitor.Felix S. Klock II-16/+18
2013-09-23librustc: Remove garbage-collected functions from util/common.Patrick Walton-12/+16
2013-09-16switch Drop to `&mut self`Daniel Micay-1/+1
2013-09-15debuginfo: Basic support for trait objects.Michael Woerister-1/+1
2013-09-04auto merge of #8875 : alexcrichton/rust/fix-inner-static-library-bug, r=huonwbors-1/+2
These commits fix bugs related to identically named statics in functions of implementations in various situations. The commit messages have most of the information about what bugs are being fixed and why. As a bonus, while I was messing around with name mangling, I improved the backtraces we'll get in gdb by removing `__extensions__` for the trait/type being implemented and by adding the method name as well. Yay!
2013-09-04stop treating char as an integer typeDaniel Micay-2/+2
Closes #7609
2013-09-03Modernized a few more types in syntax::astMarvin Löbel-24/+24
2013-09-02Remove __extensions__ in names for a "pretty name"Alex Crichton-1/+2
As with the previous commit, this is targeted at removing the possibility of collisions between statics. The main use case here is when there's a type-parametric function with an inner static that's compiled as a library. Before this commit, any impl would generate a path item of "__extensions__". This changes this identifier to be a "pretty name", which is either the last element of the path of the trait implemented or the last element of the type's path that's being implemented. That doesn't quite cut it though, so the (trait, type) pair is hashed and again used to append information to the symbol. Essentially, __extensions__ was removed for something nicer for debugging, and then some more information was added to symbol name by including a hash of the trait being implemented and type it's being implemented for. This should prevent colliding names for inner statics in regular functions with similar names.
2013-09-02Renamed syntax::ast::ident -> IdentMarvin Löbel-2/+2
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-7/+7
2013-08-27librustc: Remove `&const` and `*const` from the language.Patrick Walton-1/+0
They are still present as part of the borrow check.
2013-08-20auto merge of #8519 : msullivan/rust/objects, r=catamorphismbors-2/+12
r?
2013-08-19auto merge of #8623 : pnkfelix/rust/fsk-visitor-vpar-defaults-step4, r=nmatsakisbors-25/+32
Follow up to #8619 (step 3 of 5). (See #8527, which was step 1 of 5, for the full outline.) Part of #7081.
2013-08-19Make supertrait methods callable on object types.Michael Sullivan-2/+12
This requires changes to method search and to codegen. We now emit a vtable for objects that includes methods from all supertraits. Closes #4100. Also, actually populate the cache for vtables, and also key it by type so that it actually works.
2013-08-19Issue #3678: Remove wrappers and call foreign functions directlyNiko Matsakis-0/+12
2013-08-15port util/common.rs from oldvisit to <V:Visitor> trait API.Felix S. Klock II-25/+32
2013-08-11typeck: Modify method resolution to use new object adjustments, andNiko Matsakis-3/+2
to favor inherent methods over extension methods. The reason to favor inherent methods is that otherwise an impl like impl Foo for @Foo { fn method(&self) { self.method() } } causes infinite recursion. The current change to favor inherent methods is rather hacky; the method resolution code is in need of a refactoring.
2013-08-06auto merge of #8313 : msullivan/rust/cleanup, r=catamorphismbors-3/+7
2013-08-06Move EnumSet into libextraSangeun Kim-324/+4
2013-08-05Updated std::Option, std::Either and std::ResultMarvin Löbel-1/+1
- Made naming schemes consistent between Option, Result and Either - Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None) - Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-08-05Improve debug spew in _match.Michael Sullivan-3/+7
2013-08-04rm obsolete `for` support from the compilerDaniel Micay-2/+1
2013-08-03remove obsolete `foreach` keywordDaniel Micay-5/+5
this has been replaced by `for`
2013-08-03replace all remaining `for` with `foreach` or `do`Daniel Micay-4/+6
2013-08-02librustc: Introduce a new visitor type based on traits and port syntax to it.Patrick Walton-11/+11
This is preparation for removing `@fn`. This does *not* use default methods yet, because I don't know whether they work. If they do, a forthcoming PR will use them. This also changes the precedence of `as`.
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-5/+5
2013-07-29New naming convention for ast::{node_id, local_crate, crate_node_id, ↵Michael Woerister-3/+3
blk_check_mode, ty_field, ty_method}
2013-07-25auto merge of #8027 : ↵bors-13/+34
nikomatsakis/rust/issue-4846-multiple-lifetime-parameters-1, r=pcwalton Small step towards #4846. r? @msullivan
2013-07-25auto merge of #8015 : msullivan/rust/default-methods, r=nikomatsakisbors-7/+0
Lots of changes to vtable resolution, handling of super/self method calls in default methods. Fix a lot of trait inheritance bugs. r? @nikomatsakis
2013-07-24Generalize the `ty::substs` struct so that it can representNiko Matsakis-13/+34
multiple lifetime parameters, and not just one. Also add an option for erasing lifetimes, which makes trans code somewhat simpler and cleaner.
2013-07-24Change 'print(fmt!(...))' to printf!/printfln! in src/lib*Birunthan Mohanathas-2/+1
2013-07-23Major rework of how calls to self and super methods work.Michael Sullivan-7/+0
Eliminates method_super, method_self, and vtable_self, merging all of them into the param cases. Cloes #4396. Closes #7301.
2013-07-22De-spanned<T> and renamed ast::field (now ast::Field)Michael Woerister-3/+3
2013-07-22Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.Michael Woerister-4/+4
`crate => Crate` `local => Local` `blk => Block` `crate_num => CrateNum` `crate_cfg => CrateConfig` Also, Crate and Local are not wrapped in spanned<T> anymore.
2013-07-17librustc: Remove the `Copy` bound from the language.Patrick Walton-2/+0
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-2/+2
2013-07-12auto merge of #7725 : msullivan/rust/default-methods, r=pcwaltonbors-11/+7
r?
2013-07-11Clean up Repr impls a bit so we can add generic impls for @ and ~.Michael Sullivan-11/+7
2013-07-11Silence various warningsNiko Matsakis-1/+1
2013-07-11Port region inference code to use new graphNiko Matsakis-0/+6
2013-07-10Add an identifier to TypeParameterDefs and use it to pretty print type ↵Niko Matsakis-10/+11
parameters
2013-07-05Change signature of Iterator.size_hintKevin Ballard-3/+3
Remove the Option wrapper around the lower bound. None is semantically the same as Size(0), so there's no point in having a distinction.
2013-07-03auto merge of #7474 : Seldaek/rust/clean-iter, r=thestingerbors-10/+83
I think it's WIP - but I wanted to ask for feedback (/cc @thestinger) I had to move the impl of FromIter for vec into extra::iter because I don't think std can depend on extra, but that's a bit messed up. Similarly some FromIter uses are gone now, not sure if this is fixable or if I made a complete mess here..
2013-07-01Correct merge errors, broken testsNiko Matsakis-1/+1
2013-07-01Defer reasoning about region relationships until after regionck.Niko Matsakis-0/+19
This patch makes error handling for region inference failures more uniform by not reporting *any* region errors until the reigon inference step. This requires threading through more information about what caused a region constraint, so that we can still give informative error messages. I have only taken partial advantage of this information: when region inference fails, we still report the same error we always did, despite the fact that we now know precisely what caused the various constriants and what the region variable represents, which we did not know before. This change is required not only to improve error messages but because the region hierarchy is not in fact fully known until regionck, because it is not clear where closure bodies fit in (our current treatment is unsound). Moreover, the relationships between free variables cannot be fully determined until type inference is otherwise complete. cc #3238.
2013-07-01Move most iter functionality to extra, fixes #7343Jordi Boggiano-11/+10
2013-07-01Add an EnumSetIterator and EnumSet::iterJordi Boggiano-9/+83
2013-06-29Warning cleanupCorey Richardson-2/+0
2013-06-29Great renaming: propagate throughout the rest of the codebaseCorey Richardson-9/+5
2013-06-28librustc: Fix merge fallout and test cases.Patrick Walton-1/+3