]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agoFix spelling errors in comments.
Joseph Crail [Thu, 19 Mar 2015 04:48:08 +0000 (00:48 -0400)]
Fix spelling errors in comments.

I corrected misspelled comments in several crates.

9 years agoAuto merge of #23482 - alexcrichton:snapshots, r=aturon
bors [Thu, 19 Mar 2015 00:17:00 +0000 (00:17 +0000)]
Auto merge of #23482 - alexcrichton:snapshots, r=aturon

9 years agoRegister new snapshots
Alex Crichton [Wed, 18 Mar 2015 16:36:18 +0000 (09:36 -0700)]
Register new snapshots

9 years agoAuto merge of #23473 - Manishearth:rollup, r=Manishearth
bors [Wed, 18 Mar 2015 17:32:13 +0000 (17:32 +0000)]
Auto merge of #23473 - Manishearth:rollup, r=Manishearth

9 years agoRollup merge of #23428 - Manishearth:ast-doc, r=huon
Manish Goregaokar [Wed, 18 Mar 2015 15:02:54 +0000 (20:32 +0530)]
Rollup merge of #23428 - Manishearth:ast-doc, r=huon

 I often have to run `ast-json` or look into the pretty-printer source to figure out what the fields of an AST enum mean. I've tried to document most of what I know (and some semi-obvious stuff).

r? @steveklabnik

f? @eddyb

9 years agoRollup merge of #23455 - Ryman:trim_matches_doc, r=steveklabnik
Manish Goregaokar [Wed, 18 Mar 2015 09:09:43 +0000 (14:39 +0530)]
Rollup merge of #23455 - Ryman:trim_matches_doc, r=steveklabnik

9 years agoRollup merge of #23450 - alexcrichton:fix-sockaddr-storage, r=brson
Manish Goregaokar [Wed, 18 Mar 2015 09:09:34 +0000 (14:39 +0530)]
Rollup merge of #23450 - alexcrichton:fix-sockaddr-storage, r=brson

 The alignment field is actually a \"pointer sized\" type instead of always i64,
requiring that the size of the padding field is also calculated slightly
differently.

Closes #23425

9 years agoRollup merge of #23443 - meqif:ipv6addr-new-documentation-fix, r=steveklabnik
Manish Goregaokar [Wed, 18 Mar 2015 09:09:25 +0000 (14:39 +0530)]
Rollup merge of #23443 - meqif:ipv6addr-new-documentation-fix, r=steveklabnik

 Very minor fix: in `std::net::Ipv6Addr::new`, the documentation had an incomplete representation of the resulting address, missing the last two groups.

9 years agoRollup merge of #23392 - WiSaGaN:bugfix/fix_deprecate_link, r=Manishearth
Manish Goregaokar [Wed, 18 Mar 2015 09:09:16 +0000 (14:39 +0530)]
Rollup merge of #23392 - WiSaGaN:bugfix/fix_deprecate_link, r=Manishearth

 Since module `std::sync::mpsc` is stable now, fix the deprecated link `comm` with `sync::mpsc`.

9 years agoRollup merge of #23467 - andersk:loop-labeled-break-value, r=sanxiyn
Manish Goregaokar [Wed, 18 Mar 2015 09:09:07 +0000 (14:39 +0530)]
Rollup merge of #23467 - andersk:loop-labeled-break-value, r=sanxiyn

 Closes #23451.

9 years agoRollup merge of #23461 - alexcrichton:feat-char-at, r=aturon
Manish Goregaokar [Wed, 18 Mar 2015 09:08:56 +0000 (14:38 +0530)]
Rollup merge of #23461 - alexcrichton:feat-char-at, r=aturon

 This commit clarifies some of the unstable features in the `str` module by
moving them out of the blanket `core` and `collections` features.

The following methods were moved to the `str_char` feature which generally
encompasses decoding specific characters from a `str` and dealing with the
result. It is unclear if any of these methods need to be stabilized for 1.0 and
the most conservative route for now is to continue providing them but to leave
them as unstable under a more specific name.

