]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agorollup merge of #18366 : aochagavia/ascii
Alex Crichton [Mon, 27 Oct 2014 16:08:20 +0000 (09:08 -0700)]
rollup merge of #18366 : aochagavia/ascii

9 years agorollup merge of #18364 : cakebaker/missing_a
Alex Crichton [Mon, 27 Oct 2014 16:08:17 +0000 (09:08 -0700)]
rollup merge of #18364 : cakebaker/missing_a

9 years agorollup merge of #18362 : kevinmehall/pprint-struct-pat-shorthand
Alex Crichton [Mon, 27 Oct 2014 16:08:15 +0000 (09:08 -0700)]
rollup merge of #18362 : kevinmehall/pprint-struct-pat-shorthand

9 years agorollup merge of #18356 : jakub-/const-pattern-suptype
Alex Crichton [Mon, 27 Oct 2014 16:08:10 +0000 (09:08 -0700)]
rollup merge of #18356 : jakub-/const-pattern-suptype

9 years agorollup merge of #18347 : cakebaker/ffi
Alex Crichton [Mon, 27 Oct 2014 16:08:09 +0000 (09:08 -0700)]
rollup merge of #18347 : cakebaker/ffi

9 years agorollup merge of #18346 : aochagavia/closure-fields
Alex Crichton [Mon, 27 Oct 2014 16:08:06 +0000 (09:08 -0700)]
rollup merge of #18346 : aochagavia/closure-fields

9 years agorollup merge of #18344 : aochagavia/show-arc
Alex Crichton [Mon, 27 Oct 2014 16:08:04 +0000 (09:08 -0700)]
rollup merge of #18344 : aochagavia/show-arc

9 years agorollup merge of #18337 : bkoropoff/unboxed-imm-upvar-fixes
Alex Crichton [Mon, 27 Oct 2014 16:07:56 +0000 (09:07 -0700)]
rollup merge of #18337 : bkoropoff/unboxed-imm-upvar-fixes

9 years agorollup merge of #18332 : jbcrail/fix-comments
Alex Crichton [Mon, 27 Oct 2014 16:07:53 +0000 (09:07 -0700)]
rollup merge of #18332 : jbcrail/fix-comments

9 years agorollup merge of #18329 : sfackler/memwriter-clear
Alex Crichton [Mon, 27 Oct 2014 16:07:49 +0000 (09:07 -0700)]
rollup merge of #18329 : sfackler/memwriter-clear

9 years agorollup merge of #18327 : vadimcn/17982
Alex Crichton [Mon, 27 Oct 2014 16:07:47 +0000 (09:07 -0700)]
rollup merge of #18327 : vadimcn/17982

9 years agorollup merge of #18326 : sfackler/cfg-final
Alex Crichton [Mon, 27 Oct 2014 16:07:44 +0000 (09:07 -0700)]
rollup merge of #18326 : sfackler/cfg-final

9 years agorollup merge of #18324 : jakub-/eneedstest
Alex Crichton [Mon, 27 Oct 2014 16:07:42 +0000 (09:07 -0700)]
rollup merge of #18324 : jakub-/eneedstest

9 years agorollup merge of #18321 : chastell/guide_refresh_testing_output
Alex Crichton [Mon, 27 Oct 2014 16:07:40 +0000 (09:07 -0700)]
rollup merge of #18321 : chastell/guide_refresh_testing_output

9 years agorollup merge of #18320 : chastell/guide_simplify_formatting
Alex Crichton [Mon, 27 Oct 2014 16:07:38 +0000 (09:07 -0700)]
rollup merge of #18320 : chastell/guide_simplify_formatting

9 years agorollup merge of #18316 : thestinger/raw
Alex Crichton [Mon, 27 Oct 2014 16:07:29 +0000 (09:07 -0700)]
rollup merge of #18316 : thestinger/raw

9 years agorollup merge of #18315 : arielb1/constexpr-addr
Alex Crichton [Mon, 27 Oct 2014 16:07:27 +0000 (09:07 -0700)]
rollup merge of #18315 : arielb1/constexpr-addr

9 years agorollup merge of #18309 : cakebaker/fix_off_by_one
Alex Crichton [Mon, 27 Oct 2014 16:07:25 +0000 (09:07 -0700)]
rollup merge of #18309 : cakebaker/fix_off_by_one

