Commit Graph

1643 Commits

Author SHA1 Message Date
Patrick Walton
1eec3bba13 librustc: Rename Const to Freeze 2013-06-28 10:44:15 -04:00
Patrick Walton
d350981c0e librustc: Change Const to Freeze in the compiler 2013-06-28 10:44:15 -04:00
Patrick Walton
607b91d5f9 librustc: Rename Owned to Send in the compiler 2013-06-28 10:44:07 -04:00
bors
811e045c60 auto merge of #7426 : thestinger/rust/zero-size-noncopyable, r=catamorphism
4885918 r=huonw
42a63fc r=thestinger
7ec5a08 r=catamorphism
fb1e5f1 r=thestinger
659cd55 r=cmr
2013-06-28 05:28:32 -07:00
bors
8600c18812 auto merge of #7272 : Aatch/rust/namegen_thunk, r=thestinger
This removes the `namegen` thunk that was in `common.rs`. I also take the opportunity to refactor a few uses where we had a `str -> ident -> str` chain that seemed somewhat redundant to me.

Also cleans up some warnings that made their way in already.
2013-06-28 01:01:52 -07:00
James Miller
a897a9ab9f Remove useless namegen thunk 2013-06-28 18:00:20 +12:00
Birunthan Mohanathas
dcf1dc060a Rename #[no_drop_flag] to #[unsafe_no_drop_flag] 2013-06-27 23:20:42 -04:00
bors
61dc7760d0 auto merge of #7410 : luqmana/rust/bare-self, r=catamorphism
Finally sorted this out. Fixes #5321, #4439, and #4850.
2013-06-27 20:19:38 -07:00
Luqman Aden
767374976b librustc: Always pass self ByRef. 2013-06-27 21:36:30 -04:00
bors
927f454ac1 auto merge of #7432 : michaelwoerister/rust/WP3, r=jdm 2013-06-27 17:22:42 -07:00
bors
63afb8ccc8 auto merge of #7430 : huonw/rust/vec-kill, r=thestinger 2013-06-27 15:01:58 -07:00
Michael Woerister
2f5e33d02f debuginfo: Some corrections after review. 2013-06-27 19:28:37 +02:00
Michael Woerister
6af78610e7 debuginfo: Added support for region pointers. 2013-06-27 19:28:37 +02:00
Michael Woerister
46d28c874c debuginfo: Replaced many instances of @ with &. 2013-06-27 19:28:17 +02:00
Michael Woerister
4d8f2fd871 debuginfo: Many little formatting improvements. 2013-06-27 19:28:17 +02:00
Michael Woerister
7bb189e56c Fixed debug information bug regarding struct padding. 2013-06-27 19:28:17 +02:00
bors
36527360a6 auto merge of #7429 : Blei/rust/delete-shared, r=huonw
Mostly just low-haning fruit, i.e. function arguments that were @ even
though & would work just as well.

Reduces librustc.so size by 200k when compiling without -O, by 100k when
compiling with -O.
2013-06-27 08:28:37 -07:00
Huon Wilson
29b0649a6a Convert vec::{push, push_all, push_all_move} to methods. 2013-06-28 00:20:42 +10:00
Huon Wilson
1cb0a567d1 Convert vec::{pop, shift, unshift, insert, remove, swap_remove} to methods. 2013-06-28 00:20:42 +10:00
Philipp Brüschweiler
7295a6da92 Remove many shared pointers
Mostly just low-haning fruit, i.e. function arguments that were @ even
though & would work just as well.

Reduces librustc.so size by 200k when compiling without -O, by 100k when
compiling with -O.
2013-06-27 15:06:19 +02:00
bors
c440743dcc auto merge of #7403 : catamorphism/rust/package-scripts, r=brson
r? @brson (or @graydon if available) rustpkg/api.rs provides functions intended for package scripts to call.
It will probably need more functionality added to it later, but this is
a start.

Added a test case checking that a package script can use the API.

