Commit Graph

19063 Commits

Author SHA1 Message Date
bors
8f4f0bebe7 auto merge of #7038 : alexcrichton/rust/issue-6935, r=catamorphism
Tracks the `type_target` and `value_target` source imports separately to correctly warn about unused imports.
2013-06-09 21:49:23 -07:00
Alex Crichton
b6cccb3d81 Track the source of the type_target and value_target separately for ImportResolutions 2013-06-09 21:42:57 -07:00
bors
6e5e97fc78 auto merge of #7028 : thestinger/rust/cmp, r=brson 2013-06-09 20:13:23 -07:00
Daniel Micay
86833ea286 cmp: remove duplicate free functions 2013-06-09 20:47:40 -04:00
Ron Dahlgren
9e4beaac9d Fix all issues with sample code
The getopts sample program now compiles and runs. Additionally I made
all of the indentation uniformly four spaces.
2013-06-09 16:13:52 -07:00
Ron Dahlgren
983269e71a Updated documentation to refer to extra module
The documentation was still refering to getopts as though it was in the
std module - I've changed this to refer to extra instead.
2013-06-09 15:45:55 -07:00
bors
9bcf9119d8 auto merge of #7029 : luqmana/rust/issue-4228, r=catamorphism
Fixes #4228
2013-06-09 14:46:24 -07:00
bors
94f72dd736 auto merge of #6904 : catamorphism/rust/rustpkg_version_vcs, r=catamorphism
r? @brson
2013-06-09 13:16:27 -07:00
Tim Chevalier
d92b4358d2 rustpkg: Accept package IDs like github.com/foo/bar#0.3
If the package ID is of the form s#v, where v is a valid version
string, fetch tag v of that package.
2013-06-09 13:05:52 -07:00
Ron Dahlgren
12203a76c2 Check stk before dereferencing
This commit fixes #7022 - I've added an additional check to ensure that
stk is not null before dereferencing it to get it's next element,
assigning NULL if it is itself NULL.
2013-06-09 10:43:16 -07:00
Luqman Aden
0bf6d9e9ef Add test for #4228. 2013-06-09 08:00:52 -04:00
Luqman Aden
618558a70f librustc: Allow adding static fn's in multiple impl's. 2013-06-09 08:00:40 -04:00
bors
88c318d28c auto merge of #7023 : thestinger/rust/vec, r=brson 2013-06-08 22:34:10 -07:00
Daniel Micay
de367157b5 remove deprecated vec::{is_empty, len} functions 2013-06-08 23:19:30 -04:00
bors
1f0c05ff74 auto merge of #7018 : bill-myers/rust/fix_7017, r=thestinger
Minimally fixes #7017, we were overwriting the result and thus ignoring attributes before the last.

