Commit graph

16514 commits

Author SHA1 Message Date
bors
a56ec8c134 auto merge of #5515 : nikomatsakis/rust/issue-5514-flexible-coherence-rules, r=pcwalton
See issue #5514

r? @pcwalton
2013-03-23 12:36:53 -07:00
Patrick Walton
8aee0a6a29 libsyntax: Fix static in pretty printer. rs=burningtree 2013-03-23 10:28:24 -07:00
Niko Matsakis
a1b4afe067 Update coherence rules to be more flexible for impl Trait for Type 2013-03-23 09:49:47 -04:00
Andrew Paseltiner
45677eebf2 replace impls with deriving where applicable 2013-03-23 06:57:30 -04:00
Andrew Paseltiner
2b83defa4a core: derive Clone for core types 2013-03-23 06:54:13 -04:00
Daniel Micay
11ca2efce1 turn std::oldmap into a wrapper around LinearMap 2013-03-23 02:16:14 -04:00
Patrick Walton
28efc234f4 libcore: Fix obsolete syntax in extfmt 2013-03-22 23:09:15 -07:00
Patrick Walton
e2fde83ce4 libsyntax: Stop parsing old lifetime syntax 2013-03-22 22:24:36 -07:00
Patrick Walton
66770d20b3 test: Add lifetime binders and new-style lifetime parameters to the test suite 2013-03-22 22:24:36 -07:00
Patrick Walton
6d81307a9b librustc: Add explicit lifetime binders and new lifetime notation in core/std/syntax/rustc 2013-03-22 22:24:35 -07:00
Patrick Walton
68cb53672b libsyntax: Stop parsing const. 2013-03-22 22:24:35 -07:00
Patrick Walton
85c9fc6f8f librustc: Remove the const declaration form everywhere 2013-03-22 22:24:35 -07:00
Patrick Walton
eba3367404 libsyntax: Introduce the new assert! macro; make assert no longer a keyword 2013-03-22 22:24:34 -07:00
Patrick Walton
fa70709e07 libsyntax: Stop parsing pure and static 2013-03-22 22:24:33 -07:00
Thad Guidry
9aa0cedc84 changed /configure to be compatible with Cygwin and removed annoying --help not a command available message 2013-03-23 02:21:43 +01:00
bors
d60a7259f9 auto merge of #5503 : thestinger/rust/trie, r=pcwalton 2013-03-22 18:00:52 -07:00
bors
1e41bc7445 auto merge of #5501 : catamorphism/rust/manual, r=graydon
r? @graydon
2013-03-22 16:42:50 -07:00
Tim Chevalier
3633ba240f Copyedit macro tutorial 2013-03-22 16:11:27 -07:00
bors
5b43810841 auto merge of #5497 : luqmana/rust/clang-ver, r=thestinger 2013-03-22 15:15:54 -07:00
Daniel Micay
705c796ffa remove obsolete purity workarounds 2013-03-22 18:08:56 -04:00
Daniel Micay
0c8c3b4232 trie: make the TrieSet impl public 2013-03-22 18:04:35 -04:00
Daniel Micay
55fbb9518b trie: inline the other TrieSet wrapper methods 2013-03-22 18:04:35 -04:00
Daniel Micay
04e367b353 trie: rm workaround for issue #3469 2013-03-22 18:03:55 -04:00
Tim Chevalier
ab2a397ae7 docs: Copyedit my randomly assigned sections of the manual 2013-03-22 14:45:16 -07:00
bors
bd065d3311 auto merge of #5496 : catamorphism/rust/release-notes, r=catamorphism 2013-03-22 14:00:57 -07:00
bors
e9b077c0e9 auto merge of #5488 : pcwalton/rust/depure, r=pcwalton 2013-03-22 13:00:56 -07:00
Patrick Walton
3eda11a4f7 test: Remove pure from the test suite 2013-03-22 12:57:28 -07:00
Patrick Walton
fbe22afdbe librustdoc: Remove pure from fuzzer and rustdoc. 2013-03-22 12:57:28 -07:00
Patrick Walton
e7c60c141b librustc: Remove pure from libsyntax and librustc. 2013-03-22 12:57:27 -07:00
Patrick Walton
ec59ce5796 test: Fix test. rs=test 2013-03-22 12:57:27 -07:00
Luqman Aden
19c104000e configure: accept clang 3.3 when passed --enable-clang 2013-03-22 15:49:55 -04:00
Tim Chevalier
d049bf2492 Edit release notes a bit 2013-03-22 11:59:59 -07:00
bors
b6f9aa1fd7 auto merge of #5483 : pcwalton/rust/static-syntax, r=graydon
r? @nikomatsakis
2013-03-22 11:21:48 -07:00
Patrick Walton
c1084091d4 libstd: Remove all uses of pure from libstd. rs=depure 2013-03-22 10:29:17 -07:00
Patrick Walton
be9bddd463 libcore: Remove pure from libcore. rs=depure 2013-03-22 10:29:17 -07:00
Patrick Walton
4634f7edae librustc: Remove all uses of static from functions. rs=destatic 2013-03-22 10:27:39 -07:00
bors
f011f928dd auto merge of #5463 : alexcrichton/rust/faster-fmt, r=graydon
This is a minor step towards #3571, although I'm sure there's still more work to be done. Previously, `fmt!` collected a bunch of strings in a vector and then called `str::concat`. This changes the behavior by maintaining only one buffer and appending directly into that buffer. This avoids doubly-allocating memory, and it has the added bonus of reducing some allocations in `core::unstable::extfmt`

