Commit graph

26250 commits

Author SHA1 Message Date
Felix S. Klock II
d2d1129ad0 Factoring bigint, rational, and complex out of libextra into libnum.
Removed use of globs present in earlier versions of modules.

Fix tutorial.md to reflect `extra::rational` ==> `num::rational`.
2014-02-11 10:39:15 +01:00
bors
3794d681b3 auto merge of #12159 : alexcrichton/rust/move-fourcc, r=kballard
It depends on libsyntax, which is a host crate, so it can't be in the target
crates section.
2014-02-10 22:51:42 -08:00
bors
19f64b38f7 auto merge of #12156 : dguenther/rust/add-fourcc-doc, r=alexcrichton
Added a link to `fourcc` docs to the list of libraries
2014-02-10 21:26:48 -08:00
bors
8ef25597e6 auto merge of #12155 : sanxiyn/rust/binary, r=pnkfelix
The field is unused.
2014-02-10 19:46:46 -08:00
bors
3870c15749 auto merge of #12173 : alexcrichton/rust/fix-snap, r=brson
The commit accidentally modified the snapshot script which changed its behavior
and is currently blocking a snapshot.
2014-02-10 18:26:49 -08:00
Alex Crichton
c2ae62faee Revert non-license changes as part of 0ebe112b
The commit accidentally modified the snapshot script which changed its behavior
and is currently blocking a snapshot.
2014-02-10 18:00:40 -08:00
bors
47ab5d2d42 auto merge of #12153 : pnkfelix/rust/fsk-add-dash-C-help-pointer, r=sanxiyn
(The fact that this flag has a large collection of suboptions qualifies it for an entry in the "Additional help" section.)
2014-02-10 17:11:48 -08:00
bors
38ed4674e8 auto merge of #11956 : edwardw/rust/issue-7556, r=cmr
Closes #7556.

Also move ``std::util::Void`` to ``std::any::Void``. It makes more sense to me.
2014-02-10 14:56:47 -08:00
Edward Wang
e9ff91e9be Move replace and swap to std::mem. Get rid of std::util
Also move Void to std::any, move drop to std::mem and reexport in
prelude.
2014-02-11 05:21:35 +08:00
bors
cf9164f94c auto merge of #12095 : FlaPer87/rust/issue-11709, r=nikomatsakis
Closes #11709
2014-02-10 12:56:40 -08:00
Flavio Percoco
31576c7ef0 Switch to Ignore output mode for () blocks
Closes #11709
Closes #11865
2014-02-10 21:20:08 +01:00
Alex Crichton
e25701132c Move fourcc to HOST_CRATES
It depends on libsyntax, which is a host crate, so it can't be in the target
crates section.
2014-02-10 11:51:06 -08:00
bors
1f245cc7ea auto merge of #12151 : gifnksm/rust/disable-rpath, r=pnkfelix
This fixes the compilation failure with `./configure --disable-rpath`
2014-02-10 11:31:43 -08:00
bors
838c62bb28 auto merge of #12132 : brunoabinader/rust/list-matches-predicate, r=alexcrichton
This is needed for cases where we only need to know if a list item matches the given predicate (eg. in Servo, we need to know if attributes from different DOM elements are equal).
2014-02-10 10:16:31 -08:00
Derek Guenther
6198ae565c Added link to fourcc docs 2014-02-10 12:12:13 -06:00
bors
4f16e519f1 auto merge of #12150 : jakerr/rust/patch-1, r=pnkfelix
The current comment actually describes *co*-variance.
Fixing this to describe contravariance while keeping 'static in the definition was tricky so just changed to use 'short and 'long.

I found the typo in my attempt to understand the concept of variance itself and the comment confused me. I mention this to point out that I'm new to the concept so may have still got the definition wrong, so please review with care :)
2014-02-10 08:16:35 -08:00
Seo Sanghyeon
d1cbdc6b1b Remove binary field 2014-02-11 01:10:26 +09:00
Felix S. Klock II
06a0c21c91 Add pointer to extended-help entry for -C help codegen options. 2014-02-10 16:54:00 +01:00
gifnksm
1b969e1188 Makefile.in: --no-rpath => -C no-rpath 2014-02-11 00:25:10 +09:00
bors
d324917596 auto merge of #12149 : thomaslee/rust/ipaddr_deriving_iter_bytes, r=cmr
This is a fairly trivial (but IMHO handy) change to implement IterBytes for IpAddr and SocketAddr.