9 years agorollup merge of #18303 : cgaebel/make-vec-match-slice
Alex Crichton [Mon, 27 Oct 2014 16:07:19 +0000 (09:07 -0700)]
rollup merge of #18303 : cgaebel/make-vec-match-slice

9 years agorollup merge of #18266 : nick29581/vtable2.rs
Alex Crichton [Mon, 27 Oct 2014 16:07:13 +0000 (09:07 -0700)]
rollup merge of #18266 : nick29581/vtable2.rs

9 years agorollup merge of #18265 : jakub-/mailmap
Alex Crichton [Mon, 27 Oct 2014 16:07:09 +0000 (09:07 -0700)]
rollup merge of #18265 : jakub-/mailmap

9 years agorollup merge of #18257 : globin/master
Alex Crichton [Mon, 27 Oct 2014 16:07:05 +0000 (09:07 -0700)]
rollup merge of #18257 : globin/master

9 years agorollup merge of #18256 : SimonSapin/view_item_to_string
Alex Crichton [Mon, 27 Oct 2014 16:07:03 +0000 (09:07 -0700)]
rollup merge of #18256 : SimonSapin/view_item_to_string

9 years agorollup merge of #18251 : steveklabnik/build_module_guide
Alex Crichton [Mon, 27 Oct 2014 16:07:00 +0000 (09:07 -0700)]
rollup merge of #18251 : steveklabnik/build_module_guide

9 years agorollup merge of #18250 : dotdash/fix_aliasing
Alex Crichton [Mon, 27 Oct 2014 16:06:58 +0000 (09:06 -0700)]
rollup merge of #18250 : dotdash/fix_aliasing

9 years agorollup merge of #18244 : areski/pr-fix-string-doc
Alex Crichton [Mon, 27 Oct 2014 16:06:55 +0000 (09:06 -0700)]
rollup merge of #18244 : areski/pr-fix-string-doc

9 years agorollup merge of #18239 : msiemens/fix-ice-rename-failed
Alex Crichton [Mon, 27 Oct 2014 16:06:48 +0000 (09:06 -0700)]
rollup merge of #18239 : msiemens/fix-ice-rename-failed

9 years agorollup merge of #18235 : nikomatsakis/issue-18209
Alex Crichton [Mon, 27 Oct 2014 16:06:43 +0000 (09:06 -0700)]
rollup merge of #18235 : nikomatsakis/issue-18209

9 years agorollup merge of #18231 : cakebaker/fix_greater_than_forty_two_closure
Alex Crichton [Mon, 27 Oct 2014 16:06:39 +0000 (09:06 -0700)]
rollup merge of #18231 : cakebaker/fix_greater_than_forty_two_closure

9 years agorollup merge of #18229 : bjz/ttdelim
Alex Crichton [Mon, 27 Oct 2014 16:06:38 +0000 (09:06 -0700)]
rollup merge of #18229 : bjz/ttdelim

9 years agorollup merge of #18221 : jkleint/guide-boxes
Alex Crichton [Mon, 27 Oct 2014 16:06:33 +0000 (09:06 -0700)]
rollup merge of #18221 : jkleint/guide-boxes

9 years agoauto merge of #17978 : arielb1/rust/remaining-garbage, r=nikomatsakis
bors [Mon, 27 Oct 2014 16:57:46 +0000 (16:57 +0000)]
auto merge of #17978 : arielb1/rust/remaining-garbage, r=nikomatsakis

it seems to be some kind of leftover GC-related detritus

9 years agoRemove cat_discr
Ariel Ben-Yehuda [Thu, 9 Oct 2014 11:58:45 +0000 (14:58 +0300)]
Remove cat_discr

it seems to be some kind of GC-related mess

9 years agoAdd test for issue 18343
Adolfo Ochagavía [Mon, 27 Oct 2014 11:15:03 +0000 (12:15 +0100)]
Add test for issue 18343

9 years agoShow a note when closure field is called as method
Adolfo Ochagavía [Sun, 26 Oct 2014 15:29:27 +0000 (16:29 +0100)]
Show a note when closure field is called as method

Closes https://github.com/rust-lang/rust/issues/18343

9 years agoFix undefined behavior in std::ascii
Adolfo Ochagavía [Mon, 27 Oct 2014 15:04:55 +0000 (16:04 +0100)]
Fix undefined behavior in std::ascii

