Commit Graph

39850 Commits

Author SHA1 Message Date
Jorge Aparicio
3ab26f8469 join lines in makefile 2015-03-16 21:57:43 -05:00
Jorge Aparicio
59749087f8 fix after rebase 2015-03-16 21:57:42 -05:00
Jorge Aparicio
6d49476e7b preemptively fix windows compilation errors 2015-03-16 21:57:42 -05:00
Jorge Aparicio
cb5e429291 move some tests back to libcollections 2015-03-16 21:57:42 -05:00
Jorge Aparicio
e09bf82a31 enable enum_set tests 2015-03-16 21:57:42 -05:00
Jorge Aparicio
a079d5e4d2 remove imports 2015-03-16 21:57:42 -05:00
Jorge Aparicio
6453fcd4cc extract libcollections tests into libcollectionstest 2015-03-16 21:57:42 -05:00
Jorge Aparicio
3ff84fc5fd impl {i,u}{8,16,32,64,size} 2015-03-16 21:57:42 -05:00
Jorge Aparicio
8afcaabee3 impl<T> *const T, impl<T> *mut T 2015-03-16 21:57:42 -05:00
Jorge Aparicio
633c593bc3 impl<T> [T] 2015-03-16 21:56:31 -05:00
Jorge Aparicio
5b118f5ecd impl str 2015-03-16 21:56:31 -05:00
Jorge Aparicio
b2f37554bf impl char 2015-03-16 21:56:31 -05:00
Jorge Aparicio
8570739880 allow inherent implementations on primitives 2015-03-16 21:56:31 -05:00
bors
92dd995e17 Auto merge of #23331 - eddyb:attr-lookahead, r=nikomatsakis
Most of the changes are cleanup facilitated by straight-forward attribute handling.
This is a minor [breaking-change] for users of `quote_stmt!` (returns `Option<P<Stmt>>` now) and some of the public methods in `Parser` (a few `Vec<Attribute>` arguments/returns were removed).

r? @nikomatsakis
2015-03-16 22:13:52 +00:00
bors
1760e8749a Auto merge of #23342 - apasel422:23327, r=alexcrichton
closes #23327
2015-03-16 19:35:42 +00:00
bors
bde09eea35 Auto merge of #23347 - aturon:stab-misc, r=alexcrichton
This commit deprecates the `count`, `range` and `range_step` functions
in `iter`, in favor of range notation. To recover all existing
functionality, a new `step_by` adapter is provided directly on `ops::Range`
and `ops::RangeFrom`.

[breaking-change]

r? @alexcrichton
2015-03-16 17:02:11 +00:00
bors
cc789193e1 Auto merge of #23395 - bluss:tuple-macro, r=alexcrichton
Remove the unused parts of the tuple macro in libcore (for `val0` and similar removed methods). Also adjust the module docs accordingly.
2015-03-16 14:29:13 +00:00
Andrew Paseltiner
90f06ae33f document undefined collection behavior with interior mutability
closes #23327
2015-03-16 09:55:41 -04:00
bors
80a0d8223d Auto merge of #23404 - richo:ppc-configure, r=sanxiyn
Finally making progress on a fully native toolchain. Specifically, this makes it possible to move forward by building librustllvm on the target platform.
2015-03-16 11:55:39 +00:00
bors
857ac28867 Auto merge of #23411 - cmr:test-7950, r=huonw
Closes #7950
2015-03-16 07:37:27 +00:00
Corey Richardson
3e01b9e194 Add test for #7950
Closes #7950
2015-03-16 03:33:12 -04:00
bors
cd3faf38ee Auto merge of #23394 - tanadeau:remove-old_io-notes, r=alexcrichton
r? @alexcrichton
2015-03-16 03:55:13 +00:00
Richo Healey
a0297cbe12 powerpc: Support configure on native ppc[64] hosts 2015-03-15 20:04:04 -07:00
bors
b1eadf3f1d Auto merge of #23396 - semarie:remove-sized-bounds, r=sfackler
cc @alexcrichton
2015-03-16 01:23:30 +00:00
bors
c62ae87db2 Auto merge of #23206 - nagisa:print-io, r=alexcrichton
r? @alexcrichton or @aturon 

This still needs to somehow figure out how to avoid unstable warnings arising from the use of unstable functions. I tried to use `#[allow_internal_unstable]` but it still spits out warnings as far as I can see. @huonw (I think you implemented it) does `#[allow_internal_unstable]` not work for some reason or am I using it incorrectly?
2015-03-15 21:16:04 +00:00
bors
542e2bb391 Auto merge of #23353 - alexcrichton:stabilize-os, r=aturon
This commit starts to organize the `std::os::$platform` modules and in the
process stabilizes some of the functionality contained within. The organization
of these modules will reflect the organization of the standard library itself
with extension traits for primitives in the same corresponding module.

The OS-specific modules will grow more functionality over time including
concrete types that are not extending functionality of other structures, and
these will either go into the closest module in `std::os::$platform` or they
will grow a new module in the hierarchy.

The following items are now stable:

