Commit Graph

39147 Commits

Author SHA1 Message Date
Manish Goregaokar
d54ed567e0 path -> PathBuf for osx/dragonfly (fixup #22727) 2015-02-25 15:21:58 +05:30
Manish Goregaokar
2470fa155e Assert is internal now (fixup #22739) 2015-02-25 14:11:37 +05:30
Manish Goregaokar
e61a790495 Fix type inference error (fixup #22739) 2015-02-25 13:58:58 +05:30
Manish Goregaokar
9f8a1cb38d Use os::getcwd instead of env in rustbook (fixup #22727) 2015-02-25 12:48:14 +05:30
Manish Goregaokar
f8e4fcb38c allow(deprecated) for TaskPool (fixup #22783) 2015-02-25 11:45:06 +05:30
Manish Goregaokar
f164254392 Rollup merge of #22787 - pnkfelix:reenable-gate-for-unsafe_no_drop_flag, r=alexcrichton
Turn `unsafe_no_drop_flag` back into a gated-feature.

Fix #22173
2015-02-25 10:30:12 +05:30
Manish Goregaokar
1f2b3ebd7b Rollup merge of #22744 - alexcrichton:issue-22738, r=aturon
Currently we have a `set_mode` mutator, so this just adds the pairing of a
`mode` accessor to read the value.

Closes #22738
2015-02-25 10:30:01 +05:30
Manish Goregaokar
ecaf74ab3b Rollup merge of #22742 - alexcrichton:issue-22737, r=aturon
If the filename for a path is `None` then we know that the creation of the
parent directory created the whole path so there's no need to retry the call to
`create_dir`.

Closes #22737
2015-02-25 10:29:53 +05:30
Manish Goregaokar
6c6f2317ba Rollup merge of #22729 - alexcrichton:ptr-stabilization, r=aturon
Specifically, the following actions were takend:

* The `copy_memory` and `copy_nonoverlapping_memory` functions
  to drop the `_memory` suffix (as it's implied by the functionality). Both
  functions are now marked as `#[stable]`.
* The `set_memory` function was renamed to `write_bytes` and is now stable.
* The `zero_memory` function is now deprecated in favor of `write_bytes`
  directly.
* The `Unique` pointer type is now behind its own feature gate called `unique`
  to facilitate future stabilization.

[breaking-change]
2015-02-25 10:29:46 +05:30
Manish Goregaokar
b18584cbd9 Rollup merge of #22727 - alexcrichton:prep-env, r=aturon
This commit moves `std::env` away from the `std::old_io` error type as well as
the `std::old_path` module. Methods returning an error now return `io::Error`
and methods consuming or returning paths use `std::path` instead of
`std::old_path`. This commit does not yet mark these APIs as `#[stable]`.

This commit also migrates `std::old_io::TempDir` to `std::fs::TempDir` with
essentially the exact same API. This type was added to interoperate with the new
path API and has its own `tempdir` feature.

Finally, this commit reverts the deprecation of `std::os` APIs returning the old
path API types. This deprecation can come back once the entire `std::old_path`
module is deprecated.

[breaking-change]
2015-02-25 10:29:39 +05:30
Manish Goregaokar
7b7cf84975 Rollup merge of #22596 - alexcrichton:fix-some-impls, r=huonw
This commit removes many unnecessary `unsafe impl` blocks as well as pushing the
needed implementations to the lowest level possible. I noticed that the bounds
for `RwLock` are a little off when reviewing #22574 and wanted to ensure that we
had our story straight on these implementations.
2015-02-25 10:29:32 +05:30
Manish Goregaokar
c950ee93c9 Rollup merge of #22157 - tbu-:pr_debug_collections, r=alexcrichton
r? @Gankro
2015-02-25 10:29:23 +05:30
Manish Goregaokar
1c97ac3d12 Rollup merge of #22792 - semarie:openbsd-unbreak-nacl, r=alexcrichton
The recent commit on liblibc for nacl break the compilation for OpenBSD (and Bitrig too, I think).

The problem is `ino_t` come from another block too now. This patch remove the extra declaration.

```
.../src/liblibc/lib.rs:98:9: 98:37 error: a type named `ino_t` has already been imported in this module [E0251]
.../src/liblibc/lib.rs:98 pub use types::os::arch::posix01::*;
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
```

@dhuseby do you have this problem too ? and if yes, does this patch correct it ?
2015-02-25 10:27:30 +05:30
Manish Goregaokar
3a49c3bd9c Rollup merge of #22785 - nikomatsakis:issue-21750-normalization-with-regions, r=pnkfelix
Two changes:

1. Make traits with assoc types invariant w/r/t their inputs.
2. Fully normalize parameter environments, including any region variables (which were being overlooked).

The former supports the latter, but also just seems like a reasonably good idea.

Fixes #21750

cc @edwardw
r? @pnkfelix
2015-02-25 10:27:24 +05:30
Manish Goregaokar
267c5873e2 Rollup merge of #22784 - rnestler:fix_doc_faq, r=dotdash
According to #22650 and bb0bbf639e the
link changed.
I think this should fix the link on http://doc.rust-lang.org/#faqs
2015-02-25 10:27:17 +05:30
Manish Goregaokar
24fc50d295 Rollup merge of #22783 - alexcrichton:deprecate-taskpool, r=alexcrichton
Rather than stabilize on the current API, we're going to punt this
concern to crates.io, to allow for faster iteration.

[breaking-change]
2015-02-25 10:27:11 +05:30
Manish Goregaokar
9692f3bc94 Rollup merge of #22635 - kmcallister:macros-chapter, r=steveklabnik
r? @steveklabnik
2015-02-25 10:27:03 +05:30
Sébastien Marie
91e00f3bfa unbreak openbsd after nacl intergration 2015-02-25 05:07:40 +01:00
Felix S. Klock II
5d7e283ead Turn unsafe_no_drop_flag back into a gated-feature.
Fix #22173
2015-02-25 01:35:41 +01:00
Keegan McAllister
848a7e6921 Enhance and move information about macro debugging
Fixes #22424.
2015-02-24 16:34:18 -08:00
Keegan McAllister
df0865754e Tweak wording in the macros guide 2015-02-24 16:28:54 -08:00
Keegan McAllister
1804242a2d Add a second, more vexing section on recursive macros
Fixes #22423.
2015-02-24 16:28:54 -08:00
Keegan McAllister
65e1e6bb94 Add a section on recursive macros 2015-02-24 16:28:54 -08:00
Alex Crichton
2d200c9c8b std: Move std::env to the new I/O APIs
This commit moves `std::env` away from the `std::old_io` error type as well as
the `std::old_path` module. Methods returning an error now return `io::Error`
and methods consuming or returning paths use `std::path` instead of
`std::old_path`. This commit does not yet mark these APIs as `#[stable]`.

This commit also migrates `std::old_io::TempDir` to `std::fs::TempDir` with
essentially the exact same API. This type was added to interoperate with the new
path API and has its own `tempdir` feature.

Finally, this commit reverts the deprecation of `std::os` APIs returning the old
path API types. This deprecation can come back once the entire `std::old_path`
module is deprecated.

[breaking-change]
2015-02-24 15:27:42 -08:00
Niko Matsakis
206c2546c0 Improve debug output from coherence. 2015-02-24 18:21:20 -05:00
Niko Matsakis
eb841fc44a Resolve regions too when normalizing param env. 2015-02-24 18:21:20 -05:00
Niko Matsakis
db6ae66764 Make traits with assoc types invariant in their inputs. 2015-02-24 18:21:20 -05:00
Tobias Bucher
870ad3bc75 Change Debug implementation of BTree* as well 2015-02-24 23:47:31 +01:00
Tobias Bucher
408f7b5747 Modify collection's Debug output to resemble in their content only 2015-02-24 23:47:31 +01:00
Raphael Nestler
14c76834fe Fix "How to submit a bug report" link
According to #22650 and bb0bbf639e the
link changed
2015-02-24 23:26:25 +01:00
Alex Crichton
27f8708ba4 std: Recomend threadpool on crates.io for TaskPool 2015-02-24 14:24:15 -08:00
Alex Crichton
ab45694198 std: Stabilize some ptr functions
Specifically, the following actions were taken:

* The `copy_memory` and `copy_nonoverlapping_memory` functions
  to drop the `_memory` suffix (as it's implied by the functionality). Both
  functions are now marked as `#[stable]`.
* The `set_memory` function was renamed to `write_bytes` and is now stable.
* The `zero_memory` function is now deprecated in favor of `write_bytes`
  directly.
* The `Unique` pointer type is now behind its own feature gate called `unique`
  to facilitate future stabilization.
* All type parameters now are `T: ?Sized` wherever possible and new clauses were
  added to the `offset` functions to require that the type is sized.

[breaking-change]
2015-02-24 14:22:33 -08:00
Manish Goregaokar
b711b6a5b2 Rollup merge of #22778 - mzabaluev:leftover-lifetime, r=alexcrichton 2015-02-25 03:21:50 +05:30
Manish Goregaokar
24086987f9 Rollup merge of #22736 - nikomatsakis:issue-22382, r=eddyb
Apply borrowck to fns that appear in const declarations.
Fixes #22382.

r? @eddyb
2015-02-25 03:21:43 +05:30
Manish Goregaokar
c51c377982 Rollup merge of #22539 - oli-obk:style_nitpicks, r=Manishearth
I tried to follow [the style guide][1] as much as possible. This is just from some random readings of the code, so no guarantees on completeness, even in the edited files.

[1]: http://aturon.github.io/style/README.html
2015-02-25 03:21:37 +05:30
Manish Goregaokar
a429bf6a24 Rollup merge of #22458 - steveklabnik:try_in_error_chapter, r=alexcrichton
Fixes #22342
2015-02-25 03:21:30 +05:30
Manish Goregaokar
80ac3a8c5b Rollup merge of #22772 - tbu-:pr_panic_fail, r=alexcrichton 2015-02-25 03:21:24 +05:30
Manish Goregaokar
216be122a0 Rollup merge of #22770 - vhbit:ios-rand-send, r=alexcrichton
"body": null,
2015-02-25 03:21:17 +05:30
Manish Goregaokar
1913e79bd9 Rollup merge of #22758 - ejjeong:aarch64-linux-android, r=alexcrichton
This commit has already been merged in #21774,
but i think it has been accidently overriden by #22584 and #22480.
r? @alexcrichton
2015-02-25 03:21:11 +05:30
Manish Goregaokar
4ff8b8aa8f Rollup merge of #22752 - ipetkov:unsafe-lint-fix, r=alexcrichton
This allows selectively disabling the lint for individual methods or traits.
2015-02-25 03:21:05 +05:30
Manish Goregaokar
ad73cb0e18 Rollup merge of #22747 - krdln:fix-parsing-minus, r=alexcrichton
Makes Rust less amusing by fixing [#22745](https://github.com/rust-lang/rust/issues/22745)
2015-02-25 03:20:58 +05:30
Manish Goregaokar
5af3d660de Rollup merge of #22739 - tbu-:pr_error_net, r=alexcrichton
This affects the `set_non_blocking` function which cannot fail for Unix or
Windows, given correct parameters. Additionally, the short UDP write error case
has been removed as there is no such thing as \"short UDP writes\", instead, the
operating system will error out if the application tries to send a packet
larger than the MTU of the network path.
2015-02-25 03:20:51 +05:30
Manish Goregaokar
0e36a27ec3 Rollup merge of #22623 - petrochenkov:optest, r=alexcrichton
Tests often use `vec![1, 2, 3]` instead of shorter and faster `[1, 2, 3]`.
This patch removes a lot of unnecessary `vec!`s. Hopefully, the tests will compile and run a bit faster.
2015-02-25 03:20:42 +05:30
Vadim Petrochenkov
c11807d32a Fix broken tests 2015-02-24 23:42:09 +03:00
Vadim Petrochenkov
2807a1ce02 Use arrays instead of vectors in tests 2015-02-24 21:15:45 +03:00
bors
0bd15657d9 Auto merge of #22172 - eddyb:almost-there, r=nikomatsakis
Adds `<module::Type>::method` support and makes `module::Type::method` a shorthand for it.
This is most of #16293, except that chaining multiple associated types is not yet supported.
It also fixes #22563 as `impl`s are no longer treated as modules in resolve.

Unfortunately, this is still a *[breaking-change]*:
* If you used a global path to a primitive type, i.e. `::bool`, `::i32` etc. - that was a bug I had to fix.
Solution: remove the leading `::`.
* If you passed explicit `impl`-side type parameters to an inherent method, e.g.:
```rust
struct Foo<T>(T);
impl<A, B> Foo<(A, B)> {
    fn pair(a: A, b: B) -> Foo<(A, B)> { Foo((a, b)) }
}
Foo::<A, B>::pair(a, b)
// Now that is sugar for:
<Foo<A, B>>::pair(a, b)
// Which isn't valid because `Foo` has only one type parameter.
// Solution: replace with:
Foo::<(A, B)>::pair(a, b)
// And, if possible, remove the explicit type param entirely:
Foo::pair(a, b)
```
* If you used the `QPath`-related `AstBuilder` methods @hugwijst added in #21943.
The methods still exist, but `QPath` was replaced by `QSelf`, with the actual path stored separately.
Solution: unpack the pair returned by `cx.qpath` to get the two arguments for `cx.expr_qpath`.
2015-02-24 17:56:09 +00:00
Steve Klabnik
f31ea22bff Mention try macro in error chapter
Fixes #22342
2015-02-24 12:31:46 -05:00
Tobias Bucher
0fc1a7da93 Improve readability of an error check in set_non_blocking 2015-02-24 18:03:01 +01:00
Tobias Bucher
54b11066bb Revert a wrong replace of "fail" to "panic" 2015-02-24 17:02:26 +01:00
bors
c9ace059e7 Auto merge of #22749 - kballard:process-stdio-constructors, r=alexcrichton
There are no tests for this because testing inherit/null is tricky.
Probably why there weren't tests for it to begin with.
2015-02-24 15:01:28 +00:00