Commit Graph

23872 Commits

Author SHA1 Message Date
Niko Matsakis
195f1d77bd Rename and modernize region enum names 2013-11-08 19:47:57 -05:00
Niko Matsakis
5e54a7323d Update various tests and libraries that were incorrectly
annotated.
2013-11-08 19:45:50 -05:00
Niko Matsakis
f57a28b2db Improve error reporting for region inference failures to make use of
all the information it has at its disposal. Unfortunately this also
reveals that we need to improve the reporting heuristics further,
as sometimes the errors it chooses to emit seem somewhat mystifying
and are not related to the actual problem.
2013-11-08 19:45:49 -05:00
Niko Matsakis
168ac5290e Move comparing of impl methods against trait from collect to check.
This code fits better in check because it is checking that the impl
matches the interface. This allows us to avoid the awkward constructions
that lazilly collect traits and so forth. It also permits us to make
use of the results of variance inference.
2013-11-08 19:45:49 -05:00
Niko Matsakis
9d3f57ef08 Introduce new variance inference pass that replaces (and generalizes) old
region-parameterization/variance inference. We now compute variance for
type parameters but do not make use of it (most of the way towards #3598).
2013-11-08 19:43:20 -05:00
Niko Matsakis
1f4faaee40 Generalize AST and ty::Generics to accept multiple lifetimes. 2013-11-08 19:42:46 -05:00
Tim Chevalier
06b2905ee1 extra / rustpkg: Make getopts::opt_val private again
and use opt_str instead of opt_val in rustpkg

Closes #9311
2013-11-08 16:20:25 -08:00
Tim Chevalier
b60de8a1f6 rustpkg: Add a test that rustpkg install doesn't copy a non-changed file
This bug was already fixed, just needed a test.

Closes #9569
2013-11-08 16:03:18 -08:00
Tomas Sedovic
0865b4d745 Implement IterBytes for TypeId 2013-11-08 23:32:59 +01:00
Niko Matsakis
85c51d3b02 Introduce ty_fold mechanism and port our various folders to use
it. This should eventually be merged with the Subst trait.
2013-11-08 17:22:38 -05:00
Andrei Formiga
ca22e94772 Added a FIXME with issue number to change package_id 2013-11-08 18:59:44 -03:00
Niko Matsakis
8e1de17757 Create a new pass to resolve named lifetimes; rscope is not only
used to indicate when anonymous regions (i.e., &T) are permitted
2013-11-08 16:52:36 -05:00
Andrei Formiga
455de85163 Specify package_id for rust libs, to avoid spurious warnings 2013-11-08 17:42:46 -03:00
Andrei Formiga
23387b062d Added tests for default generation of package_id meta attribute 2013-11-08 17:42:46 -03:00
Andrei Formiga
cf24280a3c Added default value for package_id attribute when encoding metadata for lib crates 2013-11-08 17:42:46 -03:00
Andrei Formiga
ffcbd8d767 Add default 'package_id' link meta for crates (with value equal to 'name') 2013-11-08 17:42:46 -03:00
bors
a594a999fb auto merge of #10355 : huonw/rust/deriving-field-spans, r=alexcrichton
This rearranges the deriving code so that #[deriving] a trait on a field
that doesn't implement that trait will point to the field in question,
e.g.

    struct NotEq; // doesn't implement Eq

    #[deriving(Eq)]
    struct Foo {
        ok: int,
        also_ok: ~str,
        bad: NotEq // error points here.
    }

Unfortunately, this means the error is disconnected from the `deriving`
itself but there's no current way to pass that information through to
rustc except via the spans, at the moment.

Fixes #7724.
2013-11-08 08:36:08 -08:00
bors
9d8dc004a0 auto merge of #10354 : thestinger/rust/vector, r=huonw
This section desperately needs to be expanded, but removing the
misleading/incorrect information is a priority.

Managed vectors/strings are not covered, as they are feature-gated and
are only a micro-optimization to avoid double-indirection.

Closes #6882
2013-11-08 05:46:04 -08:00
bors
4ce7d573e8 auto merge of #10348 : ksh8281/rust/fix_android_timegm, r=yichoi
fix timegm bug on android
TZ restore not correctly before.
and it cause test case fail (time::tests::run_tests::test_convertions)

with @sammykim
2013-11-08 04:36:12 -08:00
bors
35c3aaf5c5 auto merge of #10346 : klutzy/rust/mingw64-32-fix, r=alexcrichton
Fixes #10327
2013-11-08 03:26:07 -08:00
bors
bfa80f7d6f auto merge of #10344 : brson/rust/atomiccopy, r=alexcrichton
I didn't try to add clone methods since it's not clear to me which types are appropriate to clone or what the memory ordering should be.
2013-11-08 02:11:09 -08:00
Huon Wilson
812ea9e169 syntax::ext: Make type errors in deriving point to the field itself.
This rearranges the deriving code so that #[deriving] a trait on a field
that doesn't implement that trait will point to the field in question,
e.g.

    struct NotEq; // doesn't implement Eq

    #[deriving(Eq)]
    struct Foo {
        ok: int,
        also_ok: ~str,
        bad: NotEq // error points here.
    }

Unfortunately, this means the error is disconnected from the `deriving`
itself but there's no current way to pass that information through to
rustc except via the spans, at the moment.

Fixes #7724.
2013-11-08 20:57:34 +11:00
Daniel Micay
eca52e682b tutorial: rewrite the section vectors/strings
This section desperately needs to be expanded, but removing the
misleading/incorrect information is a priority.

Managed vectors/strings are not covered, as they are feature-gated and
are only a micro-optimization to avoid double-indirection.

Closes #6882
2013-11-08 04:47:06 -05:00
bors
57d1ed819b auto merge of #10303 : niftynif/rust/master, r=catamorphism
r? @catamorphism
First contribution; contains struct definitions and some useful traits.  Can possibly be improved by removing the dependence on the Clone trait.  This is intended to be the beginning of a long-term project.
2013-11-08 00:11:07 -08:00
niftynif
2f1b4335cb Added proper //! documentation to the beginning of btree.rs. 2013-11-08 02:41:09 -05:00
bors
acbcb9ed2e auto merge of #10341 : willingc/rust/minor-docfix, r=huonw
...rt::io
2013-11-07 23:01:11 -08:00
sh8281.kim
09257df055 fix android timegm 2013-11-08 15:44:36 +09:00
klutzy
d01ba2e824 Define WSAPOLLFD only on mingw 4.x
Fixes #10327
2013-11-08 15:00:40 +09:00
bors
075347b445 auto merge of #10281 : klutzy/rust/rt-timezone, r=alexcrichton
Previously #9418 fixed utf-8 assertion issue by wcsftime,
but the function didn't work as expected: it follows the locale
set by setlocale(), not the system code page.
This patch fixes it by manual multibyte-to-unicode conversion.
2013-11-07 21:41:07 -08:00
klutzy
fe18fe0f88 extra::time: Fix test on Windows
Closes #10307
2013-11-08 14:19:25 +09:00
bors
d26776a775 auto merge of #10340 : eholk/rust/url, r=brson
According to http://tools.ietf.org/html/rfc3986, ~ is a legal character in URLs.
2013-11-07 20:26:10 -08:00
bors
27eb85daed auto merge of #10333 : huonw/rust/ascii, r=alexcrichton
This renames to_str_ascii to as_str_ascii and makes it non-copying,
which is possible now that strings no longer have a hidden extra
byte/null terminator.

Fixes #6120.
2013-11-07 19:16:11 -08:00
Brian Anderson
eabdc8c960 std: Make atomic types non-copyable. Closes #8380 2013-11-07 18:37:56 -08:00
bors
f00bb2ec04 auto merge of #10243 : mattcarberry/rust/master, r=brson
Associated with Issue #6563.

Useful for Apollo Guidance Computer simulation, Unix file system permissions, and maybe one or two other things.
2013-11-07 17:26:12 -08:00
bors
a0593e5045 auto merge of #10335 : ksh8281/rust/update_for_ndk_r9b, r=brson
update for ndk r9b (#10323)

````
Android NDK, Revision 9b (October 2013)
Important changes:
Updated include/android/*h and math.h for all Android API levels up to 18, 
including the addition of levels 13, 15, 16 and 17. 
For information on added APIs, 
see commit messages for Changes 68012 and 68014. (Issues 47150, 58528, and 38423)
````

https://android-review.googlesource.com/#/c/68014/
2013-11-07 15:46:13 -08:00
Carol Willing
e6a1f6d7df Edited comment for docs to show std::io is deleted and replaced by std::rt::io 2013-11-07 15:29:06 -08:00
Huon Wilson
b95a8c63fd std::ascii: Provide a copyless [Ascii] -> str method.
This renames to_str_ascii to as_str_ascii and makes it non-copying,
which is possible now that strings no longer have a hidden extra
byte/null terminator.

Fixes #6120.
2013-11-08 10:20:06 +11:00
Eric Holk
0a478b4ac6 Add ~ to the list of allowable URL characters. 2013-11-07 17:21:33 -05:00
niftynif
fbde419b38 Addressed style concerns in btree.rs and added it to the lib file.
Added documentation within btree.rs.
2013-11-07 13:34:20 -05:00
bors
03f30515f4 auto merge of #10336 : ksh8281/rust/fix_rpass_core-run-destroy_for_android, r=yichoi
fix rpass core-run-destroy for android
2013-11-07 02:41:10 -08:00
sh8281.kim
f1cbb4d566 fix rpass core-run-destroy for android 2013-11-07 19:22:18 +09:00
sh8281.kim
96ec3c11de update for ndk r9b 2013-11-07 18:47:56 +09:00
bors
a5f6f853f1 auto merge of #10322 : thestinger/rust/no_freeze, r=alexcrichton 2013-11-06 23:36:06 -08:00
Daniel Micay
8662141c21 add from_send to Rc, since #9509 is fixed 2013-11-07 02:30:54 -05:00
bors
7fc689305c auto merge of #10328 : alexcrichton/rust/snapshots, r=thestinger 2013-11-06 20:31:08 -08:00
Alex Crichton
4b770446b4 Register new snapshots 2013-11-06 20:24:36 -08:00
Matt Carberry
6eba332d0e Added positive tests for integer literal base interpretation. 2013-11-06 15:30:12 -08:00
bors
22eb11c09b auto merge of #10227 : kud1ing/rust/ios, r=alexcrichton 2013-11-06 14:01:14 -08:00
kud1ing
2a333ed088 Fixes for compilation to iOS:
- remove /usr/include from the include path since the iOS SDK provides the correct version
- `_NSGetEnviron()` is private and not available on iOS
- `.align` without an argument is not allowed with the Apple tools. 2^2 should be the default alignment
- ignore error messages for XCode < 5
- pass include path to libuv
2013-11-06 22:11:09 +01:00
bors
fdc830df31 auto merge of #10289 : nikomatsakis/rust/issue-10157-TypeContents-refactor, r=pcwalton
See #10157. This compiles now.

Fixes #10278.
2013-11-06 11:51:09 -08:00