Commit graph

37867 commits

Author SHA1 Message Date
Vojtech Kral
33a3d6d88f Thread native name setting, fix #10302 2015-01-28 13:48:27 +01:00
Huon Wilson
76d66baf72 Use unsigned comparison operators for unsigned SIMD types.
Previously comparisons of SIMD types were always signed, even unsigned
comparisons, meaning 0xFFFF_FFFF_u32 < 0 inside a SIMD vector.

Fixes #21719.
2015-01-28 22:56:55 +11:00
bors
a45e117733 Auto merge of #21019 - nikomatsakis:issue-20871-ret-as-assoc-type, r=nrc
Fixes https://github.com/rust-lang/rust/issues/20871

r? @aturon (at least until we decide definitively if this is a good idea)
2015-01-28 11:01:36 +00:00
Niko Matsakis
05ffdc5824 Add regression test for #21212. Fixes #21212. 2015-01-28 05:59:50 -05:00
Niko Matsakis
aaf3df3667 Add new test for object method numbering mismatches. 2015-01-28 05:15:24 -05:00
Niko Matsakis
694432e935 Adjust comment per nrc's suggestion. 2015-01-28 05:15:24 -05:00
Niko Matsakis
aeeab35ec2 Add missing space to error message. 2015-01-28 05:15:24 -05:00
Niko Matsakis
09783d1dab Update test files; mostly the problem is that they were using the
explicit form `Fn<A,B>` and now should use `Fn(A) -> B` or
`Fn<A,Output=B>`, but in some cases we get duplicate error
reports. This is mildly annoying and arises because of the main error
and another error from the projection. Might be worth squashing those,
but seems like a separate problem.
2015-01-28 05:15:24 -05:00
Niko Matsakis
ac94ae5883 Update Rustdoc to deal with the Fn return type being an associated type. 2015-01-28 05:15:24 -05:00
Niko Matsakis
7bd19112ee Patch variance bug: appearing in a binding is an invariant position (at least right now). 2015-01-28 05:15:24 -05:00
Niko Matsakis
47c2d31038 Extract expectations from the projection obligation, which includes
all relevant information.
2015-01-28 05:15:24 -05:00
Niko Matsakis
25a27977fa Add Clone to the list of bounds for a TypeFolder. (Kill?) 2015-01-28 05:15:24 -05:00
Niko Matsakis
7d68250eb4 When pretty-printing object types, include the output associated type 2015-01-28 05:15:24 -05:00
Niko Matsakis
006f3eacae Fix a latent bug in trait dispatch where we sometimes counted associated types
when constructing the vtable-index. Not good.
2015-01-28 05:15:23 -05:00
Niko Matsakis
07cdb85331 Move return type an associated type of the Fn* traits. Mostly this involves tweaking things in
the compiler that assumed two input types to assume two ouputs; we also have to teach `project.rs`
to project `Output` from the unboxed closure and fn traits.
2015-01-28 05:15:23 -05:00
Niko Matsakis
c61d7889b4 Add the notion of normalizing a parameter environment and ensure that
all parameter environments are normalized. Correspondingly, stop
normalizing predicates we extract out of the environment. Fixes #21664.
2015-01-28 05:13:53 -05:00
Niko Matsakis
c73a1d0a2c Change list of predicates in ParameterEnvironment to a Vec. 2015-01-28 05:13:53 -05:00
Felix S. Klock II
d85520202a In unsize_unique_expr, do not convert scratch value to lvalue.
Fix the issue-20055-box-trait.rs test to actually test `Box<Trait>`.

Fix #21695.
2015-01-28 10:22:26 +01:00
Ms2ger
7aa2735393 Remove unnecessary to_string() call. 2015-01-28 09:42:16 +01:00
Ms2ger
4ad677e5b6 Remove a custom variant of iter::Cloned. 2015-01-28 09:42:16 +01:00
Ms2ger
f88c94d8d2 Simplify the implementation of segments_name_eq. 2015-01-28 09:39:28 +01:00
Ms2ger
d0a9a39b1e Rename found_ast to FoundAst and qualify uses.
This matches contemporary Rust style.
2015-01-28 09:37:04 +01:00
bors
06410ef9fb Auto merge of #21158 - alkor:issue-21131, r=nick29581
Closes #21131
2015-01-28 07:32:53 +00:00
bors
a530cc9706 Auto merge of #21248 - brson:feature-staging, r=alexcrichton
This implements the remaining bits of 'feature staging', as described in [RFC 507](https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md).

