Commit Graph

16486 Commits

Author SHA1 Message Date
Brian Leibig
c978025d0d Debuginfo revamp 2013-03-11 14:09:06 -07:00
bors
878a31066d auto merge of #5305 : brson/rust/mut_buf_as_slice, r=brson
r?

Like `buf_as_slice` but for mutable pointers and slices.
2013-03-11 14:06:50 -07:00
Brian Anderson
c88ce30c48 core: Add vec::raw::mut_buf_as_slice 2013-03-11 13:44:32 -07:00
bors
e9a0db6abd auto merge of #5318 : jdm/rust/deriving_cell, r=pcwalton
r? @pcwalton
2013-03-11 13:15:52 -07:00
Josh Matthews
86cf248262 Add deriving_eq to Cell. 2013-03-11 15:23:45 -04:00
Daniel Micay
d55225f04a treemap: add more tests for set difference 2013-03-11 15:02:55 -04:00
Daniel Micay
ad16fecc33 treemap: inline the TreeSet wrappers 2013-03-11 15:02:50 -04:00
Daniel Micay
a5c88366f8 treemap: indentation fixes 2013-03-11 15:02:18 -04:00
Daniel Micay
58cec70127 treemap: make set_advance public 2013-03-11 15:02:15 -04:00
bors
ce24ebb858 auto merge of #5314 : jld/rust/adt-simplification, r=pcwalton
Struct and enum representations have some complicatedness that's no longer needed.  Now that everything's in one place and has access to anything we'd want to know about the type, flatten some of that out.  Slight changes to representations in some cases.
2013-03-11 11:54:49 -07:00
bors
2ebb67487c auto merge of #5291 : pcwalton/rust/drop-lint, r=pcwalton
r? @nikomatsakis
2013-03-11 10:15:58 -07:00
Patrick Walton
08c840205e librustc: Lint the old drop destructor notation off 2013-03-11 09:36:00 -07:00
Patrick Walton
7353568cd8 librustc: Remove old-style operator overloading 2013-03-11 09:36:00 -07:00
Patrick Walton
1274d4a006 test: Fix tests. rs=tests 2013-03-11 09:36:00 -07:00
Patrick Walton
a34749c289 libsyntax: Stop parsing newtype enums 2013-03-11 09:36:00 -07:00
Patrick Walton
1fcb0443cf doc: Remove documentation on newtype enums. 2013-03-11 09:35:59 -07:00
Patrick Walton
7538450b8d libsyntax: Remove newtype enums from libsyntax. rs=deenum 2013-03-11 09:35:59 -07:00
Patrick Walton
dc4869945c librustc: Remove newtype enums from librustc 2013-03-11 09:35:59 -07:00
Patrick Walton
4faf63e472 libstd: Remove all newtype enums from std and core. 2013-03-11 09:35:59 -07:00
Patrick Walton
e48446d060 test: Remove newtype enums from the test suite. rs=deenum 2013-03-11 09:35:58 -07:00
Patrick Walton
bd2d17e4a1 libsyntax: Stop parsing bare functions in preparation for switching them over 2013-03-11 09:35:58 -07:00
Patrick Walton
d18f785457 librustc: Replace all uses of fn() with &fn(). rs=defun 2013-03-11 09:35:58 -07:00
bors
51cdca0bf0 auto merge of #5122 : sanxiyn/rust/vec-match-tail-2, r=nikomatsakis
Incorporated @nikomatsakis's comments from #4748.

Fix #4635.
2013-03-11 04:27:48 -07:00
Seo Sanghyeon
070137ce90 Add one more test for vector destructuring 2013-03-11 19:53:41 +09:00
Seo Sanghyeon
9e85589ad3 Implement vector destructuring from tail 2013-03-11 19:01:51 +09:00
Jed Davis
9eaa608b04 Get rid of the Unit enum representation.
The only thing we really lose is that C-like enums with one variant and a
non-zero discriminant now take up space, but I do not think this is a
common usage.  As previously noted, that was mostly there for
transitional compatibility with the pre-adt.rs codebase.
2013-03-11 00:01:04 -07:00
Jed Davis
e6b5e00ea2 Simplify struct representation.
Out goes the extra layer of struct wrapping; the destructedness flag is
added to the end of the struct.  This means that, if the struct
previously had alignment padding at the end, the flag will live there
instead of increasing the struct size.
2013-03-10 23:57:38 -07:00
bors
58618fb8cf auto merge of #5308 : wanderview/rust/std-getopts-rustdoc-fix, r=luqmana
There were three issues effecting the example in the getopts rustdoc:

