Commit Graph

37269 Commits

Author SHA1 Message Date
Barosl LEE
01ae97b45e Rollup merge of #21427 - steveklabnik:generics_fix, r=alexcrichton
Multiple people have asked me if this is a reference to Hacker News, and
I _certainly_ don't want to give them that impression.
2015-01-21 02:16:52 +09:00
Barosl LEE
c49d428165 Rollup merge of #21424 - sanxiyn:coerce-mut, r=nikomatsakis
This is caught in borrowck now, but catching in typeck is faster and improves diagnostics.

CC #17561.

r? @nikomatsakis
2015-01-21 02:16:52 +09:00
Barosl LEE
1d206e2872 Rollup merge of #21404 - japaric:hash, r=alexcrichton
closes #21402
cc #15294

r? @alexcrichton or @aturon 
cc @ExpHP (btw, this only covers arrays with arity up to 32)
2015-01-21 02:16:52 +09:00
Barosl LEE
5b57aa757b Rollup merge of #21399 - kballard:fix-PLEASE_BENCH, r=Gankro
611ef49f2f removed all the metrics stuff
from tests.mk, but this meant that `PLEASE_BENCH=1` no longer did
anything.

Fixes #21324.
2015-01-21 02:16:52 +09:00
Barosl LEE
8d05f6c74c Rollup merge of #21388 - aochagavia:collections, r=Gankro
**Breaking change**: `VecMap::into_iter` now consumes the `VecMap`. To fix it you should pass the VecMap by value instead of by reference.

[breaking-change]

r? @Gankro
2015-01-21 02:16:51 +09:00
Barosl LEE
3d6568fcb2 Rollup merge of #21387 - retep998:hmodule, r=alexcrichton
r? @alexcrichton
2015-01-21 02:16:51 +09:00
Barosl LEE
b9588393ee Rollup merge of #21386 - Diggsey:issue-21384, r=alexcrichton
Fixes #21384
2015-01-21 02:16:51 +09:00
Barosl LEE
adc7afd69a Rollup merge of #21380 - tshepang:patch-3, r=steveklabnik 2015-01-21 02:16:51 +09:00
Barosl LEE
0225f9a380 Rollup merge of #21123 - visualfc:master, r=alexcrichton
example:
let m = "hello \
           world";