Closes https://github.com/rust-lang/rust/issues/18314

9 years agoGuide: Add missing "a"
Daniel Hofstetter [Mon, 27 Oct 2014 14:41:24 +0000 (15:41 +0100)]
Guide: Add missing "a"

9 years agoauto merge of #17890 : pnkfelix/rust/fsk-fix-issue-17887, r=alexcrichton
bors [Mon, 27 Oct 2014 12:02:42 +0000 (12:02 +0000)]
auto merge of #17890 : pnkfelix/rust/fsk-fix-issue-17887, r=alexcrichton

Fixes `config.mk` so that it should not contain multiple inconsistent entries for the same option.

Used aforementioned variants to extract options that have explicit `putvar` calls associated with them in the subsequent code.  When the explicit `putvar` call was conditional on some potentially complex condition, moved the `putvar` call out to the main control flow of the script so that it always runs if necessary.

----

As a driveby fix, captured the error exit when doing the test run of `rustc --version` from `CFG_LOCAL_RUST_ROOT`, and signal explicit configure failure when it did not run successfully.  (If we cannot run `rustc`, we really shouldn't try to keep going.)

----

Fix #17887.

9 years agoconfig.mk: Added variants of `valopt`/`opt` that do not automatically `putvar`.
Felix S. Klock II [Thu, 9 Oct 2014 14:26:46 +0000 (16:26 +0200)]
config.mk: Added variants of `valopt`/`opt` that do not automatically `putvar`.

Used aforementioned variants to extract options that have explicit
`putvar` calls associated with them in the subsequent code.  When the
explicit `putvar` call was conditional on some potentially complex
condition, moved the `putvar` call out to the main control flow of the
script so that it always runs if necessary.

----

As a driveby fix, captured the error exit when doing the test run of
`rustc --version` from `CFG_LOCAL_RUST_ROOT`, and signal explicit
configure failure when it did not run successfully.  (If we cannot run
`rustc`, we really shouldn't try to keep going.)

----

Finally, in response to review feedback, went through and identified
cases where we had been calling `putvar` manually (and thus my naive
translation used `opt_nosave`/`valopt_nosave`), and then verified
whether a manual `putvar` was necessary (i.e., was each variable in
question manually computed somewhere in the `configure` script).
In cases that did not meet this criteria, I revised the code to use
the `opt`/`valopt` directly and removed the corresponding `putvar`,
cleaning things up a teeny bit.

----

Fix #17887.

9 years agoauto merge of #18348 : michaelwoerister/rust/lldb-test-versioning, r=alexcrichton
bors [Mon, 27 Oct 2014 07:52:39 +0000 (07:52 +0000)]
auto merge of #18348 : michaelwoerister/rust/lldb-test-versioning, r=alexcrichton

Let's try if not running LLDB tests in parallel solves the sporadic deadlocks we've seen since enabling the LLDB test suite. Running the tests in parallel has lead to unstable behaviour in the past (with LLDB versions below 310.x.x). Maybe our new minimum LLDB version isn't quite up to it either.

cc @alexcrichton

9 years agoPreserve struct field pattern shorthand in the prettyprinter.
Kevin Mehall [Mon, 27 Oct 2014 07:11:26 +0000 (00:11 -0700)]
Preserve struct field pattern shorthand in the prettyprinter.

Use the `is_shorthand` field introduced by #17813 (ead6c4b) to make the
prettyprinter output the shorthand form. Fixes a few places that set
`is_shorthand: true` when the pattern is not a PatIdent with the same
name as the field.

9 years agoauto merge of #18130 : mahkoh/rust/udp, r=alexcrichton
bors [Mon, 27 Oct 2014 03:57:37 +0000 (03:57 +0000)]
auto merge of #18130 : mahkoh/rust/udp, r=alexcrichton

Closes #18111

Note that the non-empty part doesn't matter right now because of #18129.

9 years agoGuide: motivate Box and Rc pointers with need, uses, benefits, and examples.
John Kleint [Wed, 22 Oct 2014 03:30:09 +0000 (23:30 -0400)]
Guide: motivate Box and Rc pointers with need, uses, benefits, and examples.

Explain that Rust has different pointer types because there is a
tradeoff between flexibility and efficiency. Motivate boxes as
fixed-size containers of variable-sized objects. Clarify that Box and Rc
are pointer types that you deref with * just like references. Stick to
explaining the semantics and avoid implementation details.  Scope isn't
the most accurate framework to think about deallocation (since you
return boxes and otherwise move values out of scopes); it's more "when
the value is done being used," i.e., lifetime. Provide a connection
between Rust's pointer types by locating them on a flexibiltiy /
performance scale. Explain the compiler can't statically analyze
lifetimes with multiple owners; hence the need for (runtime) reference
counting.

9 years agoFix a typecheck regression with constant borrowed pointers in patterns
Jakub Bukaj [Sun, 26 Oct 2014 21:35:26 +0000 (22:35 +0100)]
Fix a typecheck regression with constant borrowed pointers in patterns

Change the eqtype relationship to be a suptype relationship instead.

Fixes #18350.
Fixes #18352.

9 years agodebuginfo: Set RUST_TEST_TASKS to 1 again for LLDB tests
Michael Woerister [Sun, 26 Oct 2014 09:57:29 +0000 (10:57 +0100)]
debuginfo: Set RUST_TEST_TASKS to 1 again for LLDB tests

9 years agoauto merge of #18143 : mahkoh/rust/reverse_complement, r=alexcrichton
bors [Sun, 26 Oct 2014 16:42:33 +0000 (16:42 +0000)]
auto merge of #18143 : mahkoh/rust/reverse_complement, r=alexcrichton

Lots of unsafe code and lots of branches removed. Also multithreaded.

Rust old: 1.208 seconds
Rust new: 0.761 seconds
C: 0.632 seconds

9 years agoGuide: Add link to FFI explanation
Daniel Hofstetter [Sun, 26 Oct 2014 15:58:17 +0000 (16:58 +0100)]
Guide: Add link to FFI explanation

9 years agoImplement Show for `Arc<T>`
Adolfo Ochagavía [Sun, 26 Oct 2014 11:58:04 +0000 (12:58 +0100)]
Implement Show for `Arc<T>`

Fixes https://github.com/rust-lang/rust/issues/18299

9 years agoauto merge of #18212 : kmcallister/rust/unsafecell, r=thestinger
bors [Sun, 26 Oct 2014 06:37:23 +0000 (06:37 +0000)]
auto merge of #18212 : kmcallister/rust/unsafecell, r=thestinger

Fixes #18131.

9 years agoAdd regression test for #18335
Brian Koropoff [Sun, 26 Oct 2014 04:27:54 +0000 (21:27 -0700)]
Add regression test for #18335

9 years agoAdd regression test for #18238 and #18336
Brian Koropoff [Sun, 26 Oct 2014 04:27:19 +0000 (21:27 -0700)]
Add regression test for #18238 and #18336

9 years agoImprove diagnostics that result from the fix for #18335
Brian Koropoff [Sun, 26 Oct 2014 04:46:24 +0000 (21:46 -0700)]
Improve diagnostics that result from the fix for #18335

9 years agoTweak mem categorization of upvar mutability
Brian Koropoff [Sun, 26 Oct 2014 04:40:25 +0000 (21:40 -0700)]
Tweak mem categorization of upvar mutability

- Correctly categorize env pointer deref for `FnMut` as declared
  rather than inherited.  This fixes an assert in borrowck.
  Closes #18238
- Categorize env pointer deref as mutable only if the closure is
  `FnMut` *and* the original variable is declared mutable.  This
  disallows capture-by-value `FnMut` closures from mutating captured
  variables that aren't declared mutable.  This is a difference
  from the equivalent desugared code which would permit it, but
  it is consistent with the behavior of procs.  Closes #18335
- Avoid computing info about the env pointer if there isn't one.

9 years agoEnsure unboxed closure upvars are marked as used mutably
Brian Koropoff [Sun, 26 Oct 2014 04:39:34 +0000 (21:39 -0700)]
Ensure unboxed closure upvars are marked as used mutably

Closes #18336

9 years agoFix spelling mistakes in comments.
Joseph Crail [Sun, 26 Oct 2014 03:10:16 +0000 (23:10 -0400)]
Fix spelling mistakes in comments.

9 years agoAdd MemWriter::from_vec
Steven Fackler [Sun, 26 Oct 2014 01:33:56 +0000 (18:33 -0700)]
Add MemWriter::from_vec

9 years agoFix bug #17982.
Vadim Chugunov [Sun, 26 Oct 2014 00:37:41 +0000 (17:37 -0700)]
Fix bug #17982.

9 years agoUpdate parse::test::string_to_tts_1 test
Brendan Zabarauskas [Sat, 25 Oct 2014 23:51:41 +0000 (10:51 +1100)]
Update parse::test::string_to_tts_1 test

9 years agoFinish cfg syntax transition
Steven Fackler [Sat, 25 Oct 2014 23:43:14 +0000 (16:43 -0700)]
Finish cfg syntax transition

9 years agoAdd a KleeneOp enum for clarity
Brendan Zabarauskas [Thu, 23 Oct 2014 00:24:20 +0000 (11:24 +1100)]
Add a KleeneOp enum for clarity

9 years agoReduce the size of the TokenTree
Brendan Zabarauskas [Wed, 22 Oct 2014 17:58:48 +0000 (04:58 +1100)]
Reduce the size of the TokenTree

9 years agoUse standard capitalisation for TokenTree variants
Brendan Zabarauskas [Wed, 22 Oct 2014 17:39:58 +0000 (04:39 +1100)]
Use standard capitalisation for TokenTree variants

9 years agoPrevent some vector reallocations
Brendan Zabarauskas [Wed, 22 Oct 2014 14:42:47 +0000 (01:42 +1100)]
Prevent some vector reallocations

9 years agoRename TokenTree variants for clarity
Brendan Zabarauskas [Wed, 22 Oct 2014 12:35:32 +0000 (23:35 +1100)]
Rename TokenTree variants for clarity

This should be clearer, and fits in better with the `TTNonterminal` variant.

Renames:

- `TTTok` -> `TTToken`
- `TTDelim` -> `TTDelimited`
- `TTSeq` -> `TTSequence`

9 years agoAdd Span and separate open/close delims to TTDelim
Brendan Zabarauskas [Wed, 22 Oct 2014 05:37:20 +0000 (16:37 +1100)]
Add Span and separate open/close delims to TTDelim

This came up when working [on the gl-rs generator extension](https://github.com/bjz/gl-rs/blob/990383de801bd2e233159d5be07c9b5622827620/src/gl_generator/lib.rs#L135-L146).

The new definition of  `TTDelim` adds an associated `Span` that covers the whole token tree and enforces the invariant that a delimited sequence of token trees must have an opening and closing delimiter.

A `get_span` method has also been added to `TokenTree` type to make it easier to implement better error messages for syntax extensions.

9 years agoAdd test cases for E-needstest issues
Jakub Bukaj [Sat, 25 Oct 2014 22:07:41 +0000 (00:07 +0200)]
Add test cases for E-needstest issues

9 years agoGuide: update Testing output and fix contents to match
Piotr Szotkowski [Sat, 25 Oct 2014 20:57:11 +0000 (22:57 +0200)]
Guide: update Testing output and fix contents to match

9 years agoGuide: Cargo now adds bang and drops the semicolon for ‘Hello, world’
Piotr Szotkowski [Sat, 25 Oct 2014 20:53:00 +0000 (22:53 +0200)]
Guide: Cargo now adds bang and drops the semicolon for ‘Hello, world’

9 years agoauto merge of #18293 : thestinger/rust/heap, r=cmr
bors [Sat, 25 Oct 2014 20:57:10 +0000 (20:57 +0000)]
auto merge of #18293 : thestinger/rust/heap, r=cmr

9 years agoGuide: drop :d formatting where unnecessary
Piotr Szotkowski [Sat, 25 Oct 2014 20:50:38 +0000 (22:50 +0200)]
Guide: drop :d formatting where unnecessary

9 years agofix sized deallocation documentation
Daniel Micay [Sat, 25 Oct 2014 00:11:28 +0000 (20:11 -0400)]
fix sized deallocation documentation

9 years agoreturn the new usable size from reallocate_inplace
Daniel Micay [Fri, 24 Oct 2014 23:58:26 +0000 (19:58 -0400)]
return the new usable size from reallocate_inplace

The real size is also more useful than just a boolean, and the caller
can easily determine if the operation failed from the real size. In most
cases, the caller is only going to be growing the allocation so a branch
can be avoided.

[breaking-change]

9 years agoget rid of libc_heap::{malloc_raw, realloc_raw}
Daniel Micay [Fri, 24 Oct 2014 21:34:57 +0000 (17:34 -0400)]
get rid of libc_heap::{malloc_raw, realloc_raw}

The C standard library functions should be used directly. The quirky
NULL / zero-size allocation workaround is no longer necessary and was
adding an extra branch to the allocator code path in a build without
jemalloc. This is a small step towards liballoc being compatible with
handling OOM errors instead of aborting (#18292).

[breaking-change]

9 years agomake the core::raw struct representation defined
Daniel Micay [Sat, 25 Oct 2014 17:28:17 +0000 (13:28 -0400)]
make the core::raw struct representation defined

Closes #18313

9 years agoPrevent pointer -> int casts in constexprs
Ariel Ben-Yehuda [Sat, 25 Oct 2014 17:18:32 +0000 (20:18 +0300)]
Prevent pointer -> int casts in constexprs

These cause issues, as addresses aren't fixed at compile-time.

Fixes #18294

9 years agorm unnecessary libc allocator usage
Daniel Micay [Fri, 24 Oct 2014 21:34:37 +0000 (17:34 -0400)]
rm unnecessary libc allocator usage

9 years agoMake MIN_ALIGN a const to allow better optimization
Björn Steinbrink [Fri, 24 Oct 2014 09:08:42 +0000 (11:08 +0200)]
Make MIN_ALIGN a const to allow better optimization

With MIN_ALIGN as a static, other crates don't have access to its value
at compile time, because it is an extern global. That means that the
checks against it can't be optimized out, which is rather unfortunate.
So let's make it a constant instead.

9 years agoGuide: Fix off-by-one error
Daniel Hofstetter [Sat, 25 Oct 2014 14:22:04 +0000 (16:22 +0200)]
Guide: Fix off-by-one error

9 years agoauto merge of #18176 : jkleint/rust/guide-borrow-wording, r=steveklabnik
bors [Sat, 25 Oct 2014 09:17:05 +0000 (09:17 +0000)]
auto merge of #18176 : jkleint/rust/guide-borrow-wording, r=steveklabnik

Explain the primary disadvantage of garbage collection is runtime
overhead and unpredictable pauses.  Elucidate where the name "race
condition" comes from.  Emphasize that Rust can guarantee your code is
free of race conditions and other memory errors, with no runtime
overhead.

cc @steveklabnik

9 years agoDeprecate UdpStream
Julian Orth [Fri, 17 Oct 2014 23:36:46 +0000 (01:36 +0200)]
Deprecate UdpStream

9 years agoauto merge of #18171 : jakub-/rust/match-typeck, r=pcwalton
bors [Sat, 25 Oct 2014 07:07:08 +0000 (07:07 +0000)]
auto merge of #18171 : jakub-/rust/match-typeck, r=pcwalton

Rather than doing it top-down, with a known expected type, we will now simply establish the appropriate constraints between the pattern and the expression it destructures.

Closes #8783.
Closes #10200.

9 years agoMake UdpStream block until the next non-empty msg.
Julian Orth [Fri, 17 Oct 2014 21:37:24 +0000 (23:37 +0200)]
Make UdpStream block until the next non-empty msg.

9 years agoMake the Vec data structure layout match raw::Slice.
Clark Gaebel [Sat, 25 Oct 2014 02:31:17 +0000 (19:31 -0700)]
Make the Vec data structure layout match raw::Slice.

Fixes #18302

r? @thestinger

9 years agoauto merge of #18080 : veddan/rust/assume, r=thestinger
bors [Sat, 25 Oct 2014 00:32:07 +0000 (00:32 +0000)]
auto merge of #18080 : veddan/rust/assume, r=thestinger

Adds an `assume` intrinsic that gets translated to llvm.assume. It is
used on a boolean expression and allows the optimizer to assume that
the expression is true.

This implements #18051.

9 years agoAdd as_unsafe_cell() for Cell and RefCell
Keegan McAllister [Tue, 21 Oct 2014 19:59:21 +0000 (12:59 -0700)]
Add as_unsafe_cell() for Cell and RefCell

Fixes #18131.

9 years agoUpdate tests with the new error messages
Jakub Bukaj [Tue, 21 Oct 2014 01:40:15 +0000 (03:40 +0200)]
Update tests with the new error messages

9 years agoOverhaul typechecking of patterns
Jakub Bukaj [Tue, 21 Oct 2014 01:40:10 +0000 (03:40 +0200)]
Overhaul typechecking of patterns

Instead of checking patterns in a top-down fashion with a known
expected type on entry, this changes makes typeck establish
appropriate constraints between a pattern and the expression
it destructures, and lets inference compute the final types
or produce good error messages if it's impossible.

9 years agoDo not accept functions in enum patterns past resolve
Jakub Bukaj [Tue, 21 Oct 2014 01:40:04 +0000 (03:40 +0200)]
Do not accept functions in enum patterns past resolve

9 years agoauto merge of #16388 : Zoxc/rust/stmesg, r=alexcrichton
bors [Fri, 24 Oct 2014 17:32:04 +0000 (17:32 +0000)]
auto merge of #16388 : Zoxc/rust/stmesg, r=alexcrichton

This installs signal handlers to print out stack overflow messages on Linux. It also ensures the main thread has a guard page.

This will catch stack overflows in external code. It's done in preparation of switching to stack probes (#16012).

I've done some simple tests with overflowing the main thread, native threads and green threads (with and without UV) on x86-64.
This might work on ARM, MIPS and x86-32.

I've been unable to run the test suite on this because of #16305.

9 years agoignore-android
Julian Orth [Fri, 24 Oct 2014 15:19:02 +0000 (17:19 +0200)]
ignore-android

9 years agoImprove shootout-reverse-complement
Julian Orth [Sat, 18 Oct 2014 21:34:20 +0000 (23:34 +0200)]
Improve shootout-reverse-complement

9 years agoauto merge of #17813 : P1start/rust/lint-field-shorthand, r=huonw
bors [Fri, 24 Oct 2014 15:12:24 +0000 (15:12 +0000)]
auto merge of #17813 : P1start/rust/lint-field-shorthand, r=huonw

Closes #17792.

9 years agoUse type-safe wrapper for TypeFlags
Niko Matsakis [Fri, 24 Oct 2014 14:20:02 +0000 (10:20 -0400)]
Use type-safe wrapper for TypeFlags

9 years agoPrint stack overflow messages for Windows, Linux and OS X
John Kåre Alsaker [Thu, 23 Oct 2014 05:29:41 +0000 (07:29 +0200)]
Print stack overflow messages for Windows, Linux and OS X

Fixes #17562

9 years agoauto merge of #17896 : mahkoh/rust/intmax, r=alexcrichton
bors [Fri, 24 Oct 2014 03:22:29 +0000 (03:22 +0000)]
auto merge of #17896 : mahkoh/rust/intmax, r=alexcrichton

Closes #17075

I don't know if this is correct. The easiest way to find out is to run the following program on all targets but I can't do it myself.
```c
#include <stdint.h>
#include <stdio.h>

int main(void)
{
if (sizeof(intmax_t) != 8) {
puts("ERROR");
return 1;
}
}
```

9 years agoAdd a lint for not using field pattern shorthands
P1start [Mon, 6 Oct 2014 00:36:53 +0000 (13:36 +1300)]
Add a lint for not using field pattern shorthands

Closes #17792.

9 years agoFix sigaction on OS X
John Kåre Alsaker [Mon, 11 Aug 2014 18:49:36 +0000 (20:49 +0200)]
Fix sigaction on OS X

9 years agoauto merge of #17960 : mahkoh/rust/clone_from_slice, r=pcwalton
bors [Fri, 24 Oct 2014 01:02:21 +0000 (01:02 +0000)]
auto merge of #17960 : mahkoh/rust/clone_from_slice, r=pcwalton

Old vs. New vs. Vec::push_all

```
test slice     ... bench:   3091942 ns/iter (+/- 54460)
test slice_new ... bench:   1800065 ns/iter (+/- 69513)
test vec       ... bench:   1804805 ns/iter (+/- 75609)
```

9 years agos/vtable2/vtable
Nick Cameron [Thu, 23 Oct 2014 22:25:35 +0000 (11:25 +1300)]
s/vtable2/vtable

9 years agoUpdate .mailmap
Jakub Bukaj [Thu, 23 Oct 2014 21:01:31 +0000 (23:01 +0200)]
Update .mailmap