* `is_char_boundary`
* `char_at`
* `char_range_at`
* `char_at_reverse`
* `char_range_at_reverse`
* `slice_shift_char`

The following methods were moved into the generic `unicode` feature as they are
specifically enabled by the `unicode` crate itself.

* `nfd_chars`
* `nfkd_chars`
* `nfc_chars`
* `graphemes`
* `grapheme_indices`
* `width`

9 years agoAddress huon's comments
Manish Goregaokar [Wed, 18 Mar 2015 12:36:10 +0000 (18:06 +0530)]
Address huon's comments

9 years agoClarify Expr
Manish Goregaokar [Tue, 17 Mar 2015 12:12:20 +0000 (17:42 +0530)]
Clarify Expr

9 years agoast: Document Item and ForeignItem
Manish Goregaokar [Mon, 16 Mar 2015 23:36:13 +0000 (05:06 +0530)]
ast: Document Item and ForeignItem

9 years agoast: Document Lit
Manish Goregaokar [Mon, 16 Mar 2015 23:02:58 +0000 (04:32 +0530)]
ast: Document Lit

9 years agoast: Document Pat and Block
Manish Goregaokar [Mon, 16 Mar 2015 22:49:27 +0000 (04:19 +0530)]
ast: Document Pat and Block

9 years agoast: Document paths and `where` clauses
Manish Goregaokar [Mon, 16 Mar 2015 22:32:29 +0000 (04:02 +0530)]
ast: Document paths and `where` clauses

9 years agoast: Document Expr_, UnOp, and BinOp
Manish Goregaokar [Mon, 16 Mar 2015 22:11:23 +0000 (03:41 +0530)]
ast: Document Expr_, UnOp, and BinOp

9 years agoAuto merge of #22838 - petrochenkov:bytelit, r=alexcrichton
bors [Wed, 18 Mar 2015 08:27:22 +0000 (08:27 +0000)]
Auto merge of #22838 - petrochenkov:bytelit, r=alexcrichton

