Commit Graph

33648 Commits

Author SHA1 Message Date
Brian Koropoff
f0cc3a9365 Fix monomorphization of unboxed closures
This adds a `Substs` field to `ty_unboxed_closure` and plumbs basic
handling of it throughout the compiler. trans now correctly
monomorphizes captured free variables and llvm function defs.  This
fixes uses of unboxed closures which reference a free type or region
parameter from their environment in either their signature or free
variables.  Closes #16791
2014-10-27 18:51:27 -07:00
Jorge Aparicio
94ddb51c9c DSTify [T]/str extension traits
This PR changes the signature of several methods from `foo(self, ...)` to
`foo(&self, ...)`/`foo(&mut self, ...)`, but there is no breakage of the usage
of these methods due to the autoref nature of `method.call()`s. This PR also
removes the lifetime parameter from some traits (`Trait<'a>` -> `Trait`). These
changes break any use of the extension traits for generic programming, but
those traits are not meant to be used for generic programming in the first
place. In the whole rust distribution there was only one misuse of a extension
trait as a bound, which got corrected (the bound was unnecessary and got
removed) as part of this PR.

[breaking-change]
2014-10-27 20:20:08 -05:00
bors
bd7138dd69 auto merge of #18368 : alexcrichton/rust/rollup, r=alexcrichton 2014-10-27 23:02:55 +00:00
Alex Crichton
4dc06dceb2 rollup merge of #18259 : alexcrichton/snapshots 2014-10-27 15:12:48 -07:00
Alex Crichton
a33d7617c5 Test fixes and rebase conflicts from rollup 2014-10-27 15:12:48 -07:00
Alex Crichton
40811f84ef rollup merge of #18334 : csherratt/arc-encodable 2014-10-27 15:12:48 -07:00
Alex Crichton
6e9d5a6d9d rollup merge of #18366 : aochagavia/ascii 2014-10-27 15:12:48 -07:00
Alex Crichton
c5cc27f9a2 rollup merge of #18364 : cakebaker/missing_a 2014-10-27 15:12:48 -07:00
Alex Crichton
20b9897c58 rollup merge of #18362 : kevinmehall/pprint-struct-pat-shorthand 2014-10-27 15:12:47 -07:00
Alex Crichton
c381752b0e rollup merge of #18356 : jakub-/const-pattern-suptype 2014-10-27 15:12:47 -07:00
Alex Crichton
a1d719dad4 rollup merge of #18347 : cakebaker/ffi 2014-10-27 15:12:47 -07:00
Alex Crichton
15547e1d72 rollup merge of #18346 : aochagavia/closure-fields 2014-10-27 15:12:47 -07:00
Alex Crichton
cfeff3e1c7 rollup merge of #18344 : aochagavia/show-arc 2014-10-27 15:12:47 -07:00
Alex Crichton
1cc938a69a rollup merge of #18337 : bkoropoff/unboxed-imm-upvar-fixes 2014-10-27 15:12:45 -07:00
Alex Crichton
175d6a7435 rollup merge of #18332 : jbcrail/fix-comments 2014-10-27 15:12:30 -07:00
Alex Crichton
287df9e0eb rollup merge of #18329 : sfackler/memwriter-clear 2014-10-27 15:12:30 -07:00
Alex Crichton
ed7f4a8da4 rollup merge of #18327 : vadimcn/17982 2014-10-27 15:12:30 -07:00
Alex Crichton
650214b170 rollup merge of #18326 : sfackler/cfg-final 2014-10-27 15:12:30 -07:00
Alex Crichton
f1118cc084 rollup merge of #18324 : jakub-/eneedstest 2014-10-27 15:12:30 -07:00
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
Daniel Micay
7e2e4ce592 return &mut T from the arenas, not &T
The arenas write the value to memory and then return a non-aliasing
reference to it. The returned reference can be mutable and can be
coerced to an immutable one.

[breaking-change]
2014-10-27 16:37:31 -04: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
Steve Klabnik
13e4daee26 Fix some wording about errors
see https://github.com/rust-lang/rust/pull/18176#discussion_r19374679
2014-10-27 15:51:52 -04: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
Patrick Walton
aa242e721a libcore: Inline atomic constructors.
Servo really wants this.
2014-10-27 09:14:57 -07: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