about summary refs log tree commit diff
path: root/src/rustc/middle
AgeCommit message (Collapse)AuthorLines
2012-07-30rustc: "ifce" -> "trt" in identifiersLindsey Kuper-14/+14
2012-07-30Fix #2979: inference for lifetimes of & expressionsNiko Matsakis-244/+568
What we now do is to create a region variable for each & expression (and also each borrow). The lifetime of this variable will be checked by borrowck to ensure it is not greater than the lifetime of the underlying data. This both leads to shorter lifetimes in some cases but also longer in others, such as taking the address to the interior of unique boxes tht are rooted in region pointers (e.g., returning a pointer to the interior of a sendable map). This may lead to issue #2977 if the rvalue is not POD, because we may drop the data in trans sooner than borrowck expects us to. Need to work out precisely where that fix ought to occur.
2012-07-30rustc: Make option<&foo> no longer cause LLVM asserts by getting rid of ↵Patrick Walton-0/+4
regions in normalize_ty
2012-07-30LONG LINES\!Brian Anderson-1/+2
2012-07-30rustc: use new siphash impl instead of sha1Damian Gryski-6/+6
Updating types std::sha1::sha1 -> hash::streaming was a relatively small change. Renaming the variables to reflect that things aren't sha1s any more touched far more lines.
2012-07-29Rewrite bitv to use classes and optimize its representationTim Chevalier-241/+217
Rewrote bitv as a class that uses a 32-bit int as its representation for bit vectors of 32 bits or less, and a vector (the old representation) otherwise. I didn't benchmark very much, but a bit of informal benchmarking suggested this is a win. Closes #2341
2012-07-27rustc: Use coherence for operator overloading.Patrick Walton-58/+138
The only use of the old-style impls is now placement new.
2012-07-27Forbid duplicate fields in record types and exprsTim Chevalier-1/+39
Closes #3033
2012-07-27Correctly forbid upvars in nested impls, traits and classesTim Chevalier-12/+72
Previously, resolve was allowing impls, traits or classes that were nested within a fn to refer to upvars, as well as referring to type parameters bound by the fn. Fixing this required adding a new kind of def: def_typaram_binder, which can refer to any of an impl, trait or class that has bound ty params. resolve uses this to enforce that methods can refer to their parent item's type parameters, but not to outer items' type parameters; other stages ignore it. I also made sure that impl, trait and class methods get checked inside a MethodRibKind thing so as to forbid upvars, and changed the definition of MethodRibKind so that its second argument is an optional node_id (so that required trait method signatures can be checked with a MethodRibKind as well).
2012-07-27change region inference to not consider & that appears in a fnNiko Matsakis-1/+10
type as indicating region parameterization
2012-07-27core: Trait-ify various overloaded operatorsPatrick Walton-0/+1
2012-07-27In resolve, check for duplicate pattern-bound varsTim Chevalier-10/+21
Closes #3038
2012-07-27Make alts on uninhabited enum types typecheck and translate properlyTim Chevalier-10/+55
Possibly one of the silliest Rust commits ever. Closes #3037
2012-07-26Removed the rest of the vec::view calls that were marked with #2880. Fixes ↵Eric Holk-10/+5
#2880.
2012-07-26Use iteration protocol for ebml, use vec::view in more places (issue #2880)Eric Holk-1/+1
2012-07-26Nomenclature fixes in the lint checker. Fewer double-negatives.Graydon Hoare-106/+121
New style is allow(foo), warn(foo), deny(foo) and forbid(foo), mirrored by -A foo, -W foo, -D foo and -F foo on command line. These replace -W no-foo, -W foo, -W err-foo, respectively. Forbid is new, and means "deny, and you can't override it".
2012-07-26rustc: Fix cross-crate max/min-class-style constructorsPatrick Walton-17/+24
2012-07-25rustc: Introduce a lang_items pass, part of coherence and operator overloading.Patrick Walton-0/+209
This will also help us remove kinds.
2012-07-253x faster typecheckingEric Holk-7/+7
2012-07-25Add #[inline(never)], and also fixed inlining on vec::pushEric Holk-0/+1
2012-07-25adjust deprecated_use not to warn about sugared closuresNiko Matsakis-0/+8
2012-07-25add new deprecated_mode lint passNiko Matsakis-21/+161
It will warn you if you use the default mode for something that is expensive to copy, and it will warn you if you use any explicit mode other than copy. So you should migrate over to using the default mode for most things (and borrowed pointers when you don't want to copy) and copy mode for things you really wanted to copy.
2012-07-25avoid capture of bound regions when infering types for closureNiko Matsakis-11/+51
expressions. cc #2981
2012-07-25comment various region-related things betterNiko Matsakis-148/+60
2012-07-25make unique pointers inherit mutability from ownerNiko Matsakis-9/+37
2012-07-25correct treatment of mutability for deref'd componentsNiko Matsakis-7/+18
Fixes #2980
2012-07-24rustc: Don't require that structs have constructorsPatrick Walton-66/+91
2012-07-24rustc: Translate struct literalsPatrick Walton-0/+87
2012-07-24Merge pull request #3003 from elliottslaughter/free-cant-failGraydon Hoare-21/+34
Don't emit invoke instructions inside landing pads.
2012-07-24Fix whitespace.Graydon Hoare-1/+1
2012-07-24Update some str functions to slices, merge as_buf and unpack_slice.Graydon Hoare-1/+1
2012-07-24Don't emit invoke instructions inside landing pads.Elliott Slaughter-21/+34
We can't throw an exception from inside a landing pad without corrupting the exception handler, so we have no hope of dealing with these exceptions anyway. See: http://llvm.org/docs/ExceptionHandling.html#cleanups Part of #2861.
2012-07-24rustc: Typecheck struct literalsPatrick Walton-3/+134
2012-07-23rustc: Resolve struct names in struct literalsPatrick Walton-9/+49
2012-07-23Merge pull request #2998 from elliottslaughter/no-landing-padsGraydon Hoare-0/+4
Add debug flag to turn off landing pads.
2012-07-23rustc: Max/min classes: Add struct literal syntaxPatrick Walton-4/+14
2012-07-23Merge pull request #3000 from dgryski/masterTim Chevalier-1/+1
Fix formatting of multiline code blocks in asm-comments
2012-07-23Fix formatting of multi-line blocks in asm-commentsDamian Gryski-1/+1
2012-07-23rustc: Make vtables use the coherence tablesPatrick Walton-76/+107
2012-07-23Add debug flag to turn off landing pads.Elliott Slaughter-0/+4
2012-07-23Moved malloc and free upcalls into rust runtime.Elliott Slaughter-44/+56
2012-07-23Move fail upcall into rust libcore.Elliott Slaughter-2/+93
2012-07-20Remove what's left of resolve1Tim Chevalier-103/+36
2012-07-19Fix intersection of two region params in infer, cc #2962Niko Matsakis-2/+2
2012-07-18rustc: Make vtable do duplicate-impl checking. Closes #2958.Patrick Walton-0/+12
2012-07-18In resolve3, error on non-existent importsTim Chevalier-0/+10
Closes #2937
2012-07-18Remove non-existent importsTim Chevalier-1/+1
2012-07-18rustc: Implement multiple-traits-per-impl for cross-crate stuffPatrick Walton-46/+33
2012-07-18rustc: Make coherence aware of multiple-traits-per-implPatrick Walton-97/+80
2012-07-18rustc: Move ty::impl_traits over to a multiple-traits-per-impl worldPatrick Walton-53/+64