This patch changes the type of byte string literals from `&[u8]` to `&[u8; N]`.
It also implements some necessary traits (`IntoBytes`, `Seek`, `Read`, `BufRead`) for fixed-size arrays (also related to #21725) and adds test for #17233, which seems to be resolved.

Fixes #18465
[breaking-change]

9 years agoRemove the newly introduced trait impls for fixed-size arrays and use &b"..."[.....
Vadim Petrochenkov [Wed, 18 Mar 2015 06:16:08 +0000 (09:16 +0300)]
Remove the newly introduced trait impls for fixed-size arrays and use &b"..."[..] instead.

9 years agoAuto merge of #23290 - nrc:pub_priv_mod, r=nikomatsakis
bors [Wed, 18 Mar 2015 05:55:19 +0000 (05:55 +0000)]
Auto merge of #23290 - nrc:pub_priv_mod, r=nikomatsakis

Closes #22261

r? @nikomatsakis

(+ a new test coming soon...)

9 years agoInfer type ! for a loop that can only break out of other loops
Anders Kaseorg [Wed, 18 Mar 2015 05:19:53 +0000 (01:19 -0400)]
Infer type ! for a loop that can only break out of other loops

Closes #23451.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoFix private module loophole in the 'private type in public item' check
Nick Cameron [Wed, 11 Mar 2015 21:44:56 +0000 (10:44 +1300)]
Fix private module loophole in the 'private type in public item' check

9 years agoAuto merge of #23452 - nikomatsakis:unsafety-subtyping, r=nrc
bors [Wed, 18 Mar 2015 03:22:12 +0000 (03:22 +0000)]
Auto merge of #23452 - nikomatsakis:unsafety-subtyping, r=nrc

Safe fns are no longer subtypes of unsafe fns, but you can coerce from one to the other.

This is a [breaking-change] in that impl fns must now be declared `unsafe` if the trait is declared `unsafe`. In some rare cases, the subtyping change may also direct affect you, but no such cases were encountered in practice.

Fixes #23449.

r? @nrc

9 years agostd: Tweak some unstable features of `str`
Alex Crichton [Tue, 10 Mar 2015 23:29:02 +0000 (16:29 -0700)]
std: Tweak some unstable features of `str`

This commit clarifies some of the unstable features in the `str` module by
moving them out of the blanket `core` and `collections` features.

The following methods were moved to the `str_char` feature which generally
encompasses decoding specific characters from a `str` and dealing with the
result. It is unclear if any of these methods need to be stabilized for 1.0 and
the most conservative route for now is to continue providing them but to leave
them as unstable under a more specific name.

* `is_char_boundary`
* `char_at`
* `char_range_at`
* `char_at_reverse`
* `char_range_at_reverse`
* `slice_shift_char`

The following methods were moved into the generic `unicode` feature as they are
specifically enabled by the `unicode` crate itself.

* `nfd_chars`
* `nfkd_chars`
* `nfc_chars`
* `graphemes`
* `grapheme_indices`
* `width`

9 years agoAuto merge of #23438 - nikomatsakis:issue-23435-default-methods-with-where-clauses...
bors [Wed, 18 Mar 2015 00:51:03 +0000 (00:51 +0000)]
Auto merge of #23438 - nikomatsakis:issue-23435-default-methods-with-where-clauses, r=nrc

Fixes #23435

9 years agoFix byte string literal patterns in match
Vadim Petrochenkov [Mon, 9 Mar 2015 19:19:11 +0000 (22:19 +0300)]
Fix byte string literal patterns in match

9 years agoAvoid metadata bloat by using trait FixedSizeArray
Vadim Petrochenkov [Fri, 27 Feb 2015 19:48:51 +0000 (22:48 +0300)]
Avoid metadata bloat by using trait FixedSizeArray

9 years agoAdd and fix more tests
Vadim Petrochenkov [Thu, 26 Feb 2015 15:00:41 +0000 (18:00 +0300)]
Add and fix more tests

9 years agoFixed-size byte string literals (RFC 339)
Vadim Petrochenkov [Thu, 26 Feb 2015 08:25:16 +0000 (11:25 +0300)]
Fixed-size byte string literals (RFC 339)

9 years agoMove unsafety out of the subtyping relation and into coercion.
Niko Matsakis [Tue, 17 Mar 2015 19:22:11 +0000 (15:22 -0400)]
Move unsafety out of the subtyping relation and into coercion.

9 years agoAuto merge of #23376 - eddyb:die-tydesc-die, r=nikomatsakis
bors [Tue, 17 Mar 2015 21:23:02 +0000 (21:23 +0000)]
Auto merge of #23376 - eddyb:die-tydesc-die, r=nikomatsakis

Final remnant of reflection is gone. Also, virtual `Trait` destructors are no longer tied to `Box`.
That means they can be used to drop any instance of the type (used in libarena to replace TyDesc).

This is [breaking-change] for direct users of intrinsics:
* use `intrinsics::type_name::<T>()` instead of `(*intrinsics::get_tydesc::<T>()).name`
* the only way to get the destructor is from a trait object's vtable (see libarena changes)

r? @pcwalton f? @dotdash

9 years agoFix documentation for StrExt::trim_matches
Kevin Butler [Tue, 17 Mar 2015 20:23:42 +0000 (20:23 +0000)]
Fix documentation for StrExt::trim_matches

9 years agoExtract out `mts` into `combine` using `tys_with_variance`
Niko Matsakis [Tue, 17 Mar 2015 14:23:13 +0000 (10:23 -0400)]
Extract out `mts` into `combine` using `tys_with_variance`

9 years agoReplace TyDesc and its uses with trait vtables and a type_name intrinsic.
Eduard Burtescu [Sun, 15 Mar 2015 02:01:57 +0000 (04:01 +0200)]
Replace TyDesc and its uses with trait vtables and a type_name intrinsic.

9 years agorustc_trans: use the drop glue of T instead of Box<T> in Trait's vtable, be it &Trait...
Eduard Burtescu [Sat, 14 Mar 2015 00:36:41 +0000 (02:36 +0200)]
rustc_trans: use the drop glue of T instead of Box<T> in Trait's vtable, be it &Trait or Box<Trait>.

9 years agolibc: Fix definition of sockaddr_storage on 32-bit linux
Alex Crichton [Tue, 17 Mar 2015 17:32:00 +0000 (10:32 -0700)]
libc: Fix definition of sockaddr_storage on 32-bit linux

The alignment field is actually a "pointer sized" type instead of always i64,
requiring that the size of the padding field is also calculated slightly
differently.

Closes #23425

9 years agoAuto merge of #23330 - alexcrichton:thread-sleep, r=aturon
bors [Tue, 17 Mar 2015 17:15:54 +0000 (17:15 +0000)]
Auto merge of #23330 - alexcrichton:thread-sleep, r=aturon

This function is the current replacement for `std::old_io::timer` which will
soon be deprecated. This function is unstable and has its own feature gate as it
does not yet have an RFC nor has it existed for very long.

9 years agostd: Implement `thread::sleep`
Alex Crichton [Fri, 13 Mar 2015 03:36:31 +0000 (20:36 -0700)]
std: Implement `thread::sleep`

This function is the current replacement for `std::old_io::timer` which will
soon be deprecated. This function is unstable and has its own feature gate as it
does not yet have an RFC nor has it existed for very long.

9 years agoFix IPv6 address format in documentation
Ricardo Martins [Tue, 17 Mar 2015 14:51:47 +0000 (14:51 +0000)]
Fix IPv6 address format in documentation

Very minor fix: in `std::net::Ipv6Addr::new`, the documentation had an incomplete representation of the resulting address, missing the last two groups.

9 years agoAuto merge of #23423 - nikomatsakis:issue-18737-trait-subtyping, r=nrc
bors [Tue, 17 Mar 2015 13:29:48 +0000 (13:29 +0000)]
Auto merge of #23423 - nikomatsakis:issue-18737-trait-subtyping, r=nrc

This upcast coercion currently never requires vtable changes. It should be generalized.

This is a [breaking-change] -- if you have an impl on an object type like `impl SomeTrait`, then this will no longer be applicable to object types like `SomeTrait+Send`. In the standard library, this primarily affected `Any`, and this PR adds impls for `Any+Send` as to keep the API the same in practice. An alternate workaround is to use UFCS form or standalone fns. For more details, see <https://github.com/rust-lang/rust/issues/18737#issuecomment-78450798>.

r? @nrc

9 years agoFix soundness hole when unsizing boxes.
Niko Matsakis [Mon, 16 Mar 2015 20:26:28 +0000 (16:26 -0400)]
Fix soundness hole when unsizing boxes.

9 years agoRemove subtyping for object types and replace with an *upcast* coercion.
Niko Matsakis [Tue, 17 Feb 2015 10:17:19 +0000 (05:17 -0500)]
Remove subtyping for object types and replace with an *upcast* coercion.
This upcast coercion currently preserves the vtable for the object, but
eventually it can be used to create a derived vtable. The upcast
coercion is not introduced into method dispatch; see comment on #18737
for information about why. Fixes #18737.

9 years agoOnly test predicates if this is a default method, as a simple optimization.
Niko Matsakis [Tue, 17 Mar 2015 11:36:42 +0000 (07:36 -0400)]
Only test predicates if this is a default method, as a simple optimization.

9 years agoAuto merge of #23436 - Manishearth:rollup, r=Manishearth
bors [Tue, 17 Mar 2015 10:54:50 +0000 (10:54 +0000)]
Auto merge of #23436 - Manishearth:rollup, r=Manishearth

r? @Manishearth

9 years agoRe-bork whitespace for text file (fixup #23385)
Manish Goregaokar [Tue, 17 Mar 2015 10:30:39 +0000 (16:00 +0530)]
Re-bork whitespace for text file (fixup #23385)

9 years agoCheck that predicates hold before emitting an entry for the vtable.
Niko Matsakis [Tue, 17 Mar 2015 10:24:11 +0000 (06:24 -0400)]
Check that predicates hold before emitting an entry for the vtable.
Fixes #23435.

9 years agoRollup merge of #23432 - mzabaluev:io-into-inner-doc, r=alexcrichton
Manish Goregaokar [Tue, 17 Mar 2015 09:51:56 +0000 (15:21 +0530)]
Rollup merge of #23432 - mzabaluev:io-into-inner-doc, r=alexcrichton

 Resolves #23386.

9 years agoRollup merge of #23385 - tamird:cleanup-whitespace, r=alexcrichton
Manish Goregaokar [Tue, 17 Mar 2015 09:51:22 +0000 (15:21 +0530)]
Rollup merge of #23385 - tamird:cleanup-whitespace, r=alexcrichton

 r? @alexcrichton

Conflicts:
src/test/run-pass/test-fn-signature-verification-for-explicit-return-type.rs

9 years agoRollup merge of #23329 - jbcrail:rm-syntax-highlight, r=sanxiyn
Manish Goregaokar [Tue, 17 Mar 2015 09:50:27 +0000 (15:20 +0530)]
Rollup merge of #23329 - jbcrail:rm-syntax-highlight, r=sanxiyn

 As suggested by @steveklabnik in #23254, I removed the redundant Rust syntax highlighting from the documentation.

9 years agoRollup merge of #23427 - tshepang:dur-becomes-duration, r=steveklabnik
Manish Goregaokar [Tue, 17 Mar 2015 09:50:19 +0000 (15:20 +0530)]
Rollup merge of #23427 - tshepang:dur-becomes-duration, r=steveklabnik

 Also:

- italize the binding name
- complete a sentence

9 years agoRollup merge of #23417 - padenot:patch-1, r=steveklabnik
Manish Goregaokar [Tue, 17 Mar 2015 09:50:11 +0000 (15:20 +0530)]
Rollup merge of #23417 - padenot:patch-1, r=steveklabnik

 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

9 years agoRollup merge of #23415 - alexcrichton:stabilize-flush, r=aturon
Manish Goregaokar [Tue, 17 Mar 2015 09:50:03 +0000 (15:20 +0530)]
Rollup merge of #23415 - alexcrichton:stabilize-flush, r=aturon

 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

9 years agoRollup merge of #23409 - GBGamer:patch-2, r=alexcrichton
Manish Goregaokar [Tue, 17 Mar 2015 09:49:57 +0000 (15:19 +0530)]
Rollup merge of #23409 - GBGamer:patch-2, r=alexcrichton

 To the correct MAP_NORESERVE. Every other instance is known as MAP_NORESERVE, so this is just a basic typo.

I really doubt this will break anybody's but my own code.

[breaking-change]

9 years agoRollup merge of #23402 - tamird:needstest-tests, r=jakub-
Manish Goregaokar [Tue, 17 Mar 2015 09:49:51 +0000 (15:19 +0530)]
Rollup merge of #23402 - tamird:needstest-tests, r=jakub-

 @alexcrichton @jakub-

9 years agoRollup merge of #23400 - nrc:pub_use, r=eddyb
Manish Goregaokar [Tue, 17 Mar 2015 09:49:45 +0000 (15:19 +0530)]
Rollup merge of #23400 - nrc:pub_use, r=eddyb

 r? @eddyb

9 years agoRollup merge of #23399 - tbu-:pr_libflate_error, r=huonw
Manish Goregaokar [Tue, 17 Mar 2015 09:49:38 +0000 (15:19 +0530)]
Rollup merge of #23399 - tbu-:pr_libflate_error, r=huonw

 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`.
The type implements a destructor so you can't destructure it.

9 years agoRefactor the emit_vtable_methods code to be a bit cleaner in its use of
Niko Matsakis [Tue, 17 Mar 2015 09:18:01 +0000 (05:18 -0400)]
Refactor the emit_vtable_methods code to be a bit cleaner in its use of
iterators.

9 years agoAuto merge of #23429 - rprichard:fix-linux-build, r=alexcrichton
bors [Tue, 17 Mar 2015 05:57:14 +0000 (05:57 +0000)]
Auto merge of #23429 - rprichard:fix-linux-build, r=alexcrichton

The RUST_TARGET_STAGE_N rule uses LLVM_LIBDIR_RUSTFLAGS_<target-triple>,
which expands to -L "$(llvm-config --libdir)" when the target-triple is
also a host-triple. Rather than expand to -L "" if llvm-config has not yet
been built, add a dependency on the target llvm-config.

When the target-triple is not a host-triple, the new LLVM_CONFIG_$(2)
dependency should expand to nothing.

r? alexcrichton

9 years agostd::io::buffered: Don't use 'flush' in documentation of into_inner
Mikhail Zabaluev [Tue, 17 Mar 2015 04:17:52 +0000 (06:17 +0200)]
std::io::buffered: Don't use 'flush' in documentation of into_inner

The word 'flush' may be misinterpreted as if `flush` is called on the
underlying writer, which is not the case.

9 years agoFix the Linux nightly build by adding a LLVM_CONFIG_<target-triple> dep.
Ryan Prichard [Tue, 17 Mar 2015 04:13:36 +0000 (21:13 -0700)]
Fix the Linux nightly build by adding a LLVM_CONFIG_<target-triple> dep.

The RUST_TARGET_STAGE_N rule uses LLVM_LIBDIR_RUSTFLAGS_<target-triple>,
which expands to -L "$(llvm-config --libdir)" when the target-triple is
also a host-triple. Rather than expand to -L "" if llvm-config has not yet
been built, add a dependency on the target llvm-config.

When the target-triple is not a host-triple, the new LLVM_CONFIG_$(2)
dependency should expand to nothing.

9 years agoAuto merge of #23104 - japaric:inherent, r=nikomatsakis
bors [Tue, 17 Mar 2015 03:23:50 +0000 (03:23 +0000)]
Auto merge of #23104 - japaric:inherent, r=nikomatsakis

- Allow inherent implementations on `char`, `str`, `[T]`, `*const T`, `*mut T` and all the numeric primitives.
- copy `unicode::char::CharExt` methods into `impl char`
- remove `unicode::char::CharExt`, its re-export `std::char::CharExt` and `CharExt` from the prelude
- copy `collections::str::StrExt` methods into `impl str`
- remove `collections::str::StrExt` its re-export `std::str::StrExt`, and `StrExt` from the prelude
- copy `collections::slice::SliceExt` methods into `impl<T> [T]`
- remove `collections::slice::SliceExt` its re-export `std::slice::SliceExt`, and `SliceExt` from the prelude
- copy `core::ptr::PtrExt` methods into `impl<T> *const T`
- remove `core::ptr::PtrExt` its re-export `std::ptr::PtrExt`, and `PtrExt` from the prelude
- copy `core::ptr::PtrExt` and `core::ptr::MutPtrExt` methods into `impl<T> *mut T`
- remove `core::ptr::MutPtrExt` its re-export `std::ptr::MutPtrExt`, and `MutPtrExt` from the prelude
- copy `core::num::Int` and `core::num::SignedInt` methods into `impl i{8,16,32,64,size}`
- copy `core::num::Int` and `core::num::UnsignedInt` methods into `impl u{8,16,32,64,size}`
- remove `core::num::UnsignedInt` and its re-export `std::num::UnsignedInt`
- move `collections` tests into its own crate: `collectionstest`
- copy `core::num::Float` methods into `impl f{32,64}`

Because this PR removes several traits, this is a [breaking-change], however functionality remains unchanged and breakage due to unresolved imports should be minimal. If you encounter an error due to an unresolved import, simply remove the import:

``` diff
  fn main() {
-     use std::num::UnsignedInt;  //~ error: unresolved import `std::num::UnsignedInt`.
-
      println!("{}", 8_usize.is_power_of_two());
  }
```

---

cc  #16862
[preview docs](http://japaric.github.io/inherent/std/index.html)
[unicode::char](http://japaric.github.io/inherent/unicode/primitive.char.html)
[collections::str](http://japaric.github.io/inherent/collections/primitive.str.html)
[std::f32](http://japaric.github.io/inherent/std/primitive.f32.html)

9 years agobetter document the hacks required to test libcollections
Jorge Aparicio [Sat, 14 Mar 2015 00:44:02 +0000 (19:44 -0500)]
better document the hacks required to test libcollections

9 years agoimpl f{32,64}
Jorge Aparicio [Sat, 14 Mar 2015 00:13:35 +0000 (19:13 -0500)]
impl f{32,64}

9 years agojoin lines in makefile
Jorge Aparicio [Fri, 13 Mar 2015 23:32:42 +0000 (18:32 -0500)]
join lines in makefile

9 years agofix after rebase
Jorge Aparicio [Thu, 12 Mar 2015 05:41:10 +0000 (00:41 -0500)]
fix after rebase

9 years agopreemptively fix windows compilation errors
Jorge Aparicio [Thu, 12 Mar 2015 05:25:33 +0000 (00:25 -0500)]
preemptively fix windows compilation errors

9 years agomove some tests back to libcollections
Jorge Aparicio [Thu, 12 Mar 2015 00:44:02 +0000 (19:44 -0500)]
move some tests back to libcollections

9 years agoenable enum_set tests
Jorge Aparicio [Thu, 12 Mar 2015 00:28:58 +0000 (19:28 -0500)]
enable enum_set tests

9 years agoremove imports
Jorge Aparicio [Wed, 11 Mar 2015 16:42:57 +0000 (11:42 -0500)]
remove imports

9 years agoextract libcollections tests into libcollectionstest
Jorge Aparicio [Wed, 11 Mar 2015 04:58:16 +0000 (23:58 -0500)]
extract libcollections tests into libcollectionstest

9 years agoimpl {i,u}{8,16,32,64,size}
Jorge Aparicio [Wed, 11 Mar 2015 04:13:40 +0000 (23:13 -0500)]
impl {i,u}{8,16,32,64,size}

9 years agoimpl<T> *const T, impl<T> *mut T
Jorge Aparicio [Wed, 11 Mar 2015 04:13:36 +0000 (23:13 -0500)]
impl<T> *const T, impl<T> *mut T

9 years agoimpl<T> [T]
Jorge Aparicio [Wed, 11 Mar 2015 04:13:29 +0000 (23:13 -0500)]
impl<T> [T]

9 years agoimpl str
Jorge Aparicio [Wed, 11 Mar 2015 04:13:24 +0000 (23:13 -0500)]
impl str

9 years agoimpl char
Jorge Aparicio [Wed, 11 Mar 2015 04:13:16 +0000 (23:13 -0500)]
impl char

9 years agoallow inherent implementations on primitives
Jorge Aparicio [Wed, 11 Mar 2015 04:12:55 +0000 (23:12 -0500)]
allow inherent implementations on primitives

9 years agoAuto merge of #23352 - alexcrichton:stabilize-net, r=aturon
bors [Tue, 17 Mar 2015 00:50:26 +0000 (00:50 +0000)]
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]

9 years agoAuto merge of #23331 - eddyb:attr-lookahead, r=nikomatsakis
bors [Mon, 16 Mar 2015 22:13:52 +0000 (22:13 +0000)]
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

9 years agothread: 'dur' -> 'duration'
Tshepang Lekhonkhobe [Mon, 16 Mar 2015 21:23:39 +0000 (23:23 +0200)]
thread: 'dur' -> 'duration'

Also:

- italize the binding name
- complete a sentence

9 years agoAuto merge of #23342 - apasel422:23327, r=alexcrichton
bors [Mon, 16 Mar 2015 19:35:42 +0000 (19:35 +0000)]
Auto merge of #23342 - apasel422:23327, r=alexcrichton

closes #23327

9 years agoFix 404 to crates.io's doc on integrating with a native toolchain
Paul ADENOT [Mon, 16 Mar 2015 18:56:14 +0000 (19:56 +0100)]
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

9 years agostd: Stabilize the Write::flush method
Alex Crichton [Mon, 16 Mar 2015 17:56:08 +0000 (10:56 -0700)]
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

9 years agoImprove error handling in libflate
Tobias Bucher [Sun, 15 Mar 2015 20:35:48 +0000 (21:35 +0100)]
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`.

9 years agoAuto merge of #23347 - aturon:stab-misc, r=alexcrichton
bors [Mon, 16 Mar 2015 17:02:11 +0000 (17:02 +0000)]
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

9 years agoRegression test for #13077
Tamir Duberstein [Sun, 15 Mar 2015 20:30:37 +0000 (13:30 -0700)]
Regression test for #13077

Closes #13077.

9 years agoRegression test for #16922
Tamir Duberstein [Sun, 15 Mar 2015 20:30:37 +0000 (13:30 -0700)]
Regression test for #16922

Closes #16922.

9 years agoRegression test for #20714
Tamir Duberstein [Sun, 15 Mar 2015 20:30:37 +0000 (13:30 -0700)]
Regression test for #20714

Closes #20714.

9 years agoRegression test for #20396
Tamir Duberstein [Sun, 15 Mar 2015 20:30:37 +0000 (13:30 -0700)]
Regression test for #20396

Closes #20396.

9 years agoRegression test for #20261
Tamir Duberstein [Sun, 15 Mar 2015 20:30:37 +0000 (13:30 -0700)]
Regression test for #20261

Closes #20261.

9 years agoConsistent spacing
Tamir Duberstein [Sun, 15 Mar 2015 20:30:04 +0000 (13:30 -0700)]
Consistent spacing

9 years agoRegression test for #20225
Tamir Duberstein [Sun, 15 Mar 2015 20:25:46 +0000 (13:25 -0700)]
Regression test for #20225

Closes #20225.

9 years agoRegression test for #19982
Tamir Duberstein [Sun, 15 Mar 2015 19:44:37 +0000 (12:44 -0700)]
Regression test for #19982

Closes #17165, #19982.

9 years agoRegression test for #18919
Tamir Duberstein [Sun, 15 Mar 2015 20:14:15 +0000 (13:14 -0700)]
Regression test for #18919

Closes #18919.

9 years agoRegression test for #13407
Tamir Duberstein [Sun, 15 Mar 2015 19:05:10 +0000 (12:05 -0700)]
Regression test for #13407

Closes #13407.

9 years agoRegression test for #11820
Tamir Duberstein [Sun, 15 Mar 2015 18:57:33 +0000 (11:57 -0700)]
Regression test for #11820

Closes #11820.

9 years agoRegression test for #9951
Tamir Duberstein [Sun, 15 Mar 2015 18:46:51 +0000 (11:46 -0700)]
Regression test for #9951

Closes #9951.

9 years agoAuto merge of #23395 - bluss:tuple-macro, r=alexcrichton
bors [Mon, 16 Mar 2015 14:29:13 +0000 (14:29 +0000)]
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.

9 years agodocument undefined collection behavior with interior mutability
Andrew Paseltiner [Fri, 13 Mar 2015 17:47:55 +0000 (13:47 -0400)]
document undefined collection behavior with interior mutability

closes #23327

9 years agoAuto merge of #23404 - richo:ppc-configure, r=sanxiyn
bors [Mon, 16 Mar 2015 11:55:39 +0000 (11:55 +0000)]
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.