Commit Graph

22420 Commits

Author SHA1 Message Date
Daniel Micay
298f06f267 make ! support the equality/ordering operators
An expression such as `bottom == not_bottom` or `not_bottom == bottom`
already compiled, but this fixes the case where both sides are `bottom`.
2013-09-13 17:31:59 -04:00
Daniel Micay
2dec95e417 ptr: fix offset intrinsic
This was intended to always use inbounds pointer arithmetic now.
2013-09-13 17:14:24 -04:00
bors
150b4ffccc auto merge of #9158 : thestinger/rust/extern, r=alexcrichton
Since function pointers do not carry along the function attributes with
them in the type, this needs to be set on the call instruction itself.

Closes #9152
2013-09-13 14:10:52 -07:00
bors
b81743e69c auto merge of #9151 : catamorphism/rust/rustpkg-target-specific-subdirectory, r=brson
r? @brson As per rustpkg.md, rustpkg now builds in a target-specific
subdirectory of build/, and installs libraries into a target-specific
subdirectory of lib.

Closes #8672
2013-09-13 12:55:54 -07:00
bors
05bbb480a2 auto merge of #9170 : alexcrichton/rust/flaky-fileinput, r=erickt
The glob tests cannot change the current working directory because the other tests (namely the fileinput ones) depend on the current working directory not changing.
2013-09-13 11:45:56 -07:00
Alex Crichton
a7215dd284 Move glob tests to a run-pass test
The normal unit tests cannot change the current working directory because it
messes with the other tests which depend on a particular working directory.
2013-09-13 10:52:22 -07:00
Tim Chevalier
24fdb1d102 rustc/rustpkg: Use a target-specific subdirectory in build/ and lib/
As per rustpkg.md, rustpkg now builds in a target-specific
subdirectory of build/, and installs libraries into a target-specific
subdirectory of lib.

Closes #8672
2013-09-13 10:43:22 -07:00
Daniel Micay
1ac37d50c0 set sret attribute as needed on call instructions
Since function pointers do not carry along the function attributes with
them in the type, this needs to be set on the call instruction itself.

Closes #9152
2013-09-13 12:34:25 -04:00
Erick Tryzelaar
93683ae6da std: Fix another windows problem with the unwrap_or_default rename 2013-09-13 07:09:32 -07:00
Erick Tryzelaar
28eb49bfbf std: rename Option.chain to Option.and_then on windows 2013-09-13 06:58:46 -07:00
klutzy
3924cb031f std::rt::io: Fix file I/O on Win32
It was broken on win32 because of header inconsistency.
2013-09-13 19:23:57 +09:00
bors
7c8f503ac5 auto merge of #9141 : alexcrichton/rust/ignore-fileinput, r=catamorphism
These tests are being very flaky on the bots, and the reason is that files are
being created and then when attempted to get read they actually don't exist. I'm
not entirely sure why this is happening, but I also don't fully trust the
std::io implemention using @-boxes to close/flush/write files at the right time.

This moves the tests to using std::rt::io which is hopefully more robust and
something that we can actually reason about. Sadly, due to #8810, these tests
fail on windows, so they're all ignored on windows right now.
2013-09-13 02:25:49 -07:00
Alex Crichton
62ba835573 Translate nested items in default methods
Closes #9123
2013-09-13 01:42:44 -07:00
bors
fd39bd169c auto merge of #9148 : jakub-/rust/rustpkg-install-mkdir-p, r=catamorphism
Testing this is a little tricky as an intermediate temporary directory is only used for remote git repositories and therefore that path cannot be reliably exercised in the tests.
2013-09-13 01:00:50 -07:00
Alex Crichton
d0462f070c Improve the local_data docs slightly
Remove references to local_data::Key and only mention the macro for how to
construct new keys into local data.
2013-09-12 23:26:06 -07:00
bors
323e8f07ff auto merge of #9087 : fhahn/rust/rust_crate_map, r=brson
This patch converts the rust_crate_map.cpp to Rust as mentioned at the end of #8880.
2013-09-12 23:00:51 -07:00
Steven Fackler
ef964a162f Stop using newtypes in rt::io::buffered
This is a workaround for #9155. Currently, any uses of BufferedStream
outside of libstd ICE.
2013-09-12 21:48:47 -07:00
bors
2bdf4af012 auto merge of #8796 : brson/rust/cstack, r=pnkfelix 2013-09-12 21:30:47 -07:00
bors
c7657b782e auto merge of #9147 : catamorphism/rust/rustpkg-install-to-rust-path, r=catamorphism,metajack
r? @metajack Install to the first directory in the RUST_PATH if the user set a
RUST_PATH. In the case where RUST_PATH isn't set, the behavior
remains unchanged.

Closes #7402
2013-09-12 19:30:46 -07:00
Tim Chevalier
b4b375cbae rustpkg: Install to RUST_PATH
Install to the first directory in the RUST_PATH if the user set a
RUST_PATH. In the case where RUST_PATH isn't set, the behavior
remains unchanged.