* `os::{unix, windows}`
* `unix::ffi`
* `unix::ffi::OsStrExt`
* `unix::ffi::OsStrExt::{from_bytes, as_bytes, to_cstring}`
* `unix::ffi::OsString`
* `unix::ffi::OsStringExt::{from_vec, into_vec}`
* `unix::process`
* `unix::process::CommandExt`
* `unix::process::CommandExt::{uid, gid}`
* `unix::process::ExitStatusExt`
* `unix::process::ExitStatusExt::signal`
* `unix::prelude`
* `windows::ffi`
* `windows::ffi::OsStringExt`
* `windows::ffi::OsStringExt::from_wide`
* `windows::ffi::OsStrExt`
* `windows::ffi::OsStrExt::encode_wide`
* `windows::prelude`

The following items remain unstable:

* `unix::io`
* `unix::io::{Fd, AsRawFd}`
* `unix::fs::{PermissionsExt, OpenOptionsExt}`
* `windows::io`
* `windows::io::{Handle, AsRawHandle}`
* `windows::io::{Socket, AsRawSocket}`
* `windows::fs`
* `windows::fs::OpenOptionsExt`

Due to the reorgnization of the platform extension modules, this commit is a
breaking change. Most imports can be fixed by adding the relevant libstd module
in the `use` path (such as `ffi` or `fs`).

[breaking-change]
2015-03-15 18:42:54 +00:00
Sébastien Marie
b94bcbcdcf unbreak freebsd/openbsd/bitrig build after #23316 2015-03-15 18:34:18 +01:00
Alex Crichton
1f5f76adc3 std: Stabilize portions of std::os::$platform
This commit starts to organize the `std::os::$platform` modules and in the
process stabilizes some of the functionality contained within. The organization
of these modules will reflect the organization of the standard library itself
with extension traits for primitives in the same corresponding module.

The OS-specific modules will grow more functionality over time including
concrete types that are not extending functionality of other structures, and
these will either go into the closest module in `std::os::$platform` or they
will grow a new module in the hierarchy.

The following items are now stable:

* `os::{unix, windows}`
* `unix::ffi`
* `unix::ffi::OsStrExt`
* `unix::ffi::OsStrExt::{from_bytes, as_bytes, to_cstring}`
* `unix::ffi::OsString`
* `unix::ffi::OsStringExt::{from_vec, into_vec}`
* `unix::process`
* `unix::process::CommandExt`
* `unix::process::CommandExt::{uid, gid}`
* `unix::process::ExitStatusExt`
* `unix::process::ExitStatusExt::signal`
* `unix::prelude`
* `windows::ffi`
* `windows::ffi::OsStringExt`
* `windows::ffi::OsStringExt::from_wide`
* `windows::ffi::OsStrExt`
* `windows::ffi::OsStrExt::encode_wide`
* `windows::prelude`

The following items remain unstable:

* `unix::io`
* `unix::io::{Fd, AsRawFd}`
* `unix::fs::{PermissionsExt, OpenOptionsExt}`
* `windows::io`
* `windows::io::{Handle, AsRawHandle}`
* `windows::io::{Socket, AsRawSocket}`
* `windows::fs`
* `windows::fs::OpenOptionsExt`

Due to the reorgnization of the platform extension modules, this commit is a
breaking change. Most imports can be fixed by adding the relevant libstd module
in the `use` path (such as `ffi` or `fs`).

[breaking-change]
2015-03-15 10:28:34 -07:00
Ulrik Sverdrup
880b8c551f core: Update tuple doc
Remove mention of removed methods `.val0` etc.
2015-03-15 18:16:03 +01:00
Ulrik Sverdrup
ee8af9109f core: Remove unused parts of tuple macro 2015-03-15 18:16:03 +01:00
bors
b4f5e78b46 Auto merge of #23387 - Manishearth:rollup, r=Manishearth
- Successful merges: #23375, #23379, #23382, #23384
- Failed merges:
2015-03-15 16:06:04 +00:00
Trent Nadeau
d14728ad28 Removed old_io note from std::net 2015-03-15 11:31:38 -04:00
bors
95018eec69 Auto merge of #23372 - tamird:fix-ios-compilation, r=alexcrichton
r? @alexcrichton cc @vhbit
2015-03-15 13:32:21 +00:00
Manish Goregaokar
9f1240b665 Rollup merge of #23384 - daboross:patch-2, r=alexcrichton
This changed `an String` to `a String`. Very minor change!

