Commit Graph

32924 Commits

Author SHA1 Message Date
Brian Koropoff
24d7669099 Handle emitting debug info for unboxed closures
This fixes an ICE.  Closes issue #17021
2014-10-05 12:19:22 -07:00
bors
c586490715 auto merge of #17785 : P1start/rust/diagnostics, r=alexcrichton
Closes #17765.
Closes #15524.
Closes #14772.
2014-10-05 10:57:04 +00:00
bors
dfbe9eb3b2 auto merge of #17777 : lambda/rust/fix-docs-short-hash, r=alexcrichton
The escaped newline in the middle of the variable reference breaks the
short hash substitution, leaving the link text exmpty; rewrap so that
each replacement is on its own line.
2014-10-05 09:07:06 +00:00
bors
5660db2508 auto merge of #16970 : kmcallister/rust/llvm-unreachable, r=thestinger
I'm not sure how to add an automated test for this.
2014-10-05 07:17:09 +00:00
bors
3b8c528d08 auto merge of #17776 : luqmana/rust/ul, r=alexcrichton
Update our LLVM snapshot to master (as of ~ Wed Oct 1 18:49:58 2014 +0000). 

Since my patches have landed upstream this fixes #13429 and #7298.
2014-10-05 04:57:11 +00:00
bors
026206695a auto merge of #17774 : lambda/rust/docs-mention-hoedown, r=steveklabnik
Rust 0.11.0 switched from sundown to the actively maintained hoedown; update the rustdoc documention to mention this.
2014-10-05 03:12:10 +00:00
Keegan McAllister
675aa7692d Add tests for intrinsics::unreachable 2014-10-04 20:09:09 -07:00
Keegan McAllister
401aeaf6d3 Add intrinsics::unreachable 2014-10-04 20:09:09 -07:00
bors
5ca68d4ac1 auto merge of #17772 : bkoropoff/rust/issue-17767, r=alexcrichton
Closes issue #17767
2014-10-05 01:27:10 +00:00
P1start
cc31d9cabc Give a more descriptive error when marking non-test items as #[test]
Closes #14772.
2014-10-05 14:16:32 +13:00
P1start
a29df44f51 Tweak ‘discriminant value already exists’ error message
Closes #15524.
2014-10-05 14:16:32 +13:00
bors
dc987adfc1 auto merge of #17766 : pminten/rust/atomic-int-in-examples, r=alexcrichton
The examples for fetch_or, fetch_and and fetch_xor for
std::sync::atomic::AtomicInt used AtomicUint instead of AtomicInt.
2014-10-04 23:42:07 +00:00
P1start
88baca7486 Rename vector patterns to array patterns
Closes #17765.
2014-10-05 12:08:37 +13:00
bors
07aeac8ac8 auto merge of #17761 : bkoropoff/rust/issue-17758, r=alexcrichton
This fixes an ICE and closes issue #17758
2014-10-04 21:57:08 +00:00
bors
a2e7c4da9b auto merge of #17738 : hoeppnertill/rust/master, r=alexcrichton
There is an issue with lev_distance, where
```
fn main() {
    println!("{}", "\x80".lev_distance("\x80"))
}
```
prints `2`.

This is due to using the byte length instead of the char length.
2014-10-04 19:32:07 +00:00
Brian Campbell
df4051e0b1 docs: Fix short hash link to github
The escaped newline in the middle of the variable reference breaks the
short hash substitution, leaving the link text exmpty; rewrap so that
each replacement is on its own line.
2014-10-04 14:41:37 -04:00
bors
e434aa1cf7 auto merge of #17760 : bkoropoff/rust/issue-17737, r=eddyb
This is a quick fix.  In the long term, the `TyVisitor` interface should be expanded to better represent closure types.

Closes issue #17737
2014-10-04 17:47:06 +00:00
Brian Campbell
fe8f43030a docs: Reference hoedown instead of sundown 2014-10-04 13:42:23 -04:00
Luqman Aden
4b22178d32 Update LLVM. 2014-10-04 13:28:57 -04:00
Brian Koropoff
e364584071 Fix infinite recursion in Writer impl for &mut Writer
Closes issue #17767
2014-10-04 10:24:10 -07:00
bors
20f4c45bad auto merge of #17769 : dotdash/rust/snapshot, r=eddyb 2014-10-04 13:52:09 +00:00
Björn Steinbrink
2d93a0406b Register new snapshots 2014-10-04 15:44:50 +02:00
Peter Minten
2bb7956a83 Make examples for AtomicInt refer to AtomicInt
The examples for fetch_or, fetch_and and fetch_xor for
std::sync::atomic::AtomicInt used AtomicUint instead of AtomicInt.
2014-10-04 13:29:09 +02:00
bors
749ff5e76a auto merge of #17755 : alexcrichton/rust/unblock-snapshot, r=eddyb
Hopefully unblocks a snapshot
2014-10-04 06:12:08 +00:00
Brian Koropoff
6f6d13a7c7 Add regression test for issue #17758 2014-10-03 22:37:08 -07:00
Brian Koropoff
4c166abbbb Handle provided trait methods when giving inference error suggestions
This fixes an ICE.  Closes issue #17758
2014-10-03 22:36:54 -07:00
bors
8794107f74 auto merge of #17754 : O-I/rust/update-guide, r=steveklabnik
Hi,

