Commit Graph

40025 Commits

Author SHA1 Message Date
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
a2572885ab Auto merge of #23352 - alexcrichton:stabilize-net, r=aturon
This commit performs a stabilization pass over the std::net module,
incorporating the changes from RFC 923. Specifically, the following actions were
taken:

Stable functionality:

* `net` (the name)
* `Shutdown`
* `Shutdown::{Read, Write, Both}`
* `lookup_host`
* `LookupHost`
* `SocketAddr`
* `SocketAddr::{V4, V6}`
* `SocketAddr::port`
* `SocketAddrV4`
* `SocketAddrV4::{new, ip, port}`
* `SocketAddrV6`
* `SocketAddrV4::{new, ip, port, flowinfo, scope_id}`
* Common trait impls for socket addr structures
* `ToSocketAddrs`
* `ToSocketAddrs::Iter`
* `ToSocketAddrs::to_socket_addrs`
* `ToSocketAddrs for {SocketAddr*, (Ipv*Addr, u16), str, (str, u16)}`
* `Ipv4Addr`
* `Ipv4Addr::{new, octets, to_ipv6_compatible, to_ipv6_mapped}`
* `Ipv6Addr`
* `Ipv6Addr::{new, segments, to_ipv4}`
* `TcpStream`
* `TcpStream::connect`
* `TcpStream::{peer_addr, local_addr, shutdown, try_clone}`
* `{Read,Write} for {TcpStream, &TcpStream}`
* `TcpListener`
* `TcpListener::bind`
* `TcpListener::{local_addr, try_clone, accept, incoming}`
* `Incoming`
* `UdpSocket`
* `UdpSocket::bind`
* `UdpSocket::{recv_from, send_to, local_addr, try_clone}`

Unstable functionality:

* Extra methods on `Ipv{4,6}Addr` for various methods of inspecting the address
  and determining qualities of it.
* Extra methods on `TcpStream` to configure various protocol options.
* Extra methods on `UdpSocket` to configure various protocol options.

Deprecated functionality:

* The `socket_addr` method has been renamed to `local_addr`

This commit is a breaking change due to the restructuring of the `SocketAddr`
type as well as the renaming of the `socket_addr` method. Migration should be
fairly straightforward, however, after accounting for the new level of
abstraction in `SocketAddr` (protocol distinction at the socket address level,
not the IP address).

[breaking-change]
2015-03-17 00:50:26 +00: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
Tshepang Lekhonkhobe
4b75dc4648 thread: 'dur' -> 'duration'
Also:

- italize the binding name
- complete a sentence
2015-03-16 23:25:22 +02:00
bors
1760e8749a Auto merge of #23342 - apasel422:23327, r=alexcrichton
closes #23327
2015-03-16 19:35:42 +00:00
Paul ADENOT
7dbcf08211 Fix 404 to crates.io's doc on integrating with a native toolchain
This looks like the most logical target to give to this link, or at least what I would expect as someone that want to integrate with a native library.

r? @steveklabnik
2015-03-16 19:56:14 +01:00
Alex Crichton
b3a44859ec std: Stabilize the Write::flush method
The [associated RFC][rfc] for possibly splitting out `flush` has been closed and
as a result there are no more blockers for stabilizing this method, so this
commit marks the method as such.

[rfc]: https://github.com/rust-lang/rfcs/pull/950
2015-03-16 11:51:57 -07:00
Tobias Bucher
1b894c65de Improve error handling in libflate
This removes the error case of the compression functions, the only errors that
can occur are incorrect parameters or an out-of-memory condition, both of which
are handled with panics in Rust.

Also introduces an extensible `Error` type instead of returning an `Option`.
2015-03-16 19:15:20 +01: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
Tamir Duberstein
c1f6951826 Regression test for #13077
Closes #13077.
2015-03-16 07:35:24 -07:00
Tamir Duberstein
2522207a99 Regression test for #16922
Closes #16922.
2015-03-16 07:35:24 -07:00
Tamir Duberstein
ef343645c6 Regression test for #20714
Closes #20714.
2015-03-16 07:35:24 -07:00
Tamir Duberstein
c986199425 Regression test for #20396
Closes #20396.
2015-03-16 07:35:23 -07:00
Tamir Duberstein
1d31f31d10 Regression test for #20261
Closes #20261.
2015-03-16 07:35:23 -07:00
Tamir Duberstein
1759cfa01c Consistent spacing 2015-03-16 07:35:23 -07:00
Tamir Duberstein
a19bbca092 Regression test for #20225
Closes #20225.
2015-03-16 07:35:23 -07:00
Tamir Duberstein
3a93bdb92c Regression test for #19982
Closes #17165, #19982.
2015-03-16 07:35:23 -07:00
Tamir Duberstein
b9f5711a8a Regression test for #18919
Closes #18919.
2015-03-16 07:35:22 -07:00
Tamir Duberstein
a4fa901dab Regression test for #13407
Closes #13407.
2015-03-16 07:35:22 -07:00
Tamir Duberstein
802e7073b7 Regression test for #11820
Closes #11820.
2015-03-16 07:35:22 -07:00
Tamir Duberstein
a17f061b13 Regression test for #9951
Closes #9951.
2015-03-16 07:35:20 -07: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
Nicholas
cbd37d8980 [BREAKING] Rename two instances of MAP_NONRESERVE
To the correct MAP_NORESERVE. Every other thing is known as MAP_NORESERVE, so this is just a basic typo.

I really doubt this will break anybody's but my own code.
2015-03-15 23:03:18 -07:00
Nick Cameron
1fd38c181a Reviewer changes 2015-03-16 17:01:12 +13: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
Nick Cameron
2df1ceb001 resolve: factor out resolve imports to its own module 2015-03-16 11:03:54 +13:00
Nick Cameron
432011d143 Fallout in testing. 2015-03-16 11:03:54 +13:00
Nick Cameron
170ccd615f Error if pub use references a private item.
[breaking-change]

Closes #23266
2015-03-16 11:03:54 +13:00
Nick Cameron
73afbef3aa Misc tidy ups in resolve 2015-03-16 11:03:54 +13: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
Tamir Duberstein
f5765793b6 Strip trailing whitespace 2015-03-15 11:25:43 -07:00
Alex Crichton
970baad714 std: Clean up the sys::thread modules
This module had become a #[cfg] jungle, try to bring at least a small semblance
of order to it!
2015-03-15 10:35:48 -07: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