csearch::get_item_attrs and decoder::get_item_attrs should probably also be changed to each_item_attrs using the for protocol, but that's just a minor performance/style issue.
2013-06-08 19:16:11 -07:00
Bill Myers
54ec7ab057 add test for RcMut being Const and Owned, tests #7017 being fixed 2013-06-09 03:43:58 +02:00
Bill Myers
90ec4228be fix decoding of multiple attributes (fixes #7017)
We were just looking at the last because we were overwriting ret.
2013-06-09 02:36:31 +02:00
bors
470bf0dfb3 auto merge of #7016 : thestinger/rust/ptr, r=luqmana 2013-06-08 14:31:10 -07:00
bors
878a9b92eb auto merge of #7004 : dotdash/rust/allocs, r=thestinger
This removes some unnecessary allocations in the lexer, the typechecker and the metadata decoder. Reduces the time spent in the parsing and typechecking passes by about 10% for me.
2013-06-08 13:37:10 -07:00
bors
4aa77198cb auto merge of #6992 : Blei/rust/fix-autoderef-ice, r=catamorphism
Related to #5062, but doesn't fix that one.
2013-06-08 12:40:15 -07:00
Daniel Micay
fe3ad0a204 rm some uses of to_mut_unsafe_ptr 2013-06-08 15:02:32 -04:00
Tim Chevalier
53b8352552 rustpkg: Extract version number from git, as per #5684
For now, the test I added just checks that PkgId::new parses the
version number out of a git repo's tags list, where relevant.
2013-06-08 11:59:03 -07:00
Tim Chevalier
a014088da1 std: Fix search-and-replace typos 2013-06-08 11:59:03 -07:00
bors
59bbbe4335 auto merge of #6970 : artagnon/rust/configure, r=catamorphism
When no arguments are given, echo prints a blank line.  These two are
equivalent:

  $ echo ""
  $ echo

Replace the former by the latter.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
2013-06-08 11:46:13 -07:00
bors
b8fa9d3be1 auto merge of #7015 : huonw/rust/each-fn-kill, r=thestinger
Continuation of #6995/#6999.
2013-06-08 10:25:15 -07:00
Huon Wilson
98ba91f81b remove unused import warnings 2013-06-09 02:22:23 +10:00
Huon Wilson
00f5916809 std: replace the str::each* fns/methods with byte iterators 2013-06-09 02:22:23 +10:00
Huon Wilson
4b806b4d06 std: remove each_char* fns and methods from str, replaced by iterators. 2013-06-09 02:22:23 +10:00
Huon Wilson
513d2292e5 std: remove foldr and alli methods in vec 2013-06-09 02:22:23 +10:00
Huon Wilson
ed299af625 std: remove fold[lr] in favour of iterators 2013-06-09 02:22:23 +10:00
Huon Wilson
65c7c58c8f std: remove {all*,any*,count} in favour of iterators 2013-06-09 02:22:23 +10:00
Huon Wilson
ce4f63dcee std: add reverse vec iterators, replace vec::each*_reverse. 2013-06-09 02:22:23 +10:00
bors
e2ec8e71ce auto merge of #7008 : thestinger/rust/iterator, r=catamorphism
The `IteratorUtil` trait hits a bug in method resolve, but the basic trait has no issue.
2013-06-08 02:28:15 -07:00
Ramkumar Ramachandra
8b87debbc2 configure: replace echo "" with plain echo
When no arguments are given, echo prints a blank line.  These two are
equivalent:

  $ echo ""
  $ echo

Replace the former by the latter.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
2013-06-08 14:13:37 +05:30
bors
8db1d2cdde auto merge of #7007 : thestinger/rust/jemalloc, r=catamorphism
It's still broken because `jemalloc`'s `configure` script doesn't work when the build triple doesn't match the target triple due to missing a way to get the page size. I'm not entirely sure how to pass a hardcoded value to autoconf/configure.

This at least gets it a bit further along.
2013-06-08 01:31:18 -07:00
Philipp Brüschweiler
a99ba1180d rustc::regionck: fix ICE when getting signature of ty_err
Fixes #5062
2013-06-08 09:34:47 +02:00
Philipp Brüschweiler
c74f39782f Add test for #5062 2013-06-08 09:34:38 +02:00
Philipp Brüschweiler
f3f9db133a rustc: Fix an ICE "Autoderef but type not derefable"
Related to #5062 (same error message), but that test case causes
a different ICE than mentioned there (even without this fix).
2013-06-08 09:34:32 +02:00
Philipp Brüschweiler
c786b68dd3 Add a test that causes an ICE currently 2013-06-08 09:34:25 +02:00
bors
1d06aea0b7 auto merge of #7005 : dotdash/rust/fix_get_str_from, r=bstrie
As the comment said, the subtraction is bogus for multibyte characters.
Fortunately, we can just use last_pos instead of pos to get the correct
position without any subtraction hackery.
2013-06-08 00:34:22 -07:00
bors
1cf57f7b67 auto merge of #7003 : alco/rust/tutorial-block-expr, r=bstrie
This is something that's only been briefly mentioned in the beginning of
the tutorial and all of the closure examples within this subsection
include only one expression between { and }.
2013-06-07 23:40:25 -07:00
bors
88517f9874 auto merge of #7000 : Blei/rust/fix-6155, r=catamorphism 2013-06-07 22:46:25 -07:00
bors
3fc0524818 auto merge of #6920 : catamorphism/rust/issue-4765, r=bstrie
r? anybody As per #4765
2013-06-07 21:13:31 -07:00
bors
e34756c9ba auto merge of #6695 : catamorphism/rust/moretestcases, r=catamorphism 2013-06-07 19:55:32 -07:00
Tim Chevalier
aac1298122 testsuite: Add test cases that pass 2013-06-07 19:37:29 -07:00
Daniel Micay
d27ba09245 add the Iterator trait to the prelude 2013-06-07 22:23:48 -04:00
Björn Steinbrink
2096d79626 Avoid unnecessary allocations in the metadata decoder 2013-06-08 03:27:48 +02:00
Björn Steinbrink
43cae88079 Lexer: Fix offset handling in get_str_from()
As the comment said, the subtraction is bogus for multibyte characters.
Fortunately, we can just use last_pos instead of pos to get the correct
position without any subtraction hackery.
2013-06-08 03:24:47 +02:00
Björn Steinbrink
29e5aa0942 Remove some unnecessary closures 2013-06-08 03:24:47 +02:00
Björn Steinbrink
b65dc42b25 TypeChecker: Avoid unnecessary copies 2013-06-08 03:24:47 +02:00