about summary refs log tree commit diff
path: root/src/librustc/metadata
AgeCommit message (Collapse)AuthorLines
2013-04-12auto merge of #5827 : ↵bors-4/+5
nikomatsakis/rust/issue-5656-change-meaning-of-borrowed-self, r=pcwalton See #5656 for details. r? @pcwalton
2013-04-11auto merge of #5811 : sanxiyn/rust/parse-uint, r=catamorphismbors-8/+8
It does not handle signs.
2013-04-10FIX meta_section_name for macosILyoan-1/+12
2013-04-10auto merge of #5709 : jbclements/rust/miscellaneous-cleanup, r=jbclementsbors-2/+2
There's no unifying theme here; I'm just trying to clear a bunch of small commits: removing dead code, adding comments, renaming to an upper-case type, fixing one test case.
2013-04-10path -> PathJohn Clements-2/+2
2013-04-10Reason about nested free variables that appear in a functionNiko Matsakis-4/+5
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-10Revert map.each to something which takes two parametersNiko Matsakis-1/+1
rather than a tuple. The current setup iterates over `BaseIter<(&'self K, &'self V)>` where 'self is a lifetime declared *in the each method*. You can't place such a type in the impl declaration. The compiler currently allows it, but this will not be legal under #5656 and I'm pretty sure it's not sound now.
2013-04-10Rename tydecode::parse_int to parse_uintSeo Sanghyeon-8/+8
It does not handle signs.
2013-04-09Cleanup substitutions and treatment of generics around traits in a number of ↵Niko Matsakis-39/+55
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-05Refactor so that references to traits are not represented using a type with aNiko Matsakis-42/+112
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-05Add a (currently unused) "transformed self type" pointer into ty::methodNiko Matsakis-2/+30
2013-04-05Compute a ty::method for methods that appear in impls as wellNiko Matsakis-42/+28
2013-04-05Rather than storing a list of ty::method per trait, store one ty::methodNiko Matsakis-146/+172
per method and list of def-ids per trait.
2013-04-03rename Linear{Map,Set} => Hash{Map,Set}Daniel Micay-17/+17
2013-04-03hashmap: rm linear namespaceDaniel Micay-4/+4
2013-03-31Fix warningsBrian Anderson-1/+0
2013-03-29Add AbiSet and integrate it into the AST.Niko Matsakis-23/+43
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-29librustc: Remove `fail_unless!`Patrick Walton-28/+28
2013-03-28Removing unused importsAlex Crichton-8/+7
2013-03-28librustc: Remove common fields and nested enums from the languagePatrick Walton-2/+1
2013-03-27auto merge of #5558 : nikomatsakis/rust/issue-4920-autoref-index-operator, ↵bors-4/+0
r=nikomatsakis Per discussion on IRC. r? @pcwalton
2013-03-27Fix pretty-printer test failure by carrying the bound lifetime names throughNiko Matsakis-1/+4
the types. Initially I thought it would be necessary to thread this data through not only the AST but the types themselves, but then I remembered that the pretty printer only cares about the AST. Regardless, I have elected to leave the changes to the types intact since they will eventually be needed. I left a few FIXMEs where it didn't seem worth finishing up since the code wasn't crucial yet.
2013-03-27remove sty_by_ref, though traces still remain due to dtorsNiko Matsakis-4/+0
2013-03-26librustc: Modify all code to use new lifetime binder syntaxPatrick Walton-4/+5
2013-03-26option: rm functions that duplicate methodsDaniel Micay-3/+2
2013-03-26Move ast_map::map to LinearMapAlex Crichton-2/+2
2013-03-26rustc: Purge of HashMap, fixing segfaulting casesAlex Crichton-1/+1
Various FIXME comments added around to denote copies which when removed cause the compiler to segfault at some point before stage2. None of these copies should even be necessary.
2013-03-26rustc: Remove uses of oldmap::HashMapAlex Crichton-68/+62
2013-03-26Switched over a bunch of splitting funktions to non-allocating iteratorsMarvin Löbel-1/+3
2013-03-23make crates with the same name sort consistentlyDaniel Micay-5/+9
2013-03-22librustc: Remove the `const` declaration form everywherePatrick Walton-62/+62
2013-03-22librustc: Remove `pure` from libsyntax and librustc.Patrick Walton-1/+1
2013-03-22rustc: replace uses of old deriving attribute with new oneAndrew Paseltiner-1/+1
2013-03-21librustc: Forbid access to cross-crate private static methodsPatrick Walton-13/+16
2013-03-21back-renamed slice_DBG_BRWD, slice_V_DBG_BRWD -> slice, slice_DBG_UNIQ -> ↵Marvin Löbel-1/+1
slice_unique
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-2/+5
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-20auto merge of #5443 : alexcrichton/rust/less-bad-copy, r=catamorphismbors-8/+8
Removes a lot of instances of `/*bad*/ copy` throughout libsyntax/librustc. On the plus side, this shaves about 2s off of the runtime when compiling `librustc` with optimizations. Ideally I would have run a profiler to figure out which copies are the most critical to remove, but in reality there was a liberal amount of `git grep`s along with some spot checking and removing the easy ones.
2013-03-20rustc: Remove some bad copies throughoutAlex Crichton-8/+8
2013-03-19auto merge of #5442 : pcwalton/rust/extern-block-restriction, r=pcwaltonbors-1/+9
r? @graydon
2013-03-19librustc: Enforce privacy for static methods.Patrick Walton-1/+9
This starts moving a bunch of privacy checks into the privacy checking phase and out of resolve.
2013-03-19auto merge of #5426 : nikomatsakis/rust/issue-4846-lifetimes-in-expl-self, ↵bors-20/+38
r=pcwalton (this will be needed for snapshotting at some point) r? @pcwalton
2013-03-18librustc: Make the compiler ignore purity.Patrick Walton-0/+4
For bootstrapping purposes, this commit does not remove all uses of the keyword "pure" -- doing so would cause the compiler to no longer bootstrap due to some syntax extensions ("deriving" in particular). Instead, it makes the compiler ignore "pure". Post-snapshot, we can remove "pure" from the language. There are quite a few (~100) borrow check errors that were essentially all the result of mutable fields or partial borrows of `@mut`. Per discussions with Niko I think we want to allow partial borrows of `@mut` but detect obvious footguns. We should also improve the error message when `@mut` is erroneously reborrowed.
2013-03-18librustc: Convert all uses of old lifetime notation to new lifetime ↵Patrick Walton-5/+5
notation. rs=delifetiming
2013-03-18Make &self permit explicit lifetimes, but don't really use themNiko Matsakis-20/+38
(this will be needed for snapshotting at some point).
2013-03-13librustc: Don't accept `as Trait` anymore; fix all occurrences of it.Patrick Walton-42/+47
2013-03-13librustc: Separate out trait storage from evec/estr storagePatrick Walton-4/+26
2013-03-13Remove `++` mode from the compiler (it is parsed as `+` mode)Niko Matsakis-5/+3
and obsolete `-` mode altogether (it *was* parsed as `+` mode).
2013-03-11librustc: Replace all uses of `fn()` with `&fn()`. rs=defunPatrick Walton-10/+10
2013-03-08rustc: Remove uses of DVecAlex Crichton-20/+14