The usage of `an String` was introduced in a828e79480 (diff-b596503c7c33ce457b6d047e351ac12bR423), which changed `an OsString` to `an String`.
2015-03-15 15:40:18 +05:30
Manish Goregaokar
9d8bafe742 Rollup merge of #23382 - FuGangqiang:typos, r=alexcrichton 2015-03-15 15:40:18 +05:30
Manish Goregaokar
f31d818739 Rollup merge of #23379 - kballard:tweak-stdio-docs-no-raw-constructors, r=alexcrichton
`std::io` does not currently expose the `stdin_raw`, `stdout_raw`, or
`stderr_raw` functions. According to the current plans for stdio (see
rust-lang/rfcs#517), raw access will likely be provided using the
platform-specific `std::os::{unix,windows}` modules. At the moment we
don't expose any way to do this. As such, delete all mention of the
`*_raw` functions from the `stdin`/`stdout`/`stderr` function
documentation.

While we're at it, remove a few `pub`s from items that aren't exposed.
This is done just to lessen the confusion experienced by anyone who
looks at the source in an attempt to find the `*_raw` functions.
2015-03-15 15:40:18 +05:30
Manish Goregaokar
3ebe24920b Rollup merge of #23375 - kballard:remove-old_io-recommendation-from-io, r=huonw
Now that `old_io` is deprecated and `std::io` is stable, we should stop
recommending the use of `old_io` in the module documentation.
2015-03-15 15:40:18 +05:30
bors
54660fc392 Auto merge of #23316 - alexcrichton:less-question-sized, r=aturon
It is a frequent pattern among I/O functions to take `P: AsPath + ?Sized` or
`AsOsStr` instead of `AsPath`. Most of these functions do not need to take
ownership of their argument, but for libraries in general it's much more
ergonomic to not deal with `?Sized` at all and simply require an argument `P`
instead of `&P`.

This change is aimed at removing unsightly `?Sized` bounds while retaining the
same level of usability as before. All affected functions now take ownership of
their arguments instead of taking them by reference, but due to the forwarding
implementations of `AsOsStr` and `AsPath` all code should continue to work as it
did before.

This is strictly speaking a breaking change due to the signatures of these
functions changing, but normal idiomatic usage of these APIs should not break in
practice.

[breaking-change]
2015-03-15 09:18:42 +00:00
Tamir Duberstein
04c947c13a Implement winsize() for {ios,dragonfly}
`sys/ttycom.h` in both:
`#define TIOCGWINSZ  _IOR('t', 104, struct winsize)  /* get window size */`
2015-03-15 01:29:13 -07:00
Tamir Duberstein
0b01a9bb4b Fallout of c933d44f7b 2015-03-15 01:29:12 -07:00
Dabo Ross
fe9bb26e78 Fix an String -> a String in env.rs documentation
Super minor change!

The `an String` was introduced in a828e79480 (diff-b596503c7c33ce457b6d047e351ac12bR423), which changed `an OsString` to `an String`.
2015-03-15 00:00:26 -07:00
Alex Crichton
60a4a2db88 std: Remove ?Sized bounds from many I/O functions
It is a frequent pattern among I/O functions to take `P: AsPath + ?Sized` or
`AsOsStr` instead of `AsPath`. Most of these functions do not need to take
ownership of their argument, but for libraries in general it's much more
ergonomic to not deal with `?Sized` at all and simply require an argument `P`
instead of `&P`.

This change is aimed at removing unsightly `?Sized` bounds while retaining the
same level of usability as before. All affected functions now take ownership of
their arguments instead of taking them by reference, but due to the forwarding
implementations of `AsOsStr` and `AsPath` all code should continue to work as it
did before.

This is strictly speaking a breaking change due to the signatures of these
functions changing, but normal idiomatic usage of these APIs should not break in
practice.

[breaking-change]
2015-03-14 23:23:54 -07:00
FuGangqiang
3be8380576 fix typos 2015-03-15 13:47:34 +08:00
bors
f59af75bd8 Auto merge of #23381 - Manishearth:rollup, r=Manishearth
r? @Manishearth
2015-03-15 05:42:41 +00:00
Manish Goregaokar
d66d0b3ac2 Rollup merge of #23368 - EduardoBautista:fix-closures-chapter, r=steveklabnik
"body": null,
2015-03-15 10:23:45 +05:30
Manish Goregaokar
09e5a7a04e Rollup merge of #23367 - EduardoBautista:fix-indentation-in-book, r=steveklabnik
It was using tabs.
2015-03-15 10:23:45 +05:30
Manish Goregaokar
34ce376140 Rollup merge of #23365 - dotdash:array_loop_panic, r=eddyb
[expr; 0] currently exhibits inconsistent behaviour and [expr; n] with n > 1 triggers an LLVM assertion in case that \"expr\" diverges.
2015-03-15 10:23:44 +05:30
Manish Goregaokar
911f7fec81 Rollup merge of #23363 - meqif:master, r=alexcrichton
There was a minor typo in the book's concurrency section (\"recieve\" instead of \"receive\").
2015-03-15 10:23:43 +05:30
Manish Goregaokar
4be0eaeb48 Rollup merge of #23362 - dotdash:llvm_req, r=alexcrichton
LLVM older that 3.6 has a bug that cause assertions when compiling certain
constructs. For 3.5 there's still a chance that the bug might get fixed
in 3.5.2, so let's keep allowing to compile with it for it for now.
2015-03-15 10:23:42 +05:30
Manish Goregaokar
6af2721466 Rollup merge of #23358 - rprichard:reject-empty-L, r=alexcrichton
This change closes #23303 by rejecting an empty search path.
2015-03-15 10:23:42 +05:30