Commit Graph

39217 Commits

Author SHA1 Message Date
Nick Cameron
6f9b91d429 save-analysis: handle type defs in struct patterns 2015-02-23 08:16:04 +13:00
Steve Klabnik
27f357106e Improve documentation for libcollections/str 2015-02-22 14:15:10 -05:00
Steve Klabnik
d7c02c39e5 Link from literals to their representation
Fixes #22152
2015-02-22 14:13:16 -05:00
Markus Unterwaditzer
a499148457 Fix another occurrence of #22243 2015-02-22 17:13:41 +01:00
Flavio Percoco
7ff11d7be8 Unify lifetime/type arguments error messages for (non-)builtin bounds 2015-02-22 16:31:19 +01:00
Flavio Percoco
a1945197c3 continue when builtin bounds are registered 2015-02-22 16:31:19 +01:00
Ahmed Charles
3ebdbac265 Do not permit type parameters on builtin bounds. 2015-02-22 16:31:19 +01:00
Simonas Kazlauskas
9be8ec82ce Properly translate methods with foreign CC
This fixes a general issue of trying to define extern functions inside impl blocks resulting in
ICE.

Fixes #21238
Fixes #20734
Fixes #19047
2015-02-22 16:04:18 +02:00
Simonas Kazlauskas
0c25e6f509 Convert some panics to bug diagnostics in trans 2015-02-22 16:03:21 +02:00
Jake Goulding
c5a3cbb45b Fix typos in CStr docs 2015-02-22 08:52:07 -05:00
Markus Siemens
25d3e01a5a Implement append and split_off for VecMap (RFC 509)
Implements `append()` and `split_off()` for `VecMap`. It's worth noting
that `append()` will overwrite existing keys (the RFC doesn't specify how
`append()` should handle duplicate keys).

cc #19986
2015-02-22 13:41:53 +01:00
Niko Matsakis
3dcc631dee Add additional test case for superregion 2015-02-22 13:17:50 +01:00
Björn Steinbrink
b593c60c33 Add missing cast for retslots in case of "subtyping" due to trait bounds
We already do this for the function arguments, but miss it for the
retslot pointer, which can lead to LLVM assertions because the retslot
has the wrong type.

Fixes #22663
2015-02-22 12:47:27 +01:00
Simonas Kazlauskas
c9d0967383 Validate inline attribute arguments 2015-02-22 13:44:28 +02:00
James Miller
85defffea5 Improve borrowck error when a second move is due to a loop.
(Factoring of aatch CFG code, Part 5.)
2015-02-22 12:43:09 +01:00
James Miller
4bae133070 revise handling of match expressions so that arms branch to next arm.
Update the graphviz tests accordingly.

Fixes #22073. (Includes regression test for the issue.)

(Factoring of aatch CFG code, Part 4.)
2015-02-22 12:43:08 +01:00
James Miller
eb4961b961 Add support for mapping a single ast-node to multiple cfg-nodes.
This is necessary for e.g. supporting the cfgs we plan to construct
for match under aatch's plan.

(Factoring of aatch CFG code, Part 3.)
2015-02-22 12:43:03 +01:00
James Miller
a0b7bad00e remove the exit_map field, it is unnecessary.
(Factoring of aatch CFG code, Part 2.)
2015-02-22 12:01:59 +01:00
James Miller
97c1711894 Distinguish between AST and various Dummy nodes in CFG.
(Factoring of aatch CFG code, Part 1.)
2015-02-22 12:01:58 +01:00
bors
dcc6ce2c77 Auto merge of #22574 - huonw:remove-lame-statics, r=alexcirchton
Add a basic test that checks that the types catch the most glaring
errors that could occur.

cc #22444
2015-02-22 10:27:08 +00:00
bors
eb1b500a9a Auto merge of #22548 - Manishearth:rollup, r=Manishearth
I had most of these tested locally, why not  get them out of the way too?
2015-02-22 10:15:40 +00:00
Kevin Yap
24fa6be7c6 Miscellaneous README changes
- Various grammatical changes.
- Use triple-backtick syntax and sh highlighting for code blocks.
- Fix indentation of code block in step 2 of "Building on Windows".
- Use title case for "Getting Help" subheading.
2015-02-21 23:40:09 -08:00
Chris Wong
a7594f2d5b Disallow crate names with leading hyphens
Leading hyphens already don't work (#22661), so no code should break
from this change.

