summary refs log tree commit diff
path: root/src/librustc/middle
AgeCommit message (Collapse)AuthorLines
2014-03-31vec: convert `append` and `append_one` to methodsDaniel Micay-110/+55
These were only free functions on `~[T]` because taking self by-value used to be broken.
2014-03-30Removed deprecated functions `map` and `flat_map` for vectors and slices.Marvin Löbel-103/+128
2014-03-29auto merge of #13183 : erickt/rust/remove-list, r=alexcrichtonbors-2/+1
`collections::list::List` was decided in a [team meeting](https://github.com/mozilla/rust/wiki/Meeting-weekly-2014-03-25) that it was unnecessary, so this PR removes it. Additionally, it removes an old and redundant purity test and fixes some warnings.
2014-03-29auto merge of #13143 : gentlefolk/rust/issue-9227, r=michaelwoeristerbors-7/+74
Only supports crate level statics. No debug info is generated for function level statics. Closes #9227. As discussed at the end of the comments for #9227, I took an initial stab at adding support for function level statics and decided it would be enough work to warrant being split into a separate issue. See #13144 for the new issue describing the need to add support for function level static variables.
2014-03-29auto merge of #13188 : FlaPer87/rust/master, r=alexcrichtonbors-180/+132
2014-03-28auto merge of #13157 : pnkfelix/rust/fsk-iss13140, r=nikomatsakisbors-3/+7
r? @nikomatsakis Fix #13140 Includes two fixes, and a semi-thorough regression test. (There is another set of tests that I linked from #5121, but those are sort of all over the place, while the ones I've included here are more directly focused on the issues at hand.)
2014-03-29Register new snapshotFlavio Percoco-180/+132
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-26/+26
Closes #2569
2014-03-28collections: remove ListErick Tryzelaar-2/+1
It was decided in a meeting that this module wasn't needed, and more thought should be put into a persistent collections library.
2014-03-28Rename Pod into CopyFlavio Percoco-11/+11
Summary: So far, we've used the term POD "Plain Old Data" to refer to types that can be safely copied. However, this term is not consistent with the other built-in bounds that use verbs instead. This patch renames the Pod kind into Copy. RFC: 0003-opt-in-builtin-traits Test Plan: make check Reviewers: cmr Differential Revision: http://phabricator.octayn.net/D3
2014-03-28auto merge of #13107 : seanmonstar/rust/encoder-errors, r=ericktbors-169/+231
All of Decoder and Encoder's methods now return a Result. Encodable.encode() and Decodable.decode() return a Result as well. fixes #12292
2014-03-27auto merge of #13108 : pongad/rust/lintraw, r=huonwbors-0/+42
Fixes #13032
2014-03-27Initial support for emitting DWARF for static vars.gentlefolk-7/+74
Only supports crate level statics. No debug info is generated for function level statics. Closes #9227.
2014-03-27serialize: use ResultSean McArthur-169/+231
All of Decoder and Encoder's methods now return a Result. Encodable.encode() and Decodable.decode() return a Result as well. fixes #12292
2014-03-27rustc: Stop adding the Send bound implicitlyAlex Crichton-6/+3
This commit removes implicitly adding the Send bound to ~Trait objects and procedure types. It will now be manually required to specify that a procedure or trait must be send-able. Closes #10296
2014-03-27auto merge of #13001 : cmr/rust/unnamed-lifetime-nocapture, r=nikomatsakisbors-3/+49
Closes #6751
2014-03-27Address reviewCorey Richardson-9/+9
2014-03-27rustc: mark references w/anonymous lifetime nocaptureCorey Richardson-3/+49
Closes #6751
2014-03-27_match.rs: prune sub-match tree too aggressivelyEdward Wang-41/+81
The `_match.rs` takes advantage of passes prior to `trans` and aggressively prunes the sub-match tree based on exact equality. When it comes to literal or range, the strategy may lead to wrong result if there's guard function or multiple patterns inside tuple. Closes #12582. Closes #13027.
2014-03-27Added lint for #[deriving] structs and enums with unsafe pointers. #13032.Michael Darakananda-0/+42
2014-03-26auto merge of #13145 : alexcrichton/rust/flip-some-defaults, r=brsonbors-11/+6
This change prepares `rustc` to accept private fields by default. These changes will have to go through a snapshot before the rest of the changes can happen.
2014-03-26auto merge of #13071 : ktt3ja/rust/deterministic-lifetime-suggestion, r=cmrbors-3/+29
Close #13057
2014-03-26syntax: Permit visibility on tuple fieldsAlex Crichton-7/+6
This change is in preparation for #8122. Nothing is currently done with these visibility qualifiers, they are just parsed and accepted by the compiler. RFC: 0004-private-fields
2014-03-26rustc: Relax restriction on privacy for fieldsAlex Crichton-4/+0
This is a necessary change in preparation for switching the defaults as part of #8122. RFC: 0004-private-fields
2014-03-26Fix Repr impl for method::Candidate to include the method_ty.Felix S. Klock II-1/+2
2014-03-26Fix #13140: Early/Late Bound related ICEs.Felix S. Klock II-2/+5
The problem was that we need to apply the substitution, so that the formal lifetime parameters get replaced with (unifiable) free-lifetimes that can actually be fed into the constraint solver. Also, refactor code os that substitution for `check_item` and `check_method`, moving both down the control flow into `check_bare_fn`. ---- Finally, there was another (similar) spot where we needed to substitute early-bound lifetimes when invoking an object method of a trait.
2014-03-26auto merge of #13117 : alexcrichton/rust/no-crate-map, r=brsonbors-113/+2
This can be done now that logging has been moved out and libnative is the default (not libgreen)
2014-03-25Changed `iter::Extendable` and `iter::FromIterator` to take a `Iterator` by ↵Marvin Löbel-3/+3
value
2014-03-25auto merge of #13083 : FlaPer87/rust/issue-13005-borrow-unsafe-static, ↵bors-74/+93
r=nikomatsakis It was possible to borrow unsafe static items in static initializers. This patch implements a small `Visitor` that walks static initializer's expressions and checks borrows aliasability. Fixes #13005 cc @nikomatsakis r?
2014-03-24Prefer lifetime suggestion over generic errorKiet Tran-3/+29
2014-03-24rustc: Remove all crate map supportAlex Crichton-113/+2
The crate map is no longer necessary now that logging and event loop factories have been moved out. Closes #11617 Closes #11731
2014-03-24rustc: Completely forbid borrows of unsafe staticsFlavio Percoco-74/+93
Summary: It was possible to borrow unsafe static items in static initializers. This patch implements a small `Visitor` that walks static initializer's expressions and checks borrows aliasability. Fixes #13005 Test Plan: make check Differential Revision: http://phabricator.octayn.net/D2
2014-03-23auto merge of #13090 : thestinger/rust/iter, r=Aatchbors-4/+3
This has been rendered obsolete by partial type hints. Since the `~[T]` type is in the process of being removed, it needs to go away.
2014-03-23iter: remove `to_owned_vec`Daniel Micay-4/+3
This needs to be removed as part of removing `~[T]`. Partial type hints are now allowed, and will remove the need to add a version of this method for `Vec<T>`. For now, this involves a few workarounds for partial type hints not completely working.
2014-03-23use TotalEq for HashMapDaniel Micay-42/+44
Closes #5283
2014-03-22auto merge of #13087 : eddyb/rust/fix-autoderef, r=cmrbors-85/+167
Implements vtable support for generic Deref impls with trait bounds. Also fixes cross-crate inlining when using autoderef.
2014-03-23Implement cross-crate support for autoderef.Eduard Burtescu-20/+92
Closes #13044.
2014-03-22auto merge of #13085 : edwardw/rust/saddest-cell, r=cmrbors-2/+2
2014-03-22Implement vtable support for autoderef.Eduard Burtescu-66/+76
Closes #13042.
2014-03-22auto merge of #13076 : FlaPer87/rust/remove-freeze, r=alexcrichtonbors-37/+9
This PR removes the `Freeze` kind and the `NoFreeze` marker completely. Fixes #12577 cc @nikomatsakis r?
2014-03-23Get rid of @CellEdward Wang-2/+2
2014-03-22rustc: Remove all usage of manual deref()Alex Crichton-41/+36
Favor using '*' instead
2014-03-22rustc: Fix fallout of removing get()Alex Crichton-2092/+1226
2014-03-22doc: Remove Freeze / NoFreeze from docsFlavio Percoco-12/+5
2014-03-22rustc: Remove special treatment for Freeze and NoFreezeFlavio Percoco-25/+4
Fixes #12577
2014-03-21auto merge of #13036 : alexcrichton/rust/atomics, r=alexcrichtonbors-21/+9
Closes #11583, rebasing of #12430 now that we've got `Share` and better analysis with statics.
2014-03-21auto merge of #13016 : huonw/rust/new-opt-vec, r=cmrbors-110/+99
Replace syntax::opt_vec with syntax::owned_slice The `owned_slice::OwnedSlice` is `(*T, uint)` (i.e. a direct equivalent to DSTs `~[T]`). This shaves two words off the old OptVec type; and also makes substituting in other implementations easy, by removing all the mutation methods. (And also everything that's very rarely/never used.)
2014-03-22Migrate all users of opt_vec to owned_slice, delete opt_vec.Huon Wilson-53/+51
syntax::opt_vec is now entirely unused, and so can go.
2014-03-21rustc: Switch defaults from libgreen to libnativeAlex Crichton-1/+1
The compiler will no longer inject libgreen as the default runtime for rust programs, this commit switches it over to libnative by default. Now that libnative has baked for some time, it is ready enough to start getting more serious usage as the default runtime for rustc generated binaries. We've found that there isn't really a correct decision in choosing a 1:1 or M:N runtime as a default for all applications, but it seems that a larger number of programs today would work more reasonable with a native default rather than a green default. With this commit come a number of bugfixes: * The main native task is now named "<main>" * The main native task has the stack bounds set up properly * #[no_uv] was renamed to #[no_start] * The core-run-destroy test was rewritten for both libnative and libgreen and one of the tests was modified to be more robust. * The process-detach test was locked to libgreen because it uses signal handling
2014-03-21syntax: make OptVec immutable.Huon Wilson-64/+55
This is the first step to replacing OptVec with a new representation: remove all mutability. Any mutations have to go via `Vec` and then make to `OptVec`. Many of the uses of OptVec are unnecessary now that Vec has no-alloc emptiness (and have been converted to Vec): the only ones that really need it are the AST and sty's (and so on) where there are a *lot* of instances of them, and they're (mostly) immutable.