about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2013-03-02libcore: Remove `fn@`, `fn~`, and `fn&` from libcore. rs=defunPatrick Walton-54/+51
2013-03-02libstd: Remove `fn@`, `fn~`, and `fn&` from libstd. rs=defunPatrick Walton-40/+43
2013-03-02libsyntax: Remove `fn@`, `fn~`, and `fn&` from libsyntax. rs=defunPatrick Walton-194/+181
2013-03-02librustc: Remove `fn@`, `fn~`, and `fn&` from librustc. rs=defunPatrick Walton-52/+58
2013-03-02librustc: Forbid chained imports and fix the logic for one-level renaming ↵Patrick Walton-497/+356
imports
2013-03-02auto merge of #5199 : thestinger/rust/hashmap, r=brsonbors-313/+313
Closes #4764
2013-03-02auto merge of #5198 : youknowone/rust/repeat-count, r=brsonbors-14/+10
Before: ```` test.rs:3:21: 3:30 error: expected constant integer for repeat count but found variable test.rs:3 let a = ~[0, ..n]; //~ ERROR expected constant integer for repeat count but found variable ^~~~~~~~~ ```` After: ```` test.rs:3:27: 3:28 error: expected constant integer for repeat count but found variable test.rs:3 let a = ~[0, ..n]; //~ ERROR expected constant integer for repeat count but found variable ^ ````
2013-03-02inline the implementation of TotalOrd for integersDaniel Micay-0/+1
2013-03-02add an initial radix trie implementationDaniel Micay-0/+370
2013-03-02libsyntax: add some more explicit copies for vecs_implicitly_copyable)Erick Tryzelaar-7/+8
2013-03-02Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-487/+469
2013-03-02auto merge of #5196 : thestinger/rust/ord, r=catamorphismbors-93/+253
This allows `TreeMap`/`TreeSet` to fully express their requirements and reduces the comparisons from ~1.5 per level to 1 which really helps for string keys. I also added `ReverseIter` to the prelude exports because I forgot when I originally added it.
2013-03-02treemap: reimplement using TotalOrdDaniel Micay-82/+87
2013-03-02add a TotalOrd traitDaniel Micay-11/+166
2013-03-02auto merge of #5137 : yjh0502/rust/empty_struct, r=nikomatsakisbors-235/+54
The fix is straight-forward, but there are several changes while fixing the issue. 1) disallow `mut` keyword when making a new struct In code base, there are following code, ```rust struct Foo { mut a: int }; let a = Foo { mut a: 1 }; ``` This is because of structural record, which is deprecated corrently (see issue #3089) In structural record, `mut` keyword should be allowd to control mutability. But without structural record, we don't need to allow `mut` keyword while constructing struct. 2) disallow structural records in parser level This is related to 1). With structural records, there is an ambiguity between empty block and empty struct To solve the problem, I change parser to stop parsing structural records. I think this is not a problem, because structural records are not compiled already. Misc. issues There is an ambiguity between empty struct vs. empty match stmt. with following code, ```rust match x{} {} ``` Two interpretation is possible, which is listed blow ```rust match (x{}) {} // matching with newly-constructed empty struct (match x{}) {} // matching with empty enum(or struct) x // and then empty block ``` It seems that there is no such code in rust code base, but there is one test which uses empty match statement: https://github.com/mozilla/rust/blob/incoming/src/test/run-pass/issue-3037.rs All other cases could be distinguished with look-ahead, but this can't be. One possible solution is wrapping with parentheses when matching with an uninhabited type. ```rust enum what { } fn match_with_empty(x: what) -> ~str { match (x) { //use parentheses to remove the ambiguity } } ```
2013-03-02auto merge of #5193 : sethpink/rust/struct-tup-pp, r=catamorphismbors-16/+22
- Removed space between struct name and parentheses - Fixed indentation of the rest of the file (missing end) - Don't print parentheses for structs with no fields - Added test
2013-03-02auto merge of #5191 : brson/rust/movert, r=brsonbors-11/+5
Moving them out of the way so the new scheduler code can occupy core::rt.
2013-03-02make LinearMap fields privateDaniel Micay-313/+313
Closes #4764
2013-03-02Better highlight for repeat count errorJeong YunWon-14/+10
Before: ```` test.rs:3:21: 3:30 error: expected constant integer for repeat count but found variable test.rs:3 let a = ~[0, ..n]; //~ ERROR expected constant integer for repeat count but found variable ^~~~~~~~~ ```` After: ```` test.rs:3:27: 3:28 error: expected constant integer for repeat count but found variable test.rs:3 let a = ~[0, ..n]; //~ ERROR expected constant integer for repeat count but found variable ^ ````
2013-03-02Allow constant c-like enum to integral/float castJeong YunWon-3/+65
2013-03-01auto merge of #5185 : ben0x539/rust/net-tcp-docs, r=brsonbors-76/+76
This changes various type_names to TypeNames and fixes the example for `tcp::accept` that was still using the old `match` syntax and `{|args| ...}` closures. The `accept` example was fairly outdated. I was just going to stay away from all the IO things until the scheduler revamp lands, but `accept` is probably one of the obvious starting points for networking stuff for a learner, and I don't want to get in the way of anyone's enthusiasm. Doesn't touch non-comment lines, so I hope I will get away without learning about unit tests. It doesn't seem like the test system is set up to extract tests from doc comments right now.
2013-03-01Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-166/+370
2013-03-02Remove REC, change related tests/docsJihyun Yu-235/+54
2013-03-01auto merge of #5165 : brson/rust/unstable, r=brsonbors-56/+59
r? This probably isn't controversial, but I want somebody else to sign off on it.
2013-03-02Fix some struct-tuple def prettyprint issuesSeth Pink-16/+22
- Removed space between struct name and parentheses - Fixed indentation of the rest of the file (missing end) - Don't print parentheses for structs with no fields - Added test
2013-03-01auto merge of #5190 : brson/rust/snap, r=brsonbors-1/+1
2013-03-01Merge remote branch 'nmatsakis/parser-perf-problem' into incomingPatrick Walton-18/+28
2013-03-01core: Move core::rt to core::unstable::langBrian Anderson-11/+5
2013-03-01Register FreeBSD snapshotBrian Anderson-1/+1
2013-03-01Avoid calling to_vec() unnecessarily in parser.Niko Matsakis-18/+28
Also, rename the OptVec-to-vector conversion method to opt_vec::take_vec() and convert from a method into a fn because I fear strange bugs.
2013-03-01Rename core::private to core::unstable. #4743Brian Anderson-56/+59
2013-03-01`std::net::tcp` docs: Use current syntax and typesBenjamin Herr-76/+76
Doesn't touch non-comment lines. This changes various type_names to TypeNames and fixes the example for `tcp::accept` that was still using the old `match` syntax and `{|args| ...}` closures.
2013-03-01librustc: Add missing import. rs=burningtreePatrick Walton-0/+1
2013-03-01Merge pull request #5178 from catamorphism/constant-buffersPatrick Walton-4/+10
core: Address XXX, make static constants for strings used when stringify...
2013-03-01Merge remote branch 'nmatsakis/issue-4808-representation-of-extern-fn' into ↵Patrick Walton-128/+311
incoming
2013-03-01librustc: "APL2" -> "ASL2". rs=license-fixPatrick Walton-9/+9
2013-03-01Merge remote branch 'sevrak/issue-5164' into incomingPatrick Walton-13/+17
2013-03-01Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-1190/+1503
2013-03-01auto merge of #5162 : brson/rust/fixmes, r=brsonbors-3/+3
2013-02-28auto merge of #5180 : catamorphism/rust/post-snapshot, r=catamorphismbors-68/+2
* Disallow structural records everywhere * Remove all #[cfg(stage0)] stuff * Remove the last deprecated modes in libcore * Un-xfail a test
2013-02-28testsuite: Re-xfail record-trailing-commaTim Chevalier-0/+1
It was xfailed before the other commits in this pull request, so no big deal. I'll look into it later.
2013-02-28auto merge of #5147 : nikomatsakis/rust/remove-legacy-trait-table, ↵bors-354/+295
r=nikomatsakis r? @pcwalton
2013-02-28Remove code that was awaiting a snapshotTim Chevalier-68/+1
* Disallow structural records everywhere * Remove all #[cfg(stage0)] stuff * Remove the last deprecated modes in libcore * Un-xfail a test
2013-02-28Register snapshotsTim Chevalier-0/+8
2013-02-28Remove legacy object creation mode, and convert remaining uses of itNiko Matsakis-354/+295
2013-02-28auto merge of #5176 : brson/rust/unwrap_shared_mutable_state, r=nikomatsakisbors-253/+10
r? This fixes the current [random failures](http://buildbot.rust-lang.org/builders/auto-linux/builds/291/steps/test/logs/stdio) on the bots and closes #4436 by removing `unwrap_shared_mutable_state` and the code that depends on it. The result is that ARC-like things will not be unwrappable. This feature is complex and is not used outside of test cases. Note that there is not consensus to remove it. (second commit)
2013-02-28core: Address XXX, make static constants for strings used when stringifying ↵Tim Chevalier-4/+10
floats
2013-02-28auto merge of #5113 : alexcrichton/rust/issue-4366, r=catamorphismbors-293/+547
The first two commits are the actual fix going into place, and the last is just dealing with the fallout in the rest of the compiler. The test added in the first two commits had 0 failures before this patch, and if the glob imports were changed to explicit imports then the errors showed up. Due to this behavior, I figured that the desired behavior was for glob imports to not accidentally leak a lot of non-public imports/functions/types into other modules. There was quite a lot of fallout, and it all passes `make check` locally, but I doubt that it will pass on all platforms because there's probably some guarded off thing I missed. I plan on making another patch soon which changes the default level of `unused_imports` to `warn` which will hopefully reduce a lot of the `use` noise throughout. In conjunction with #5104, and a few minor fixes, I think that the default level of `warn` is actually really usable.
2013-02-28core: Remove unwrap_shared_mutable_state. #4436Brian Anderson-251/+5
2013-02-28Fix implicit leaks of imports throughout librariesAlex Crichton-289/+489
Also touch up use of 'pub' and move some tests around so the tested functions don't have to be 'pub'