This is not quite done, but the substance of the work is complete so submitting for early review.

Key changes:
* `unstable`, `stable` and `deprecated` attributes all require 'feature' and 'since', and support an optional 'reason'.
* The `unstable` lint is removed.
* A new 'stability checking' pass warns when a used unstable library feature has not been activated with the `feature` attribute. At 1.0 beta this will become an error.
* A new 'unused feature checking' pass emits a lint ('unused_feature', renamed from 'unknown_feature') for any features that were activated but not used.
* A new tidy script `featureck.py` performs some global sanity checking, particularly that 'since' numbers agree, and also prints out a summary of features.

Differences from RFC:
* As implemented `unstable` requires a `since` attribute. I do not know if this is useful. I included it in the original sed script and just left it.
* RFC didn't specify the name of the optional 'reason' attribute.
* This continues to use 'unstable', 'stable' and 'deprecated' names (the 'nice' names) instead of 'staged_unstable', but only activates them with the crate-level 'staged_api' attribute.

I intend to update the RFC based on the outcome of this PR.

Issues:
* The unused feature check doesn't account for language features - i.e. you can activate a language feature, not use it, and not get the error.

Open questions:
* All unstable and deprecated features are named 'unnamed_feature', which i picked just because it is uniquely greppable. This is the 'catch-all' feature. What should it be?
* All stable features are named 'grandfathered'. What should this be?

TODO:
* Add check that all `deprecated` attributes are paired with a `stable` attribute in order to preserve the knowledge about when a feature became stable.
* Update rustdoc in various ways.
* Remove obsolete stability discussion from reference.
* Add features for 'path', 'io', 'os', 'hash' and 'rand'.

cc #20445 @alexcrichton @aturon
2015-01-28 03:59:14 +00:00
Jorge Aparicio
57dd4ea78d fix #[cfg(test)] warnings 2015-01-27 22:58:45 -05:00
John Hodge
1c502f1d43 README.md - Fix source tarball link 2015-01-28 10:12:54 +08:00
Brian Anderson
94404070d6 discuss.rust-lang.org -> internals.rust-lang.org 2015-01-27 15:44:05 -08:00
Jonathan Reem
83f8088108 Add an implementation of Zeroable for Unique<T>
This allows the use of `NonZero<Unique<T>>` for owned,
non-null raw pointers.

cc https://github.com/Gankro/collect-rs/pull/103
2015-01-27 18:17:04 -05:00
Manish Goregaokar
249c29fe27 Rollup merge of #21666 - tshepang:rm-unloved-file, r=brson
See 579eb24
2015-01-28 04:40:48 +05:30
bors
92ff8ea528 Auto merge of #21523 - nikomatsakis:issue-21245-japaric-ti-failure, r=eddyb
This also includes some miscellaneous cleanup. This is kind of a band-aid but it fixes the problems @japaric was encountering.

r? @eddyb
2015-01-27 23:08:13 +00:00
Manish Goregaokar
78567f1244 Rollup merge of #21667 - nagisa:sbook-links, r=Gankro
Fixes #21665

r? @steveklabnik
2015-01-28 04:37:50 +05:30
Manish Goregaokar
1df030059b Rollup merge of #21676 - Victory:fix-deprication-in-random, r=alexcrichton
Cleanup mention of uint, use usize/us instead. This includes the example `println!("{}", 2u * x);`
2015-01-28 04:35:57 +05:30
Brian Anderson
7122305053 Merge remote-tracking branch 'rust-lang/master'
Conflicts:
	src/libcore/cell.rs
	src/librustc_driver/test.rs
	src/libstd/old_io/net/tcp.rs
	src/libstd/old_io/process.rs
2015-01-27 15:05:04 -08:00
Manish Goregaokar
2ac91a382d Rollup merge of #21686 - richo:python-fixes, r=alexcrichton
While waiting on some builds I started cleaning up the various python bits and pieces.

