Commit Graph

39895 Commits

Author SHA1 Message Date
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
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
Tamir Duberstein
d51047ded0 Strip all leading/trailing newlines 2015-03-15 09:08:21 -07: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
Manish Goregaokar
7eb9c3765f Rollup merge of #23356 - bombless:camelcase, r=alexcrichton
non_camel_case_types lint suggests `ONETWOTHREE` for non-camel type `ONE_TWO_THREE`, which doesn't look good.
This patch fixes it.
2015-03-15 10:23:41 +05:30
Manish Goregaokar
01f10dead3 Rollup merge of #23351 - nagisa:rustdoc-lines-2, r=alexcrichton
Previously it would fail on a trivial case like

    /// Summary line
    /// <trailing space>
    /// Regular content

Compliant markdown preprocessor would render that as two separate paragraphs, but our summary line
extractor interprets both lines as the same paragraph and includes both into the short summary resulting in
![screenshot from 2015-03-13 22 47 08](https://cloud.githubusercontent.com/assets/679122/6648596/7ef792b2-c9e4-11e4-9c19-704c288ec4de.png)
2015-03-15 10:23:40 +05:30
bors
66853af9af Auto merge of #23351 - nagisa:rustdoc-lines-2, r=alexcrichton
Previously it would fail on a trivial case like

    /// Summary line
    /// <trailing space>
    /// Regular content

Compliant markdown preprocessor would render that as two separate paragraphs, but our summary line
extractor interprets both lines as the same paragraph and includes both into the short summary resulting in
![screenshot from 2015-03-13 22 47 08](https://cloud.githubusercontent.com/assets/679122/6648596/7ef792b2-c9e4-11e4-9c19-704c288ec4de.png)
2015-03-15 03:11:14 +00:00
Kevin Ballard
3453b5b4a8 Remove incorrect references to _raw stdio functions
std::io does not currently expose the stdin_raw, stdout_raw, or
stderr_raw functions. According to the current plans for stdio (see RFC
#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-14 18:08:09 -07:00
bors
8c85a9d20f Auto merge of #23313 - barosl:match-specialize-ice, r=jakub-
The arity of `ref x` is always 1, so it needs to be dereferenced before being compared with some other type whose arity is not 1.

Fixes #23009.
2015-03-15 00:39:54 +00:00
Kevin Ballard
3dd455d4e1 Stop recommending old_io in the module doc for std::io
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-14 17:36:36 -07:00
Simonas Kazlauskas
6e92f0580b Use new io in print and println macroses 2015-03-15 00:26:17 +02:00