One of the unfortunate side effects of this is that the `rt` module in `extfmt.rs` had to be duplicated to avoid `stage0` errors. Dealing with the change in conversion functions may require a bit of a dance when a snapshot happens, but I think it's doable.

If the second speedup commit isn't deemed necessary, I got about a 15% speedup with just the first patch which doesn't require any modification of `extfmt.rs`, so no snapshot weirdness.

Here's some other things I ran into when looking at `fmt!`:
* I don't think that #2249 is relevant any more except for maybe removing one of `%i` or `%d`
* I'm not sure what was in mind for using traits with #3571, but I thought that formatters like `%u` could invoke the `to_uint()` method on the `NumCast` trait, but I ran into some problems like those in #5462

I'm having trouble thinking of other wins for `fmt!`, but if there's some suggestions I'd be more than willing to look into if they'd work out or not.
2013-03-22 10:18:53 -07:00
bors
1616ffd0c2 auto merge of #5398 : dbaupp/rust/core-readlines, r=graydon
The `each_line` function in `ReaderUtil` acts very differently to equivalent functions in Python, Ruby, Clojure etc. E.g. given a file `t` with contents `trailing\nnew line\n` and `n` containing `no trailing\nnew line`:

Rust:
```Rust
t: ~[~"trailing", ~"new line", ~""]
n: ~[~"no trailing", ~"new line"]
```

Python:
```Python
>>> open('t').readlines()
['trailing\n', 'new line\n']
>>> open('n').readlines()
['no trailing\n', 'new line']
```

Ruby:
```Ruby
irb(main):001:0> File.readlines('t')
=> ["trailing\n", "new line\n"]
irb(main):002:0> File.readlines('n')
=> ["no trailing\n", "new line"]
```

Clojure
```Clojure
user=> (read-lines "t")
("trailing" "new line")
user=> (read-lines "n")
("no trailing" "new line")
```

The extra string that rust includes at the end is inconsistent, and means that it is impossible to distinguish between the "real" empty line a file that ends `...\n\n`, and the "fake" one after the last `\n`.

The code attached makes Rust's `each_line` act like Clojure (and PHP, i.e. not including the `\n`), as well as adjusting `str::lines` to fix the trailing empty line problem.

Also, add a convenience `read_lines` method to read all the lines in a file into a vector.
2013-03-22 09:24:53 -07:00
Alex Crichton
e93654c96d Pass the fmt! buffer to each conversion method
Achieves a little more speedup and avoids allocations around some strings in
conv_str
2013-03-22 11:49:45 -04:00
Alex Crichton
c0bbc6242f Removing some unused imports 2013-03-22 11:49:45 -04:00
Alex Crichton
1a0d212dd9 Build up the result of fmt! in a buffer instead of a vector 2013-03-22 11:49:45 -04:00
bors
d700500d0c auto merge of #5471 : erickt/rust/incoming, r=bstrie
I made a typo in `str::levdistance` in my str pull request. This fixes it.
2013-03-22 06:21:51 -07:00
Huon Wilson
f8323397aa compiletest: Use lines_each instead of lines(..).each, or split(.., n).each 2013-03-23 00:15:06 +11:00
Huon Wilson
429b8a9b9e libcore: handle trailing newlines more like other languages.
Specifically, `lines` and `each_line` will not emit a trailing empty string
when given "...\n". Also, add `read_lines`, which just collects all of
`each_line` into a vector, and `split_*_no_trailing` which will is the
generalised version of `lines`.
2013-03-23 00:15:05 +11:00
bors
059764779c auto merge of #5493 : apasel422/rust/leibniz, r=bstrie
Closes #5411.
2013-03-22 05:30:50 -07:00
Andrew Paseltiner
999e7ef9a9 syntax: make old #[deriving_foo] attribute obsolete 2013-03-22 07:15:13 -04:00
Andrew Paseltiner
e2abecd3ab syntax: replace uses of old deriving attribute with new one 2013-03-22 06:30:59 -04:00
Andrew Paseltiner
6e883c730e compiletest: replace uses of old deriving attribute with new one 2013-03-22 06:30:59 -04:00
Andrew Paseltiner
ec960963c1 test: replace uses of old deriving attribute with new one 2013-03-22 06:30:53 -04:00
Andrew Paseltiner
9966eaaba4 rustc: replace uses of old deriving attribute with new one 2013-03-22 06:24:19 -04:00