I originally stumbled across this because I wanted to use a SocketAddr as a HashMap key and discovered that I couldn't do it directly. Had to impl IterBytes on a new intermediate type to work around it.
2014-02-10 06:31:27 -08:00
Bruno de Oliveira Abinader
cb1fad3b28 Implement List's any() function
This is needed for cases where we only need to know if a list item
matches the given predicate (eg. in Servo, we need to know if attributes
from different DOM elements are equal).
2014-02-10 08:36:48 -04:00
Jake Kerr
266b7e0f71 Update comment in contravariant test
The previous definition was actually describing covariance.
Fixing to describe contravariance while keeping 'static in the definition was tricky so just changed to use 'short and 'long.
2014-02-10 20:26:09 +09:00
Tom Lee
e205185095 IterBytes for IpAddr and SocketAddr 2014-02-10 02:21:50 -08:00
bors
d440a569bb auto merge of #12084 : alexcrichton/rust/codegen-opts, r=cmr
Move them all behind a new -C switch. This migrates some -Z flags and some
top-level flags behind this -C codegen option.

The -C flag takes values of the form "-C name=value" where the "=value" is
optional for some flags.

Flags affected:

* --llvm-args           => -C llvm-args
* --passes              => -C passes
* --ar                  => -C ar
* --linker              => -C linker
* --link-args           => -C link-args
* --target-cpu          => -C target-cpu
* --target-feature      => -C target-fature
* --android-cross-path  => -C android-cross-path
* --save-temps          => -C save-temps
* --no-rpath            => -C no-rpath
* -Z no-prepopulate     => -C no-prepopulate-passes
* -Z no-vectorize-loops => -C no-vectorize-loops
* -Z no-vectorize-slp   => -C no-vectorize-slp
* -Z soft-float         => -C soft-float
* -Z gen-crate-map      => -C gen-crate-map
* -Z prefer-dynamic     => -C prefer-dynamic
* -Z no-integrated-as   => -C no-integrated-as

As a bonus, this also promotes the -Z extra-debug-info flag to a first class -g
or --debuginfo flag.

* -Z debug-info         => removed
* -Z extra-debug-info   => -g or --debuginfo

Closes #9770
Closes #12000
2014-02-10 01:26:24 -08:00
Alex Crichton
071ee96277 Consolidate codegen-related compiler flags
Move them all behind a new -C switch. This migrates some -Z flags and some
top-level flags behind this -C codegen option.

The -C flag takes values of the form "-C name=value" where the "=value" is
optional for some flags.

Flags affected:

* --llvm-args           => -C llvm-args
* --passes              => -C passes
* --ar                  => -C ar
* --linker              => -C linker
* --link-args           => -C link-args
* --target-cpu          => -C target-cpu
* --target-feature      => -C target-fature
* --android-cross-path  => -C android-cross-path
* --save-temps          => -C save-temps
* --no-rpath            => -C no-rpath
* -Z no-prepopulate     => -C no-prepopulate-passes
* -Z no-vectorize-loops => -C no-vectorize-loops
* -Z no-vectorize-slp   => -C no-vectorize-slp
* -Z soft-float         => -C soft-float
* -Z gen-crate-map      => -C gen-crate-map
* -Z prefer-dynamic     => -C prefer-dynamic
* -Z no-integrated-as   => -C no-integrated-as

As a bonus, this also promotes the -Z extra-debug-info flag to a first class -g
or --debuginfo flag.

* -Z debug-info         => removed
* -Z extra-debug-info   => -g or --debuginfo

Closes #9770
Closes #12000
2014-02-10 00:50:39 -08:00
bors
f3a87a7f1f auto merge of #12143 : brson/rust/swap, r=alexcrichton
Thinking about swap as an example of unsafe programming. This cleans it up a bit. It also removes type parametrization over `RawPtr` from the memcpy functions to make this compile.
2014-02-09 23:11:25 -08:00
bors
5bad63cef5 auto merge of #12136 : alexcrichton/rust/issue-12123, r=brson
Closes #12123
2014-02-09 21:56:26 -08:00
bors
47e14456f7 auto merge of #12134 : FlaPer87/rust/temporary-conditions, r=nikomatsakis
Closes #12033

IR Before:

```llvm
normal-return:                                    ; preds = %while_body
  %113 = load i64* %i
  %114 = sub i64 %113, 1
  store i64 %114, i64* %i
  br label %while_cond
```

IR After:

```llvm
normal-return:                                    ; preds = %while_cond
  store i8 %11, i8* %0
  %18 = load i8* %0, !range !0
  call void @_ZN9Temporary9glue_drop19he4ee51d3c03b9cf4ajE(%struct.Temporary* %10)
  %19 = bitcast %struct.Temporary* %10 to i8*
  call void @_ZN2rt11global_heap14exchange_free_19h4fabdf24a2250163aj4v0.0E(i8* %19)
  %20 = icmp ne i8 %18, 0
  br i1 %20, label %while_body, label %while_exit
```
2014-02-09 20:41:27 -08:00
bors
d0affa5c8d auto merge of #12131 : brunoabinader/rust/list-find-doc-typo, r=alexcrichton
Replace ```v``` with ```ls```.
2014-02-09 18:46:28 -08:00
bors
cf243f9b59 auto merge of #12060 : chromatic/rust/enum_tutorial_improvement, r=alexcrichton
This version starts with the simplest case and builds on it. I believe it flows better.
2014-02-09 17:31:31 -08:00
chromatic
e30fd3067e Rearranged enum section of tutorial for clarity.
This version starts with the simple case and builds on it.
2014-02-09 16:59:39 -08:00
Brian Anderson
07c5e5d813 std: Clean up the swap function a little 2014-02-09 16:23:39 -08:00
Brian Anderson
1b7733109d std: Stop parameterizing some memcpy functions over RawPtr
It unsafe assumptions that any impl of RawPtr is for actual pointers,
that they can be copied by memcpy. Removing it is easy, so I don't
think it's solving a real problem.
2014-02-09 16:23:10 -08:00
bors
35b4115ef8 auto merge of #12126 : brson/rust/oxidize_mk, r=alexcrichton
I've always thought 'compile_and_link: ...' looked really awkward in our build output. Replace it with something more interesting. I'm open to alternatives to 'oxidize', like 'compile', anything but 'compile_and_link'.
2014-02-09 16:16:33 -08:00
bors
27f9c7951f auto merge of #12124 : brson/rust/intrinsics, r=thestinger
As mentioned https://github.com/mozilla/rust/pull/11956#issuecomment-34561655 I've taken some of the most commonly-used intrinsics and put them in a more logical place, reduced the amount of code looking in `unstable::intrinsics`.

r? @thestinger
2014-02-09 15:01:32 -08:00
bors
7985fbcb4d auto merge of #12120 : gifnksm/rust/buffered-chars, r=alexcrichton
Add `std::io::Chars` iterator and `Buffer#chars()` method
2014-02-09 11:57:26 -08:00
Alex Crichton
882e2c391e Fix the signature of CreateSymbolicLinkW
Closes #12123
2014-02-09 11:54:19 -08:00
Flavio Percoco
b0ef791496 Make if and while conditions temporary
Closes #12033
2014-02-09 19:46:44 +01:00
Bruno de Oliveira Abinader
66c036c293 Fixed a typo in list's find() documentation. 2014-02-09 12:45:54 -04:00
Brian Anderson
3062d0f6bb mk: Replace 'compile_and_link' with 'oxidize' 2014-02-09 02:42:28 -08:00
bors
2780d9dd54 auto merge of #12119 : huonw/rust/guide-testing, r=brson
be more precise about what's being benchmarked.

Also, reorganise the layout a bit, to put examples directly in their
sections.
2014-02-09 02:21:22 -08:00
bors
f0e0d9e101 auto merge of #12117 : nikomatsakis/rust/issue-11913-borrow-in-aliasable-loc, r=pcwalton
Repair a rather embarassingly obvious hole that I created as part of #9629. In particular, prevent `&mut` borrows of data in an aliasable location. This used to be prevented through the restrictions mechanism, but in #9629 I modified those rules incorrectly. 

r? @pcwalton

Fixes #11913
2014-02-09 01:06:23 -08:00
Brian Anderson
1c4a2fd61c std: Make mem's doc slightly more accurate 2014-02-09 00:23:04 -08:00
Brian Anderson
073b655187 std: Move byteswap functions to mem 2014-02-09 00:17:41 -08:00
Brian Anderson
c7710cdf45 std: Add move_val_init to mem. Replace direct intrinsic usage 2014-02-09 00:17:41 -08:00
Brian Anderson
d433b80e02 std: Add init and uninit to mem. Replace direct intrinsic usage 2014-02-09 00:17:40 -08:00
bors
49ac48db3f auto merge of #12034 : dguenther/rust/fourcc, r=alexcrichton
I was looking into #9303 and was curious if this would still be valuable. @kballard had already done 99% of the work, so I brought the branch up to date and added a feature gate. Any feedback would be appreciated; I wasn't sure if this should be set up as a syntax extension with `#[macro_registrar]`, and if so, where it should be located.

Original PR is here: #9255

TODO:
* [x] Convert to loadable syntax extension
* [x] Default to big endian
* [x] Add `target` identifier
* [x] Expand to include code points 128-255
2014-02-08 22:31:27 -08:00
gifnksm
3a610e98a2 std::io: Add Chars iterator for Buffer.
Add `std::io::Chars` iterator and `Buffer#chars()` method
2014-02-09 14:46:25 +09:00
Yuri Kunde Schlesner
337e62e4d6 Allow codepoints 128-255 in fourc!!
Codepoints with those values will be interpreted as bytes with their
raw codepoint value. ('\xAB' -> 0xABu8, etc.) Codepoints > 255 remain
forbidden.
2014-02-08 23:40:17 -06:00
Yuri Kunde Schlesner
6381daab77 Default fourcc! to big-endian.
It was decided that a consistent result across platforms would be the
most useful and least surprising. A "target" option has been added to
get the old behaviour of using the target platform's endianess.
2014-02-08 23:40:17 -06:00