Closes #7402
2013-09-12 19:11:57 -07:00
Erick Tryzelaar
7f9c5aae9e std: Restore Option::chain{,_mut}_ref as and_then{,_mut}_ref 2013-09-12 18:54:28 -07:00
Erick Tryzelaar
7c08abb0ce Document the Zero trait 2013-09-12 18:54:13 -07:00
Erick Tryzelaar
f107718a9b std: Remove Zero impl for Option
Options are not numeric types, so it doesn't make sense for them to
implement Zero.
2013-09-12 18:54:13 -07:00
Erick Tryzelaar
43aba856b4 std: Remove Zero impl from vec
Vecs are not numeric types, so it doesn't make sense for them to
implement Zero.
2013-09-12 18:54:13 -07:00
Erick Tryzelaar
a0e123eb6e syntax: add #[deriving(Default)] syntax extension 2013-09-12 18:54:13 -07:00
Erick Tryzelaar
ca47eebb44 std: Add a bunch of Default impls 2013-09-12 18:54:13 -07:00
Erick Tryzelaar
38f97ea103 std: Rename {Option,Result}::chain{,_err}* to {and_then,or_else} 2013-09-12 18:54:13 -07:00
Erick Tryzelaar
e03d60e9eb std: Add ToEither/IntoEither/AsEither 2013-09-12 18:54:12 -07:00
Erick Tryzelaar
12e0d7ecf0 std: Add ToResult/IntoResult/AsResult 2013-09-12 18:54:12 -07:00
Erick Tryzelaar
ff34740a29 std: Add ToOption/IntoOption/AsOption 2013-09-12 18:54:12 -07:00
Erick Tryzelaar
b8a284e873 std: fix a warning 2013-09-12 18:54:12 -07:00
Erick Tryzelaar
d625d4a598 std: Add Option.{and,and_then,or,or_else} 2013-09-12 18:54:12 -07:00
Erick Tryzelaar
7380b1ce7f std: Add Option.unwrap_or_else and a couple tests 2013-09-12 18:54:12 -07:00
Erick Tryzelaar
2bd87ad432 std: Add Default implementation for vecs 2013-09-12 18:54:12 -07:00
Erick Tryzelaar
e6c11313c8 std: Add Option.{result_or_default,or_default} that uses Default 2013-09-12 18:54:12 -07:00
Erick Tryzelaar
f1374a7044 libsyntax: add Default implementation to OptVec 2013-09-12 18:54:12 -07:00
Erick Tryzelaar
4a73c8eac7 std: add default implementations to Option 2013-09-12 18:54:12 -07:00
Erick Tryzelaar
653400a7f0 std: add default implementations to HashMap 2013-09-12 18:54:12 -07:00
Erick Tryzelaar
45c62c08f9 std: rename Option::unwrap_or_default() to unwrap_or() 2013-09-12 18:54:11 -07:00
bors
19c0735231 auto merge of #9132 : catamorphism/rust/rustpkg-recursive-deps, r=catamorphism,metajack
r? @metajack ...recursive dependencies

Closes #8524
2013-09-12 17:45:45 -07:00
Tim Chevalier
91e64d0407 rustpkg: Search RUST_PATH properly for dependencies, and add a test for recursive dependencies
Closes #8524
2013-09-12 17:20:58 -07:00
Jakub
3d14e82be7 Fix rustpkg install for git repositories 2013-09-12 23:31:45 +00:00
Florian Hahn
2b5f4b55c0 Convert rust_crate_map.cpp to Rust
Conflicts:
	src/libstd/rt/logging.rs
2013-09-13 00:47:30 +02:00
Brian Anderson
0c89183e80 rustc: Fix cstack lint for default methods. Closes #8753 2013-09-12 15:21:01 -07:00
bors
761ae00357 auto merge of #9146 : catamorphism/rust/rustpkg-sub-package-ids, r=brson,catamorphism
r? @brson Package IDs can now refer to a subdirectory of a particular source
tree, and not just a top-level directory with a src/ directory as its
parent.

For example, referring to the package ID a/b/c/d , in workspace W,
if W/src/a is a package, will build the sources for the package in
a/b/c/d (and not other crates in W/src/a).

Closes #6408
2013-09-12 14:50:43 -07:00
Tim Chevalier
3226a804ad rustpkg: Support sub-package-IDs
Package IDs can now refer to a subdirectory of a particular source
tree, and not just a top-level directory with a src/ directory as its
parent.

For example, referring to the package ID a/b/c/d , in workspace W,
if W/src/a is a package, will build the sources for the package in
a/b/c/d (and not other crates in W/src/a).

Closes #6408
2013-09-12 14:11:25 -07:00
bors
cabba6b4d3 auto merge of #9136 : thestinger/rust/ptr, r=alexcrichton
This is mostly for consistency, as you can now compare raw pointers in
constant expressions or without the standard library.

It also reduces the number of `ptrtoint` instructions in the IR, making
tracking down culprits of what's usually an anti-pattern easier.
2013-09-12 13:10:55 -07:00
bors
a6be8d353b auto merge of #9140 : alexcrichton/rust/issue-9119, r=huonw
Closes #9119
2013-09-12 11:56:00 -07:00
bors
248765a746 auto merge of #9135 : jbclements/rust/let-var-hygiene, r=erickt
Fixes issue #9110, changes field_ty element to Name, adds test case, improves fail error message
2013-09-12 09:51:02 -07:00
bors
5f97dbe092 auto merge of #9134 : luqmana/rust/i7617, r=alexcrichton 2013-09-12 08:41:03 -07:00