I'm going to keep poking, want to ping me before the next rollup?
2015-01-28 04:34:40 +05:30
Manish Goregaokar
28b0271f89 Rollup merge of #21658 - Manishearth:index_on_unimplemented, r=Gankro
Helps issues like [these](http://www.reddit.com/r/rust/comments/2tpefm/unable_to_access_array_elements/)

r? @Gankro

rollup-worthy
2015-01-28 04:32:20 +05:30
Niko Matsakis
093926e841 Check and extract bindings from trait definitions.
Fixes #21636.
2015-01-27 15:39:58 -05:00
Felix S. Klock II
5b66c6dfa4 Test cases for issue #20055.
Note that I have not yet managed to expose any bug in
`trans::expr::into_fat_ptr`; it would be good to try to do so (or show
that the use of `.to_lvalue_datum` there is sound).
2015-01-27 18:20:43 +01:00
Felix S. Klock II
326443105b trans: When coercing to Box<Trait> or Box<[T]>, leave datum in its original L-/R-value state.
This fixes a subtle issue where temporaries were being allocated (but
not necessarily initialized) to the (parent) terminating scope of a
match expression; in particular, the code to zero out the temporary
emitted by `datum.store_to` is only attached to the particular
match-arm for that temporary, but when going down other arms of the
match expression, the temporary may falsely appear to have been
initialized, depending on what the stack held at that location, and
thus may have its destructor erroneously run at the end of the
terminating scope.

Test cases to appear in a follow-up commit.

Fix #20055
2015-01-27 18:12:34 +01:00
Manish Goregaokar
335e8af98a Rollup merge of #21625 - carols10cents:sliceext-examples, r=alexcrichton
Hi! I added some examples to some SliceExt methods that didn't have any.

I'm looking forward to feedback and I'm happy to change anything-- it looks like the doc conventions are still a bit in flux, based on the discussions going on in [rfc 505](https://github.com/rust-lang/rfcs/pull/505).

I was most unsure about examples for methods that return iterators over slices... I wanted to use asserts on the result of calling `.next()` like in [this permutations example](804c1446b3/src/libcollections/slice.rs (L608-L617)), but then it gets all cluttered up with lifetime stuff... so I went with iterating and printing and mentioning what the expected printed output is like in [this chunks example](804c1446b3/src/libcollections/slice.rs (L297-L304))... any ideas for the best ways to do this are appreciated.

Thank you! ❤️
2015-01-27 22:24:04 +05:30
Manish Goregaokar
4af4b377a0 Rollup merge of #21624 - emanueLczirai:vim_syntastic_fix, r=sanxiyn
when saving .rs files under vim
do not fail to run the syntax checker
error: Unrecognized option: 'parse-only'.

due to this commit
953f294ea3
which removed the deprecated flag --parse-only
2015-01-27 22:24:04 +05:30
Manish Goregaokar
36d0e90e6b Rollup merge of #21623 - dinfuehr:patch-1, r=alexcrichton 2015-01-27 22:24:03 +05:30
Manish Goregaokar
cb63bcb98c Rollup merge of #21618 - snowe2010:documentation, r=Gankro
Lifetime elision with two input references is not clear.
Closes #21284
2015-01-27 22:24:03 +05:30
Manish Goregaokar
54cdae693c Rollup merge of #21612 - bombless:patch-3, r=alexcrichton 2015-01-27 22:24:03 +05:30
Manish Goregaokar
3cda6afac4 Rollup merge of #21608 - JeffBelgum:collections-reform-issue-19986-add-append-and-split-off, r=Gankro
@brson @Gankro
2015-01-27 22:24:03 +05:30
Manish Goregaokar
51ff9e82ec Rollup merge of #21602 - japaric:derive-copy, r=alexcrichton 2015-01-27 22:24:02 +05:30
Manish Goregaokar
8418725b0d Rollup merge of #21597 - iKevinY:mobile-api-docs, r=cmr
This PR removes the `min-width` rule from `body` so that no horizontal scrolling is necessary on mobile, and also hides out-of-band information on mobile to create more room for the in-band information.
2015-01-27 22:24:02 +05:30
Manish Goregaokar
e7bcb27939 Rollup merge of #21591 - GuillaumeGomez:hash, r=alexcrichton
Fixes #21547 issue.
2015-01-27 22:24:02 +05:30
Edward Wang
2c6440e2a2 borrowck: aliasability violation with closure captures can happen
It was considered to be impossible but actually it can
happen for nested closures. Also, because there must
be nested closures when this happens, we can use more
targeted help message.

Closes #21390
Closes #21600
2015-01-27 23:55:07 +08:00
Vojtech Kral
c155208de4 Thread native name setting, fix #10302 2015-01-27 16:00:26 +01:00
Niko Matsakis
8d6786cd6c Adjust error messages due to having more type information available. 2015-01-27 09:40:45 -05:00