Closes #6401
2013-06-27 06:01:30 -07:00
Huon Wilson
d2e3e1e52b Convert vec::{head, tail, init, last} (and similar fns) to methods. 2013-06-27 22:37:00 +10:00
Huon Wilson
d0512b1055 Convert vec::[mut_]slice to methods, remove vec::const_slice. 2013-06-27 22:36:09 +10:00
bors
a28f9ba526 auto merge of #7361 : brson/rust/incoming, r=brson 2013-06-27 01:04:33 -07:00
bors
f1e09d6f1f auto merge of #7420 : mozilla/rust/rollup, r=thestinger 2013-06-26 23:07:41 -07:00
bors
36d7f601d8 auto merge of #7354 : bblum/rust/trait-bounds, r=pcwalton
r? @nikomatsakis
2013-06-26 17:37:29 -07:00
Corey Richardson
394d28cac5 Fix old .each usage 2013-06-26 18:22:15 -04:00
Ben Blum
ffc8c0ba21 Looser restrictions on what can be captured in unbounded heap closures. 2013-06-26 18:14:43 -04:00
Ben Blum
f8c892ab96 Make closure contents call out to trait_contents. 2013-06-26 18:14:43 -04:00
Ben Blum
108739f533 Looser restrictions on what can be captured in unbounded traits. 2013-06-26 18:14:43 -04:00
Ben Blum
7b968783d7 Infer default static/Owned bounds for unbounded heap fns/traits (#7264) 2013-06-26 18:14:43 -04:00
bors
32adc0e730 auto merge of #7382 : msullivan/rust/cleanup, r=bblum 2013-06-26 15:13:37 -07:00
Tim Chevalier
2b17e4775c rustc: Eliminate extra failing case in metadata::loader::crate_from_metas
Closes #2406
2013-06-26 18:08:34 -04:00
Philipp Brüschweiler
2234f61038 Remove the last traces of shapes 2013-06-26 18:08:23 -04:00
bors
23fb2278c7 auto merge of #7356 : msullivan/rust/default-methods, r=bblum
r?
2013-06-26 12:08:33 -07:00
bors
4e5b4807a5 auto merge of #7297 : huonw/rust/strip-expand-strip, r=cmr
This allows macros to both be conditionally defined, and expand
to items with #[cfg]'s.

This seems to have a performance improvement, e.g. for `std`:

```
# Before 
time: 1.660 s   expansion
time: 0.125 s   configuration
# After
time: 0.080 s   configuration 1
time: 1.127 s   expansion
time: 0.132 s   configuration 2
```

And for `extra`:

```
# Before
time: 0.593 s   expansion
time: 0.062 s   configuration
# After
time: 0.047 s   configuration 1
time: 0.147 s   expansion
time: 0.058 s   configuration 2
```

(This seems a little peculiar, but it is possibly because the expansion AST traversal is very slow, so removing as much as possible as early as possible has big benefits.)
2013-06-26 07:32:14 -07:00
Huon Wilson
73e3dbf9c0 driver: perform stripping before and after macro expansion.
This allows macros to both be conditionally defined, and expand
to items with #[cfg]'s.
2013-06-26 23:02:14 +10:00
bors
a30ab764e1 auto merge of #7255 : michaelwoerister/rust/debuginfo, r=jdm
This PR contains no real code changes. Just some documentation additions in the form of comments and some internal reordering of functions within debuginfo.rs.
2013-06-26 05:20:06 -07:00
Tim Chevalier
3789433b4f rustpkg: Begin allowing package scripts to call the default build logic
rustpkg/api.rs provides functions intended for package scripts to call.
It will probably need more functionality added to it later, but this is
a start.

Added a test case checking that a package script can use the API.

Closes #6401
2013-06-25 22:29:38 -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
Luqman Aden
ca2966c6d0 Change finalize -> drop. 2013-06-25 21:14:39 -04:00
bors
efd1438770 auto merge of #7373 : thestinger/rust/iterator, r=huonw 2013-06-25 15:22:55 -07:00
Daniel Micay
e67c48a591 remove each from vec, HashMap and HashSet 2013-06-25 16:28:02 -04:00
Daniel Micay
5242e8d2ba remove the redundant each method from OptVec 2013-06-25 16:26:23 -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