Commit Graph

19608 Commits

Author SHA1 Message Date
bors
ebed4d00d0 auto merge of #7393 : alexcrichton/rust/enable-threads, r=catamorphism
Closes #7071
2013-06-25 22:26:05 -07:00
bors
22408d9ad5 auto merge of #7269 : luqmana/rust/drop, r=thestinger
Finally rename finalize to drop.
Closes #4332.
2013-06-25 20:29:06 -07:00
Brian Anderson
5d3ca4b843 Merge remote-tracking branch 'mozilla/master' into incoming
Conflicts:
	src/librustc/middle/astencode.rs
	src/librustc/middle/check_const.rs
2013-06-25 19:32:00 -07:00
Young-il Choi
6a77273104 rt: add android dummy functions for mman related 2013-06-26 10:25:12 +09:00
Luqman Aden
ca2966c6d0 Change finalize -> drop. 2013-06-25 21:14:39 -04:00
bors
e9ac7194ff auto merge of #7365 : cmr/rust/syntax_cleanup, r=Aatch
Sets the stage for further cleanup (especially mass-slaughter of `@`)
2013-06-25 18:02:02 -07:00
Alex Crichton
7f61b31f5f Stop passing --disable-threads to LLVM 2013-06-25 17:42:28 -07:00
Alex Crichton
c109bed15b Deny common lints by default for lib{std,extra} 2013-06-25 17:39:43 -07:00
Corey Richardson
a616531ebb Remove extra 2013-06-25 20:25:56 -04:00
bors
efd1438770 auto merge of #7373 : thestinger/rust/iterator, r=huonw 2013-06-25 15:22:55 -07:00
Daniel Micay
e44e33dfa9 xfail test hitting a codegen bug (issue #7385) 2013-06-25 16:31:17 -04:00
Daniel Micay
e67c48a591 remove each from vec, HashMap and HashSet 2013-06-25 16:28:02 -04:00
Daniel Micay
64ee9668a2 container: remove internal iterators from Map
the maps are being migrated to external iterators
2013-06-25 16:26:23 -04:00
Daniel Micay
5242e8d2ba remove the redundant each method from OptVec 2013-06-25 16:26:23 -04:00
Corey Richardson
0d471d310d great renaming propagation: syntax 2013-06-25 16:15:07 -04:00
bors
4967bd0508 auto merge of #7325 : artagnon/rust/resolve-module, r=cmr
Fix #7322.

I started out with a band-aid approach to special-case the duplicate module error using `is_duplicate_module`, but thought this would be better in the long term.
2013-06-25 13:11:11 -07:00
Ramkumar Ramachandra
f982f42f3c resolve: make error message strings more consistent
The "first definition of ..." error string reported by add_child() looks
different from similar messages reported by other functions.  Fix this.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
2013-06-25 23:58:48 +05:30
Ramkumar Ramachandra
9f80591d84 resolve: report duplicate module definitions
add_child() is responsible for reporting errors about type, value, and
module duplicate definitions.  Although it checks for all three, it uses
namespace_to_str() to convert a Namespace value into a string before
printing an error like:

  error: duplicate definition of type `foo`
                                 ^^^^
  note: first definition of type foo here:
                            ^^^^

Unfortunately, this string can only be one of "type" or
"value" (corresponding to TypeNS and ValueNS respectively), and it
reports duplicate modules as duplicate types.

To alleviate the problem, define a special NamespaceError enum to define
more specialized errors, and use it instead of attempting to reuse the
Namespace enum.

Reported-by: Corey Richardson <corey@octayn.net>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
2013-06-25 23:58:48 +05:30
Michael Sullivan
276463f064 Fix another generics bug with default methods. Closes #7295. 2013-06-25 11:20:02 -07:00
bors
032dcc57e8 auto merge of #7371 : alexcrichton/rust/trying, r=cmr
This is an attempt at a smaller request than #7113, it's just the first two commits
2013-06-25 10:47:01 -07:00
Michael Sullivan
663f298183 Get rid of cast on every self reference. 2013-06-25 10:17:34 -07:00
Michael Sullivan
3c86711452 Fix some tests in rustpkg to not pollute the build directory. Closes #7278. 2013-06-25 10:17:33 -07:00
Michael Sullivan
13e5f0ebdf Remove some essentially dead code in method handling. 2013-06-25 10:17:33 -07:00
Michael Sullivan
5e26808141 Get rid of terrible way for iterating over provided methods. 2013-06-25 10:17:33 -07:00
Alex Crichton
92424f0670 Add the warnings lint attribute 2013-06-25 08:55:15 -07:00
Alex Crichton
42b44b21b1 Rename all files with the 'rc' extension 2013-06-25 08:55:15 -07:00
bors
d161e630d8 auto merge of #7317 : Aatch/rust/no-drop-flag, r=thestinger
This adds a `#[no_drop_flag]` attribute. This attribute tells the compiler to omit the drop flag from the struct, if it has a destructor. When the destructor is run, instead of setting the drop flag, it instead zeroes-out the struct. This means the destructor can run multiple times and therefore it is up to the developer to use it safely.

The primary usage case for this is smart-pointer types like `Rc<T>` as the extra flag caused the struct to be 1 word larger because of alignment.

This closes #7271 and #7138
2013-06-25 07:23:06 -07:00
bors
7aee5da08d auto merge of #7254 : Blei/rust/intrinsic-overhaul, r=cmr
This sets the `get_tydesc()` return type correctly and removes the intrinsic module. See #3730, #3475.

Update: this now also removes the unused shape fields in tydescs.
2013-06-25 04:38:06 -07:00
bors
b11346bb5d auto merge of #7291 : alexcrichton/rust/static-mut, r=huonw
This adds both `static mut` items and `static mut` foreign items. This involved changing far less code than I thought it was going to, but the tests seem to pass and the variables seem functional.

I'm more than willing to write more tests, so suggestions are welcome!

Closes #553
2013-06-25 01:59:05 -07:00
Jeaye
41f11d6428 rust.vim: Links previously unused rustFuncCall
This allows for highlighting of function calls
for free floating, member, and static functions.
2013-06-24 23:35:16 -07:00
bors
5a089c252e auto merge of #7370 : Aatch/rust/snapshot, r=huonw
I also cleaned up the warnings.
2013-06-24 23:14:01 -07:00
James Miller
122f25dd5e Add missing import to tests 2013-06-25 18:02:56 +12:00
James Miller
6ad31ffb53 Warning police 2013-06-25 17:13:52 +12:00
James Miller
caa50ce15d Remove stage0 cfgs 2013-06-25 17:08:26 +12:00
James Miller
2afdf0d6a1 Update snapshots file 2013-06-25 16:43:58 +12:00
James Miller
721164d5ec Zero the struct in the take glue, not the drop glue 2013-06-25 16:39:56 +12:00
James Miller
d9f6dd263c Set #[no_drop_flag] on Rc<T> and AtomicOption. Add Test 2013-06-25 16:11:34 +12:00
James Miller
0cca08a21a Add support for #[no_drop_flag] attribute 2013-06-25 16:11:33 +12:00
bors
237ca7dc58 auto merge of #7257 : indutny/rust/feature/libc-mman, r=cmr
Add functions and constants required to be able to use `mmap` and friends.
2013-06-24 21:01:56 -07:00
Brian Anderson
c06ee9f7a7 Merge remote-tracking branch 'cmr/various-cleanup' into incoming 2013-06-24 15:11:36 -07:00
Brian Anderson
f48068657a Merge remote-tracking branch 'sstewartgallus/cleanup_middle' into incoming 2013-06-24 15:10:50 -07:00
Brian Anderson
30f8621386 Merge remote-tracking branch 'brson/shorttestnames' into HEAD 2013-06-24 14:10:30 -07:00
Brian Anderson
ac9481a438 Merge remote-tracking branch 'reusee/master' into HEAD 2013-06-24 14:09:37 -07:00
Brian Anderson
051fbcea72 Merge remote-tracking branch 'artagnon/abi-dead-code' into HEAD 2013-06-24 14:08:03 -07:00
Brian Anderson
3b7d4b93ff Merge remote-tracking branch 'cmr/issue/2773' into HEAD 2013-06-24 14:07:05 -07:00
Fedor Indutny
bc70edbb25 libc: (u)int => c_(u)int for consts 2013-06-24 21:06:51 +02:00
Philipp Brueschweiler
f8ae3cdcaa Fix test failure on windows
This patch ensures that the multiple extern definitions of `free` in the
run-pass tests have the same declaration, working around #7352.
2013-06-24 19:14:20 +02:00
Fedor Indutny
ddd6f59283 libc: add POSIX-compatible sysconf consts
Because its part of POSIX. Values are taken from FreeBSD, linux
and OSX header files.
2013-06-24 19:04:00 +02:00
Fedor Indutny
079b07df55 libc: support functions from sys/mman.h
Because its part of POSIX. Values are taken from FreeBSD, linux
and OSX header files.
2013-06-24 19:04:00 +02:00
Tuncer Ayaz
0a74ffcf04 vim/syntax/rust.vim: fix date header
The last change was made in 2013 not 2012.
2013-06-24 18:35:43 +02:00