Commit graph

33524 commits

Author SHA1 Message Date
Alex Crichton
dac3234bba rollup merge of #18321 : chastell/guide_refresh_testing_output 2014-10-27 15:12:29 -07:00
Alex Crichton
54647bd317 rollup merge of #18320 : chastell/guide_simplify_formatting 2014-10-27 15:12:29 -07:00
Alex Crichton
9dc9eccf3d rollup merge of #18316 : thestinger/raw 2014-10-27 15:12:29 -07:00
Alex Crichton
abfc2f3b8d rollup merge of #18315 : arielb1/constexpr-addr 2014-10-27 15:12:29 -07:00
Alex Crichton
0c736c7b1d rollup merge of #18309 : cakebaker/fix_off_by_one 2014-10-27 15:12:29 -07:00
areski
a446b68380 Add @thestinger comment explaining that shrink_to_fit might drop down as close as possible but not to the minimun 2014-10-27 22:32:53 +01:00
Brian Anderson
e59355b64c Untabify rustup.sh 2014-10-27 13:55:35 -07:00
Alex Crichton
ee32c04d60 rollup merge of #18303 : cgaebel/make-vec-match-slice 2014-10-27 12:53:02 -07:00
Alex Crichton
dea37d73ca rollup merge of #18266 : nick29581/vtable2.rs 2014-10-27 12:53:02 -07:00
Alex Crichton
dc5a18c6e0 rollup merge of #18265 : jakub-/mailmap 2014-10-27 12:53:02 -07:00
Alex Crichton
ecdb19cc98 rollup merge of #18257 : globin/master 2014-10-27 12:53:02 -07:00
Alex Crichton
2f8ee08f66 rollup merge of #18256 : SimonSapin/view_item_to_string 2014-10-27 12:53:02 -07:00
Alex Crichton
6f65ad1a44 rollup merge of #18251 : steveklabnik/build_module_guide 2014-10-27 12:53:02 -07:00
Alex Crichton
e9537735c1 rollup merge of #18250 : dotdash/fix_aliasing 2014-10-27 12:53:01 -07:00
Alex Crichton
a6883d4054 rollup merge of #18244 : areski/pr-fix-string-doc 2014-10-27 12:53:01 -07:00
Alex Crichton
bb70ce6804 rollup merge of #18239 : msiemens/fix-ice-rename-failed 2014-10-27 12:53:01 -07:00
Alex Crichton
0c756de6c5 rollup merge of #18235 : nikomatsakis/issue-18209 2014-10-27 12:53:01 -07:00
Alex Crichton
da57aa57d4 rollup merge of #18231 : cakebaker/fix_greater_than_forty_two_closure 2014-10-27 12:53:01 -07:00
Alex Crichton
b3c676ed86 rollup merge of #18229 : bjz/ttdelim 2014-10-27 12:53:01 -07:00
Alex Crichton
83e91fb489 rollup merge of #18221 : jkleint/guide-boxes 2014-10-27 12:53:00 -07:00
bors
e05c3b7799 auto merge of #17978 : arielb1/rust/remaining-garbage, r=nikomatsakis
it seems to be some kind of leftover GC-related detritus
2014-10-27 16:57:46 +00:00
Ariel Ben-Yehuda
19faaf1a9e Remove cat_discr
it seems to be some kind of GC-related mess
2014-10-27 19:06:50 +02:00
Adolfo Ochagavía
2ce77b33b0 Add test for issue 18343 2014-10-27 16:28:24 +01:00
Adolfo Ochagavía
9dab88712f Show a note when closure field is called as method
Closes https://github.com/rust-lang/rust/issues/18343
2014-10-27 16:15:50 +01:00
Adolfo Ochagavía
b8c4eb3a4e Fix undefined behavior in std::ascii
Closes https://github.com/rust-lang/rust/issues/18314
2014-10-27 16:09:21 +01:00
Daniel Hofstetter
25650e0eeb Guide: Add missing "a" 2014-10-27 15:41:24 +01:00
bors
e2cd4597da 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.
2014-10-27 12:02:42 +00:00
Felix S. Klock II
6f1e627388 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.
2014-10-27 12:17:45 +01:00
bors
a0efafbd85 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
2014-10-27 07:52:39 +00:00
Kevin Mehall
e5f709079a 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.
2014-10-27 00:35:35 -07:00
bors
a93e9c20f2 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.
2014-10-27 03:57:37 +00:00
Colin Sherratt
8a4bd8427c Added Encodable and Decodable for Arc<T>. 2014-10-26 23:41:51 -04:00
John Kleint
d257b37608 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.
2014-10-26 23:41:51 -04:00
Jakub Bukaj
f16744ce52 Fix a typecheck regression with constant borrowed pointers in patterns
Change the eqtype relationship to be a suptype relationship instead.

Fixes #18350.
Fixes #18352.
2014-10-26 22:35:26 +01:00
Piotr Szotkowski
16bae692be Guide: Closures fix suggested by @cakebaker 2014-10-26 18:15:08 +01:00
Michael Woerister
ca0446d107 debuginfo: Set RUST_TEST_TASKS to 1 again for LLDB tests 2014-10-26 18:09:06 +01:00
bors
f037452447 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
2014-10-26 16:42:33 +00:00
Daniel Hofstetter
622ae41e90 Guide: Add link to FFI explanation 2014-10-26 16:58:17 +01:00
Adolfo Ochagavía
79e05e9995 Implement Show for Arc<T>
Fixes https://github.com/rust-lang/rust/issues/18299
2014-10-26 15:30:40 +01:00
Piotr Szotkowski
4eedd873ec Guide: Closures: minor wording fixes 2014-10-26 09:50:16 +01:00
bors
cb943b7d2b auto merge of #18212 : kmcallister/rust/unsafecell, r=thestinger
Fixes #18131.
2014-10-26 06:37:23 +00:00
Brian Koropoff
5662bbad07 Add regression test for #18335 2014-10-25 21:51:14 -07:00
Brian Koropoff
6be48ea92e Add regression test for #18238 and #18336 2014-10-25 21:50:08 -07:00
Brian Koropoff
7129f172ae Improve diagnostics that result from the fix for #18335 2014-10-25 21:46:24 -07:00
Brian Koropoff
1062955b46 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.
2014-10-25 21:40:25 -07:00
Brian Koropoff
2877e47ea7 Ensure unboxed closure upvars are marked as used mutably
Closes #18336
2014-10-25 21:39:34 -07:00
Joseph Crail
30403204d6 Fix spelling mistakes in comments. 2014-10-25 23:11:17 -04:00
Steven Fackler
bed5a7d92a Add MemWriter::from_vec 2014-10-25 19:23:39 -07:00
Cody P Schafer
f3fd79d6aa split platform definitions out of mk/platform.mk
The goal here is to make it easier to add new platform definitions,
especially when the additions are programmatic (ie: in build scripts).
2014-10-25 21:01:18 -04:00
Vadim Chugunov
f29535d235 Fix bug #17982. 2014-10-25 17:37:41 -07:00