Closes #22661.
2015-02-22 20:05:05 +13:00
Alexander Chernyakhovsky
928341e188 Include tuple indexing in the Reference.
The Rust Reference should include the tuple indexing (using a number
as a field) notation; currently it is only available on
http://doc.rust-lang.org/std/primitive.tuple.html and not easily
searchable.
2015-02-22 00:25:12 -05:00
GlacJAY
c2a2b10507 shift int/uint tests around to avoid code repetition 2015-02-22 11:38:35 +08:00
Flavio Percoco
038d7e69e8 Fix test fallouts 2015-02-22 02:14:27 +01:00
Flavio Percoco
753db88914 allow negative impls for traits that have a default impl 2015-02-22 02:14:27 +01:00
Flavio Percoco
d021c55fb9 Restore the coherence visitor and fix fallouts 2015-02-22 02:14:27 +01:00
Niko Matsakis
3343e9c169 Add new test for impl precedence and remove unnecessary coherence rules that prevent the test from compiling. 2015-02-22 02:14:27 +01:00
Flavio Percoco
6d1844c806 Record default implementations in a separate step 2015-02-22 02:14:27 +01:00
Niko Matsakis
3ebc2abc6a tweak exhaustive matching of ty_infer 2015-02-22 02:14:27 +01:00
Niko Matsakis
640000a7c0 fix treatment of parameters and associated types 2015-02-22 02:14:27 +01:00
Flavio Percoco
1cc5a87c08 Don't report bug for IntVar and FloatVar 2015-02-22 02:14:27 +01:00
Flavio Percoco
38ef5ee48f Check constituent types are known 2015-02-22 02:14:27 +01:00
Niko Matsakis
e8df95d77f mark candidate set ambig for defaulted traits where self-type is not yet known 2015-02-22 02:14:27 +01:00
Niko Matsakis
24bdce4bbf some comments and nits 2015-02-22 02:14:26 +01:00
Flavio Percoco
64d33d892a check supertraits 2015-02-22 02:14:26 +01:00
Niko Matsakis
f7a75e0341 Add new test case showing that supertraits are not enough 2015-02-22 02:14:26 +01:00
Flavio Percoco
7213ef1a8f Test all the things 2015-02-22 02:14:26 +01:00
Flavio Percoco
0be1e430cf Fix error codes 2015-02-22 02:14:26 +01:00
Niko Matsakis
40fffc9e3f Some nits and cleanup 2015-02-22 02:14:26 +01:00
Flavio Percoco
d215411911 Make Send/Sync go through the default implementation path 2015-02-22 02:14:26 +01:00
Flavio Percoco
1e3ed61d82 Coherence for default trait implementations
- Don't allow multiple default trait implementations
- Allow positive trait implementations just for structs and enums when
  there's a default implementation for such trait.
2015-02-22 02:14:25 +01:00
Flavio Percoco
f0e9bd9099 address nits 2015-02-22 02:14:25 +01:00
Flavio Percoco
d38aab397e Rename DefTrait to DefaultImpl 2015-02-22 02:14:25 +01:00
Flavio Percoco
7e382132a5 Make default_trait_impls private and add accessor 2015-02-22 02:14:25 +01:00
Flavio Percoco
d523acb495 Use a Vec<N> instead of VecPerParamSpace<N> 2015-02-22 02:14:25 +01:00
Flavio Percoco
4b09209efe Ensure default trait impls hold 2015-02-22 02:14:25 +01:00
Flavio Percoco
58a8103df9 Fix rustdoc fallout 2015-02-22 02:14:25 +01:00
Flavio Percoco
7ae8889286 Add negative impls for Sync 2015-02-22 02:14:24 +01:00