about summary refs log tree commit diff
path: root/src/librustc/util
AgeCommit message (Collapse)AuthorLines
2013-05-13Remove re-exports from libcore/core.rcAlex Crichton-3/+3
Also fix up all the fallout elsewhere throughout core. It's really nice being able to have the prelude.
2013-05-10Fix merge "failures"Alex Crichton-0/+17
2013-05-09rustc: Add EnumSet testsNiko Matsakis-4/+149
2013-05-09Refactor representation of bounds to separate out BuiltinBounds intoNiko Matsakis-21/+159
its own type. Use a bitset to represent built-in bounds. There are several places in the language where only builtin bounds (aka kinds) will be accepted, e.g. on closures, destructor type parameters perhaps, and on trait types.
2013-05-05Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freezeNiko Matsakis-18/+0
Conflicts: src/libcore/core.rc src/libcore/hashmap.rs src/libcore/num/f32.rs src/libcore/num/f64.rs src/libcore/num/float.rs src/libcore/num/int-template.rs src/libcore/num/num.rs src/libcore/num/strconv.rs src/libcore/num/uint-template.rs src/libcore/ops.rs src/libcore/os.rs src/libcore/prelude.rs src/libcore/rt/mod.rs src/libcore/unstable/lang.rs src/librustc/driver/session.rs src/librustc/middle/astencode.rs src/librustc/middle/borrowck/check_loans.rs src/librustc/middle/borrowck/gather_loans.rs src/librustc/middle/borrowck/loan.rs src/librustc/middle/borrowck/preserve.rs src/librustc/middle/liveness.rs src/librustc/middle/mem_categorization.rs src/librustc/middle/region.rs src/librustc/middle/trans/base.rs src/librustc/middle/trans/inline.rs src/librustc/middle/trans/reachable.rs src/librustc/middle/typeck/check/_match.rs src/librustc/middle/typeck/check/regionck.rs src/librustc/util/ppaux.rs src/libstd/arena.rs src/libstd/ebml.rs src/libstd/json.rs src/libstd/serialize.rs src/libstd/std.rc src/libsyntax/ast_map.rs src/libsyntax/parse/parser.rs src/test/compile-fail/borrowck-uniq-via-box.rs src/test/compile-fail/regions-infer-borrow-scope-within-loop.rs src/test/run-pass/borrowck-nested-calls.rs
2013-05-02Remove 'Local Variable' commentsBrendan Zabarauskas-18/+0
2013-04-30allover: numerous unused muts etcNiko Matsakis-1/+2
2013-04-30new borrow checker (mass squash)Niko Matsakis-1/+16
2013-04-29librustc: Remove the concept of modes from the compiler.Patrick Walton-28/+13
This commit does not remove `ty::arg`, although that should be possible to do now.
2013-04-27only use #[no_core] in libcoreDaniel Micay-8/+0
2013-04-19rustc: de-mode + fallout from libsyntax changesAlex Crichton-7/+7
2013-04-17Allow casting to mutable trait objects.Josh Matthews-7/+11
2013-04-10Issue #5656: Make &self not mean "&'self self"Niko Matsakis-0/+6
Fixes #5656. Fixes #5541.
2013-04-10Reason about nested free variables that appear in a functionNiko Matsakis-18/+21
signature. In a nutshell, the idea is to (1) report an error if, for a region pointer `'a T`, the lifetime `'a` is longer than any lifetimes that appear in `T` (in other words, if a borrowed pointer outlives any portion of its contents) and then (2) use this to assume that in a function like `fn(self: &'a &'b T)`, the relationship `'a <= 'b` holds. This is needed for #5656. Fixes #5728.
2013-04-09Cleanup substitutions and treatment of generics around traits in a number of ↵Niko Matsakis-14/+264
ways. - In a TraitRef, use the self type consistently to refer to the Self type: - trait ref in `impl Trait<A,B,C> for S` has a self type of `S`. - trait ref in `A:Trait` has the self type `A` - trait ref associated with a trait decl has self type `Self` - trait ref associated with a supertype has self type `Self` - trait ref in an object type `@Trait` has no self type - Rewrite `each_bound_traits_and_supertraits` to perform substitutions as it goes, and thus yield a series of trait refs that are always in the same 'namespace' as the type parameter bound given as input. Before, we left this to the caller, but this doesn't work because the caller lacks adequare information to perform the type substitutions correctly. - For provided methods, substitute the generics involved in the provided method correctly. - Introduce TypeParameterDef, which tracks the bounds declared on a type parameter and brings them together with the def_id and (in the future) other information (maybe even the parameter's name!). - Introduce Subst trait, which helps to cleanup a lot of the repetitive code involved with doing type substitution. - Introduce Repr trait, which makes debug printouts far more convenient. Fixes #4183. Needed for #5656.
2013-04-06librustc: use new `[ty, .. len]` syntax for fixed vector errors.Huon Wilson-1/+1
2013-04-05Refactor so that references to traits are not represented using a type with aNiko Matsakis-1/+6
bare function store (which is not in fact a kind of value) but rather ty::TraitRef. Removes many uses of fail!() and other telltale signs of type-semantic mismatch. cc #4183 (not a fix, but related)
2013-04-05Rather than storing a list of ty::method per trait, store one ty::methodNiko Matsakis-1/+1
per method and list of def-ids per trait.
2013-04-03rename Linear{Map,Set} => Hash{Map,Set}Daniel Micay-2/+2
2013-04-03hashmap: rm linear namespaceDaniel Micay-1/+1
2013-03-29Add AbiSet and integrate it into the AST.Niko Matsakis-6/+6
I believe this patch incorporates all expected syntax changes from extern function reform (#3678). You can now write things like: extern "<abi>" fn foo(s: S) -> T { ... } extern "<abi>" mod { ... } extern "<abi>" fn(S) -> T The ABI for foreign functions is taken from this syntax (rather than from an annotation). We support the full ABI specification I described on the mailing list. The correct ABI is chosen based on the target architecture. Calls by pointer to C functions are not yet supported, and the Rust type of crust fns is still *u8.
2013-03-28Removing unused importsAlex Crichton-2/+2
2013-03-26Move ast_map::map to LinearMapAlex Crichton-7/+7
2013-03-26rustc: Remove uses of oldmap::HashMapAlex Crichton-4/+2
2013-03-21auto merge of #5466 : Kimundi/rust/view-slice-rename, r=bstriebors-1/+1
A slice now always refers to something that returns an borrowed pointer, views don't exist anymore. If you want to have an explictit copy of a slice, use `to_owned()`
2013-03-21auto merge of #5470 : sanxiyn/rust/remove-oldmap-2, r=sanxiynbors-0/+10
Referencing #4986.
2013-03-21back-renamed slice_DBG_BRWD, slice_V_DBG_BRWD -> slice, slice_DBG_UNIQ -> ↵Marvin Löbel-1/+1
slice_unique
2013-03-21Move the function to time passes to utilSeo Sanghyeon-0/+10
2013-03-21renamed str::view -> slice_DBG_BRWDMarvin Löbel-1/+1
renamed str::slice -> slice_DBG_UNIQ changed vec slice method -> to_owned() renamed vec view method -> slice_V_DBG_BRWD
2013-03-20Refactor the self-info so that the def-id is carried in ty_self()Niko Matsakis-1/+1
and the fn_ctxt doesn't need any self_info field at all. Step towards fixing `fn(&self)` (cc #4846) to have a distinct lifetime.
2013-03-20rustc: Remove some bad copies throughoutAlex Crichton-10/+10
2013-03-18libsyntax: Stop parsing old lifetimes, except for the ones on data type ↵Patrick Walton-22/+21
declarations.
2013-03-13librustc: Separate out trait storage from evec/estr storagePatrick Walton-2/+11
2013-03-11librustc: Replace all uses of `fn()` with `&fn()`. rs=defunPatrick Walton-1/+1
2013-03-07librustc: Remove structural record types from the compilerPatrick Walton-7/+2
2013-03-04Remove unused imports throughout src/Alex Crichton-8/+0
2013-03-02librustc: Remove `fn@`, `fn~`, and `fn&` from librustc. rs=defunPatrick Walton-2/+2
2013-02-28Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-1/+4
2013-02-27Turn old `drop` blocks into `Drop` traitsBen Striegel-1/+4
2013-02-27Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-7/+7
2013-02-25libsyntax: progress on making syntax::visit vecs_implicitly_copyable-freeErick Tryzelaar-5/+5
2013-02-23Fix slice printingoncemoreification-3/+1
2013-02-22Fix vector syntax in error messagesoncemoreification-6/+8
2013-02-19librustc: change driver::session::Session::str_of to return @~strErick Tryzelaar-3/+4
2013-02-15librustc: Get rid of `move`.Luqman Aden-1/+1
2013-02-07Make ~fn non-copyable, make &fn copyable, split barefn/closure types,Niko Matsakis-74/+85
correct handling of moves for struct-record update. Part of #3678. Fixes #2828, #3904, #4719.
2013-02-05oldmap: use &K instead of K in find and getPatrick Walton-3/+3
This reverts commit a4250a96fdf61142a9c8dbb6d37ae8435c99e396. This is not the cause of the nonexhaustive-match failure.
2013-02-05Revert "oldmap: use &K instead of K in find and get"Graydon Hoare-3/+3
This reverts commit 8e643525d4e5bca993dada43615916c382a0645b.
2013-02-03oldmap: use &K instead of K in find and getDaniel Micay-3/+3
2013-02-03rename map -> oldmap and mark it as deprecatedDaniel Micay-2/+2
LinearMap is quite a bit faster, and is fully owned/sendable without requiring copies. The older std::map also doesn't use explicit self and relies on mutable fields.