1. The blockquote was incorrectly formatted.  Fixed by switching to using
   an explicit markdown code section with ```.
2. The `fail fail_str(f)` would not compile.  Fixed by using `fail!()` instead
   of `fail`.
3. The line `matches.free[0]` produced a compile error about moving from
   an immutable vector.  Fix by using `copy`.
2013-03-10 21:39:46 -07:00
Ben Kelly
13e58597a1 Correct copyright year to be 2012-2013.
Previous year range of 2011-2013 was based on file creation date.  The
check_license python script, however, only accepts copyrights starting
in 2012 or later.
2013-03-10 20:47:28 -04:00
Ben Kelly
a363862102 Fix formatting and errors in std::getopts example.
There were three issues effecting the example in the getopts rustdoc:

1. The blockquote was incorrectly formatted.  Fixed by switching to using
   an explicit markdown code section with ```.
2. The `fail fail_str(f)` would not compile.  Fixed by using `fail!()` instead
   of `fail`.
3. The line `matches.free[0]` produced a compile error about moving from
   an immutable vector.  Fix by using `copy`.
2013-03-10 17:27:31 -04:00
bors
1d8596d400 auto merge of #5309 : nikomatsakis/rust/simplify_check_fn, r=nikomatsakis
Simplify the interface to check_fn by pulling some of the madness out to its callers.

rs=refactor
2013-03-10 12:36:45 -07:00
Niko Matsakis
62aa8d7de9 Simplify the interface to check_fn by pulling some of the madness out to its callers 2013-03-10 15:05:22 -04:00
Daniel Micay
80c71c839a add a TotalOrd impl for the unit type 2013-03-10 13:54:51 -04:00
bors
267f6c212f auto merge of #5285 : jld/rust/emacs-refix, r=brson
Without this change, rust-mode doesn't work if 'cl hasn't been required
by something else, apparently.  I'm not entirely sure what changed such
that I started seeing this problem instead of not, but maybe the emacs
world has been making progress towards not loading 'cl at runtime if
it's only needed at compile time.

(This change was previously submitted as e93a58d52 and accidentally reverted by ad8b437ad.)
2013-03-09 18:42:43 -08:00
Jed Davis
1df0a0ba0f Const dereference works now, so allow it. 2013-03-09 17:40:59 -08:00
Jed Davis
122e4a28b8 Don't copy const data to do an autoderef+autoref. 2013-03-09 17:40:59 -08:00
Jed Davis
c929ddde16 Add some tests for const auto-deref.
const-autoderef.rs is based on an example from jdm in IRC (but the
quadruple-pointer part is entirely my fault).
2013-03-09 17:40:59 -08:00
Jed Davis
5066bc9ff4 Don't print addr_of(addr_of(e)) as &&e, which means something else. 2013-03-09 17:40:59 -08:00
Jed Davis
2e29f97423 Make a const translation test match TESTNAME=const 2013-03-09 17:40:59 -08:00
Jed Davis
e42afd3129 Let const_deref "dereference" newtypes. 2013-03-09 17:40:59 -08:00
Jed Davis
5ca1d353de Implement most of adjustment handling for consts.
Changes the ad-hoc closure adjustment into using adjustment info instead
of being separately driven from types, and likewise for autoderef.

Also takes care of autoref (the cases we should be seeing in consts,
at least, since we can't be doing method calls which would need the
ref-to-vec mode), which didn't quite work right previously.

However, "dereference" of a newtype isn't handled yet....
2013-03-09 17:40:59 -08:00
Jed Davis
5571ca9b21 Break out const_addr_of. 2013-03-09 17:40:59 -08:00
bors
a90551b711 auto merge of #5302 : thestinger/rust/vec, r=nikomatsakis 2013-03-09 17:39:42 -08:00
bors
a347e9d635 auto merge of #5296 : nikomatsakis/rust/region-syntax-expl-lifetimes-2, r=nikomatsakis
Modify pretty-printer to emit lifetimes and fix a few minor
parser bugs that this uncovered.

r? whomever.
2013-03-09 16:48:44 -08:00
Niko Matsakis
7cbd4b20ee Remove @ast::Region and replace with @ast::Lifetime.
Modify pretty-printer to emit lifetimes and fix a few minor
parser bugs that this uncovered.
2013-03-09 19:43:59 -05:00
Daniel Micay
788de758e3 vec: cleanup 2013-03-09 16:53:39 -05:00
bors
98ce99d500 auto merge of #5295 : apasel422/rust/kate, r=brson
Two small changes: `Not` was missing from the list of core traits and `assert` was removed from the language.
2013-03-09 13:42:44 -08:00
Daniel Micay
06a336ae79 vec: renovate the BaseIter impl
* add 'self region to the borrowed pointer parameter
* rm workaround for #2263
* inline (wrappers)
* iter-trait is gone
2013-03-09 16:27:15 -05:00
bors
1cde7e6bc2 auto merge of #5294 : apasel422/rust/clone, r=nikomatsakis
This makes `#[deriving_clone]` useful.

I wasn't sure if a macro was the right way to do this, but it seems more maintainable than a series of repetitive `impl`s.
2013-03-09 11:54:44 -08:00
Andrew Paseltiner
b4f57d46e6 kate: remove assert keyword 2013-03-09 12:23:33 -05:00