2015-01-21 02:16:51 +09:00
Barosl LEE
c5fd58d512 Rollup merge of #21377 - iKevinY:speedy-tidy, r=huonw
`x in y` is more Pythonic than `y.find(x) != -1`. I believe it runs quite a bit faster as well (though it's probably not a bottleneck of the Travis builds):

```bash
$ python -m timeit '"abc".find("a") != -1'
1000000 loops, best of 3: 0.218 usec per loop
$ python -m timeit '"a" in "abc"'
10000000 loops, best of 3: 0.0343 usec per loop
```
2015-01-21 02:16:50 +09:00
Barosl LEE
a79f1921a9 Rollup merge of #21375 - petrochenkov:ssbsl, r=alexcrichton
After PR #19766 added implicit coersions `*mut T -> *const T`, the explicit casts can be removed.
(The number of such casts turned out to be relatively small).
2015-01-21 02:16:50 +09:00
Barosl LEE
0efdda314a Rollup merge of #21369 - iKevinY:no-travis-notes, r=sanxiyn
Updated `tidy.py` to skip printing NOTEs if the [`TRAVIS`](http://docs.travis-ci.com/user/ci-environment/#Environment-variables) environment variable is set.
2015-01-21 02:16:49 +09:00
Barosl LEE
75efb22808 Rollup merge of #21359 - WiSaGaN:bugfix/fix_marker, r=alexcrichton
From std::markers to std::marker.
2015-01-21 02:16:49 +09:00
Barosl LEE
33ea011574 Rollup merge of #21358 - glacjay:patch-2, r=alexcrichton 2015-01-21 02:16:49 +09:00
Barosl LEE
567bf6ca8c Rollup merge of #21357 - kimroen:patch-1, r=sanxiyn
Having both "Right now" and "at the moment" in the same statement is redundant.
2015-01-21 02:16:49 +09:00
Barosl LEE
6a5c948a00 Rollup merge of #21100 - tstorch:small_readability_update, r=alexcrichton
Why not use what is there?
2015-01-21 02:16:48 +09:00
Barosl LEE
4419fa39c2 Rollup merge of #21345 - glacjay:patch-1, r=alexcrichton
The reference should be `x`, not `FOO` itself.
2015-01-21 02:16:48 +09:00
Barosl LEE
f836f1e412 Rollup merge of #21339 - thorncp:api-docs-search, r=alexcrichton
Increases the delay of the search box to 500ms after key up. I tried
adding a three character minimum for setting the delay, but didn't find
it very useful.

Should close #20095

@Jurily, your input is welcome!
2015-01-21 02:16:48 +09:00
Barosl LEE
fa0c2c5e46 Rollup merge of #21336 - rylev:better-nofile-error, r=brson
Contribution from @look!

Addresses https://github.com/rust-lang/rust/issues/21329
2015-01-21 02:16:48 +09:00
Barosl LEE
efa8360f98 Rollup merge of #21331 - michaelsproul:sync-error-impls, r=alexcrichton
Two errors in `std::sync` are currently missing implementations of the standard error trait because they contain types which aren't `Send`.

This PR therefore requires #21312.
2015-01-21 02:16:47 +09:00
Barosl LEE
b3f6e82beb Rollup merge of #21048 - aroben:patch-1, r=steveklabnik
Now both the enum values and the prose describing them mention the values in the same order.
2015-01-21 02:16:47 +09:00
Barosl LEE
356c61da8d Rollup merge of #21326 - look:nano-syntax-highlighting, r=kmcallister
rust.nanorc provides syntax highlighting for Rust. An attempt has been made to make the syntax highlighting look good on both dark and light terminals. Issue #21286.

This PR is dedicated to @substars and nano-lovers everywhere.
2015-01-21 02:16:47 +09:00
Barosl LEE
29ece80d34 Rollup merge of #21314 - fenhl:patch-1, r=steveklbanik
See [this document](https://gist.github.com/0xabad1dea/8870b192fd1758743f66) by @0xabad1dea for the rationale.
2015-01-21 02:16:47 +09:00
Barosl LEE
e63443d536 Rollup merge of #21312 - michaelsproul:remove-error-send-bound, r=aturon
As discussed with @aturon, this PR removes the `Send` bound from `std::error::Error`, allowing us to implement `Error` for error types containing non-`Send` types. Current examples include `PoisonError` and `TryLockError` from `std::sync` which contain a Guard that we don't want sent between tasks.

[breaking-change]
2015-01-21 02:16:47 +09:00
Barosl LEE
409c9972a9 Rollup merge of #21309 - thorncp:rustdoc-man-page, r=kmcallister
Brings the rustdoc man page in sync with the options specified in
src/librustdoc/lib.rs. The text was taken verbatim, but I tweaked the
order to be (what I think is) somewhat logical.

This should close #13622.
2015-01-21 02:16:46 +09:00
Barosl LEE
8f5ab04b47 Rollup merge of #21302 - gutworth:rm-find-equiv-test, r=brson 2015-01-21 02:16:46 +09:00
Barosl LEE
d8a892303c Rollup merge of #21294 - alfie:typo, r=steveklabnik
Wrong verb.
2015-01-21 02:16:46 +09:00
Barosl LEE
b7afe5ec27 Rollup merge of #21355 - alfie:suffix, r=steveklabnik
More [u]int => [i|u]size and [i|u] => [i|u]s changes
2015-01-21 02:16:46 +09:00
Barosl LEE
9db869b348 Rollup merge of #21280 - timparenti:old-guide-stub-grammar, r=alexcrichton
This removes the extra "the" from the phrase "the the Rust Programming Language book", which isn't particularly grammatical, in stub documents introduced in #20802 to direct users from the old guides to the corresponding sections of the book.
2015-01-21 02:16:45 +09:00
Barosl LEE
1d8b917811 Rollup merge of #20998 - estsauver:20984, r=steveklabnik
There are a large number of places that incorrectly refer
to deriving in comments, instead of derives.

If someone could look at src/etc/generate-deriving-span-tests.py,
I'm not sure how those tests were passing before/if they were.
2015-01-21 02:16:45 +09:00
Steve Klabnik
e361b38888 Small fix in TRPL 3.9
Multiple people have asked me if this is a reference to Hacker News, and
I _certainly_ don't want to give them that impression.
2015-01-20 11:36:29 -05:00
Seo Sanghyeon
5cd9a69832 Forbid coercing &T to &mut T 2015-01-20 22:56:53 +09:00
bors
ffd8cb79a2 Auto merge of #21364 - cmr:fix-ttseq-ice, r=alexcrichton
Closes #21350
2015-01-20 13:36:03 +00:00
bors
3bf41dafcf Auto merge of #21304 - lifthrasiir:htmldocck, r=alexcrichton
The script is intended as a tool for doing every sort of verifications amenable to Rustdoc's HTML output. For example, link checkers would go to this script. It already parses HTML into a document tree form (with a slight caveat), so future tests can make use of it.

As an example, relevant `rustdoc-*` run-make tests have been updated to use `htmldocck.py` and got their `verify.sh` removed. In the future they may go to a dedicated directory with htmldocck running by default. The detailed explanation of test scripts is provided as a docstring of htmldocck.

cc #19723
2015-01-20 06:45:02 +00:00
bors
9006c3c0f1 Auto merge of #21287 - alexcrichton:issue-19872, r=huonw
cc #19872, this may help give some insight
2015-01-20 04:23:28 +00:00
bors
e375a892f1 Auto merge of #21257 - alexcrichton:issue-20064, r=pnkfelix
These two attributes are used to change the entry point into a Rust program, but
for now they're being put behind feature gates until we have a chance to think
about them a little more. The #[start] attribute specifically may have its
signature changed.

This is a breaking change to due the usage of these attributes generating errors
by default now. If your crate is using these attributes, add this to your crate
root:

    #![feature(start)] // if you're using the #[start] attribute
    #![feature(main)]  // if you're using the #[main] attribute

cc #20064
2015-01-20 02:23:49 +00:00
bors
65b61ffb3f Auto merge of #21165 - alexcrichton:second-pass-type-id, r=aturon
This commit aims to stabilize the `TypeId` abstraction by moving it out of the
`intrinsics` module into the `any` module of the standard library. Specifically,

* `TypeId` is now defined at `std::any::TypeId`
* `TypeId::hash` has been removed in favor of an implementation of `Hash`.

This commit also performs a final pass over the `any` module, confirming the
following:

* `Any::get_type_id` remains unstable as *usage* of the `Any` trait will likely
  never require this, and the `Any` trait does not need to be implemented for
  any other types. As a result, this implementation detail can remain unstable
  until associated statics are implemented.
* `Any::downcast_ref` is now stable
* `Any::downcast_mut` is now stable
* `BoxAny` remains unstable. While a direct impl on `Box<Any>` is allowed today
  it does not allow downcasting of trait objects like `Box<Any + Send>` (those
  returned from `Thread::join`). This is covered by #18737.
* `BoxAny::downcast` is now stable.
2015-01-19 23:35:12 +00:00
bors
7f8c687fdf Auto merge of #19490 - oli-obk:json_non_string_key_maps, r=alexcrichton
importing object type string key maps is still supported
writing them should be explicit, and can be done as follows

```rust
let some_tree_map : TreeMap<String, Json> = ...;
Json::Object(some_tree_map).to_writer(&mut writer);
```

related to #8335, #9028, #9142
2015-01-19 21:37:52 +00:00
Jorge Aparicio
a09df2cb9d impl Hash for arrays
closes #21402
cc #15294
2015-01-19 15:29:27 -05:00
bors
4032b85aec Auto merge of #21278 - thchittenden:issue-21033-struct-var-pattern-fix, r=alexcrichton
Closes #21033. The new strategy for parsing a field pattern is to look 1 token ahead and if it's a colon, parse as "fieldname: pat", otherwise parse the shorthand form "(box) (ref) (mut) fieldname)". The previous strategy was to parse "(ref) (mut) fieldname" then if we encounter a colon, throw an error if either "ref" or "mut" were encountered.
2015-01-19 19:40:51 +00:00
Kevin Ballard
c166017445 Fix make check PLEASE_BENCH=1
611ef49f2f removed all the metrics stuff
from tests.mk, but this meant that `PLEASE_BENCH=1` no longer did
anything.

Fixes #21324.
2015-01-19 10:59:57 -08:00
bors
54c9a4655b Auto merge of #20082 - pczarn:btree-bounded-iter, r=Gankro
Part of collections reform v1, #18424
Also, iteration is simplified:
```
before
test btree::map::bench::iter_1000                          ... bench:     17177 ns/iter (+/- 6302)
test btree::map::bench::iter_100000                        ... bench:   1735731 ns/iter (+/- 23908)
test btree::map::bench::iter_20                            ... bench:       386 ns/iter (+/- 148)
after
test btree::map::bench::iter_1000                          ... bench:     15777 ns/iter (+/- 346)
test btree::map::bench::iter_100000                        ... bench:   1602604 ns/iter (+/- 73629)
test btree::map::bench::iter_20                            ... bench:       339 ns/iter (+/- 91)
```
cc @gereeter @cgaebel
r? @Gankro
2015-01-19 17:43:47 +00:00
Tom Chittenden
d8372139a7 Fixes #21033 with accompanying test. 2015-01-19 11:58:01 -05:00
Piotr Czarnecki
429c23d5f4 Implement range and range_mut for BTree
Simplify BTree's iterators, too.
2015-01-19 17:48:59 +01:00
Adolfo Ochagavía
b4090aa730 Add test for #21328 2015-01-19 17:29:48 +01:00
bors
cda3490f8f Auto merge of #21269 - alexcrichton:issue-6936, r=pnkfelix
This commit modifies resolve to prevent conflicts with typedef names in the same
method that conflits are prevented with enum names. This is a breaking change
due to the differing semantics in resolve, and any errors generated on behalf of
this change require that a conflicting typedef, module, or structure to be
renamed so they do not conflict.

[breaking-change]
Closes #6936
2015-01-19 15:44:41 +00:00
Adolfo Ochagavía
c3ac929ba9 Add a Drain iterator to VecMap 2015-01-19 15:23:52 +01:00
Oliver 'ker' Schneider
a320149dcc ugly hack to convert BadHashMapKey error to general fmt::Error 2015-01-19 14:22:17 +01:00
Oliver 'ker' Schneider
0478a8c1d7 add unit test for non string/numeric map keys 2015-01-19 14:22:16 +01:00
Oliver 'ker' Schneider
d727f99107 lower FnMut to FnOnce since json-hack is no longer required
Conflicts:
	src/libserialize/serialize.rs
2015-01-19 14:22:16 +01:00