These are a few small edits to the Guide that I made while reading online. Really well done and approachable.

I have a few questions below, but I don't know if this is the proper place to ask them, so feel free to ignore the below.

1. Trailing commas seem to be a convention in Rust and are used quite a bit throughout the Guide, but are never explicitly mentioned. Maybe adding a short mention about them when they first appear in the Structs section might be helpful to those who are unfamiliar with or don't use them in other languages.

2. In the Iterators section, there is a block of code like this:

```rust
let mut range = range(0i, 10i);

loop {
    match range.next() {
        Some(x) => {
            println!("{}", x);
        }  // no comma needed?
        None => { break }
    }
}
```

My inclination would be to put a comma where the comment is to separate the two arms to get this to compile, but it runs fine either way. Is there a convention on commas for scenarios like this where each arm is enclosed in `{}`?

All the best,
O-I
2014-10-04 04:27:05 +00:00
Brian Koropoff
404db68da4 Add regression test for issue #17737 2014-10-03 20:07:43 -07:00
bors
908c9e6a1b auto merge of #17752 : SimonSapin/rust/patch-6, r=thestinger
`v.len()` counts code units, not UTF-16 bytes. The lower bound is one UTF-8 byte per code unit, not per two code units.

I believe this is correct, but it’s late. Someone please double check.
2014-10-04 02:42:07 +00:00
Brian Koropoff
8e455ea07c Fix type visitor glue for unboxed closures
This is a quick fix that prevents an ICE by mimicing the visitor
glue for boxed closures and bare functions.  Ideally, the `TyVisitor`
interface will be improved in the future to allow representing
more information about unboxed closures such as Fn/FnMut/FnOnce
status, capture mode, and captured free variable types and offsets.

Closes issue #17737
2014-10-03 19:40:19 -07:00
bors
136ab3c6b1 auto merge of #17731 : bkoropoff/rust/unboxed-by-ref, r=pcwalton
This began as an attempt to fix an ICE in borrowck (issue #17655), but the rabbit hole went pretty deep.  I ended up plumbing support for capture-by-reference unboxed closures all the way into trans.

Closes issue #17655.
2014-10-04 00:17:04 +00:00
Alex Crichton
1e22b20884 test: Fix a test that fails when cross compiling
Hopefully unblocks a snapshot
2014-10-03 16:13:33 -07:00
bors
c348550f4f auto merge of #17743 : steveklabnik/rust/receiver_fix, r=alexcrichton 2014-10-03 22:32:02 +00:00
Rahul Horé
9040948ef3 Adds comma
Oddly (to me), this code runs fine without the comma separating the `Some` and `None` arms of the `match` construct. It seems like Rust doesn't require you to separate arms with commas if all the expressions are enclosed in braces.
2014-10-03 16:40:58 -04:00
Simon Sapin
80eb616bd3 Fix preallocation amount in String::from_utf16
`v.len()` counts code units, not UTF-16 bytes. The lower bound is one UTF-8 byte per code unit, not per two code units.
2014-10-03 21:20:04 +01:00
Rahul Horé
083b46dd29 Fixes wording 2014-10-03 15:59:57 -04:00
Rahul Horé
0eb4df9ace Removes extra . 2014-10-03 15:41:59 -04:00
Rahul Horé
d3f8f8a849 Adds missing cd 2014-10-03 14:47:57 -04:00
bors
ae81c89f34 auto merge of #17742 : alexcrichton/rust/rollup, r=alexcrichton
Trying to get a couple of these into the next snapshot.
2014-10-03 18:47:13 +00:00
Alex Crichton
39f4bf7b1c Test fixes from the rollup 2014-10-03 11:43:15 -07:00
Rahul Horé
816c56e1d5 Use similar syntax in all arms
See issue #17672. This was started in commit ee1cbb9c71, but there were a few more lines to update.
2014-10-03 14:41:55 -04:00
Rahul Horé
060224af68 Fixes output 2014-10-03 13:59:32 -04:00
Rahul Horé
e8ddad18e8 Adds trailing comma 2014-10-03 13:50:42 -04:00
Rahul Horé
8a6342f751 Fixes spacing 2014-10-03 13:37:05 -04:00
Steve Klabnik
71f752bbc4 Update signature of try_recv() 2014-10-03 11:58:52 -04:00
Till Hoeppner
3aea7f1889 Fix lev_distance 2014-10-03 16:46:30 +02:00
Alex Crichton
48cdb55d79 rollup merge of #17739 : eddyb/fix-process-test 2014-10-03 07:39:45 -07:00
Alex Crichton
4b6733ec88 rollup merge of #17741 : alexcrichton/travis-again 2014-10-03 07:38:45 -07:00
Alex Crichton
8993a0aeba rollup merge of #17730 : alexcrichton/snapshot 2014-10-03 07:38:41 -07:00
Alex Crichton
79d0e82f73 rollup merge of #17729 : alexcrichton/issue-17718-start 2014-10-03 07:38:29 -07:00