Commit Graph

50667 Commits

Author SHA1 Message Date
Corey Farwell
d9dba7699f Prefer 'associated function' over 'static method' in msg.
TRPL seems to refer to 'static functions' as 'associated functions'.
This terminology should be used consistently.
2016-03-09 21:29:39 -08:00
bors
0ef8d42605 Auto merge of #31832 - mmatyas:update_libc_16f1c19, r=alexcrichton
This fixes the `aarch64-linux-android` build (#31595).
2016-02-24 13:32:24 +00:00
bors
360a165ed3 Auto merge of #31828 - frewsxcv:sepseq-associated-function, r=alexcrichton
None
2016-02-24 11:29:31 +00:00
bors
df91cb9af6 Auto merge of #31782 - pitdicker:clean_out_windows_c, r=alexcrichton
I am not entirely sure I have got everything right, but if it compiles it is ok probably...
I tested it with msvc x86_64 and gnu.

Somehow a lot of `EXCEPTION-*` constants are dead code when running test, no idea why.
I have put `#![cfg_attr(test, allow(dead_code))]` at the top for this.
2016-02-24 07:21:44 +00:00
bors
304c790fc2 Auto merge of #31778 - aturon:snapshot, r=alexcrichton
r? @alexcrichton
2016-02-24 04:42:09 +00:00
bors
a4574bd4a5 Auto merge of #31855 - alexcrichton:fix-tidy, r=nikomatsakis
The MinGW-based Python implementations would automatically do this, but if we
want to use Python from the official downloads our usage of `/` instead of `\`
can wreak havoc. In a few select locations just use `os.path.normpath` do do the
conversions properly for us.
2016-02-24 01:55:45 +00:00
Alex Crichton
622ec5d8d0 mk: Tweak tidy script to work on Windows python
The MinGW-based Python implementations would automatically do this, but if we
want to use Python from the official downloads our usage of `/` instead of `\`
can wreak havoc. In a few select locations just use `os.path.normpath` do do the
conversions properly for us.
2016-02-23 17:52:26 -08:00
bors
281f9d868f Auto merge of #30614 - arcnmx:cstr-bytes, r=alexcrichton
I'm a bit iffy on the return type, but `Result` would also be a bit weird... The two error cases are `Unterminated` and `InteriorNul(usize)`.

I considered `from_chars(&[c_char])` but this meshes better with `as_bytes_with_nul()` and Rust code in general.

Should there also be a corresponding unsafe `from_bytes_unchecked` variant?
2016-02-23 20:08:54 +00:00
bors
43ddfbdfb2 Auto merge of #31751 - gkoz:os_str_path_cmp, r=aturon 2016-02-23 17:21:18 +00:00
arcnmx
71f29cd837 CStr::from_bytes_with_nul tests 2016-02-23 11:52:19 -05:00
Aaron Turon
a92ee0f664 Register new snapshots 2016-02-23 07:31:16 -08:00
arcnmx
9414c4ea18 Link cstr from_bytes to tracking issue 2016-02-23 10:12:39 -05:00
bors
0de3cace0a Auto merge of #31825 - ollie27:win_lfs, r=alexcrichton
`ReadFile` and `WriteFile` take a DWORD (u32) for the length argument
which was erroneously cast from a usize causing truncation. This meant
methods like `write_all` and `read_exact` would unexpectedly fail if
given a buffer 4 GiB or larger.

We can instead just ask for `u32::MAX` bytes if the given buffer is too
big.
2016-02-23 14:09:35 +00:00
bors
6ffd7cd166 Auto merge of #31447 - nagisa:mir-cfgsimplify-bitvec, r=nikomatsakis
BitVector is more space efficient.
2016-02-23 11:12:08 +00:00
Simonas Kazlauskas
b92e2437f5 [MIR] Change SimplifyCfg pass to use bitvec
BitVector is much more space efficient.
2016-02-23 11:43:52 +02:00
bors
32633167f9 Auto merge of #31822 - petrochenkov:derive, r=alexcrichton
Fixes https://github.com/rust-lang/rust/issues/29548
2016-02-23 08:07:03 +00:00
arcnmx
16f218b600 Rename CStr::from_bytes to from_bytes_with_nul 2016-02-23 01:37:53 -05:00
arcnmx
a70ae2ffb9 CStr::from_bytes 2016-02-23 01:37:53 -05:00
bors
be7196a793 Auto merge of #31814 - petevine:master, r=alexcrichton
The `vfp2` option was a leftover from `armv6` compatibility features of the original armhf target.
Gcc defaults to `vfp3`on `armv7` hard-float linux systems so we should make it the default for rustc too.
2016-02-23 05:17:08 +00:00
Corey Farwell
bc2f5e2612 Use associated functions for libsyntax SepSeq constructors. 2016-02-22 23:24:42 -05:00
Oliver Middleton
b340f25352 Fix reading/writing 4 GiB or larger files on Windows 64-bit
`ReadFile` and `WriteFile` take a DWORD (u32) for the length argument
which was erroneously cast from a usize causing truncation. This meant
methods like `write_all` and `read_exact` would unexpectedly fail if
given a buffer 4 GiB or larger.

We can instead just ask for `u32::MAX` bytes if the given buffer is too
big.
2016-02-23 00:51:18 +00:00
Vadim Petrochenkov
a3f3c4a0a0 Some refactoring in deriving/debug.rs 2016-02-23 03:01:24 +03:00
bors
37c6f2881c Auto merge of #31715 - mitaa:rdoc-index-crate, r=alexcrichton
This allows to search for crates in documentation and simplifies the json serialization of the search-index.

fixes #14077
2016-02-22 23:13:08 +00:00
bors
c8fc4817dc Auto merge of #31704 - tbu-:pr_vec_into_iter_clone, r=aturon 2016-02-22 21:16:36 +00:00
bors
d3929b2c8a Auto merge of #30969 - Amanieu:extended_atomic_cmpxchg, r=alexcrichton
This is an implementation of rust-lang/rfcs#1443.
2016-02-22 19:10:13 +00:00
mitaa
81f673d3bc Simplify search-index serialization 2016-02-22 20:07:09 +01:00
Amanieu d'Antras
4fdbc2f1cb Add a test to make sure trans doesn't choke on any of the intrinsics 2016-02-22 18:39:13 +00:00
Vadim Petrochenkov
4e8e607d84 Fix #[derive] for empty structs with braces 2016-02-22 21:24:32 +03:00
bors
d1f422ec28 Auto merge of #31819 - miqid:doc, r=steveklabnik
Hello.

I came across some minor spelling mistakes while going through the documentation for the `Iterator` trait. Also includes a suggested styling fix.

r? @steveklabnik
2016-02-22 16:00:56 +00:00
Mátyás Mustoha
15f387d2cd Update libc to 16f1c19 2016-02-22 16:54:58 +01:00
Michael Huynh
4d2a81617c Correct Iterator trait documentation
Fixes several minor spelling errors and includes a suggested style fix.
2016-02-22 22:02:40 +08:00
petevine
8ddd86a2ab Eradicate last vestiges of armv6 2016-02-22 08:25:29 +01:00
bors
98a59cf57e Auto merge of #31813 - nbaksalyar:solaris-fix, r=sanxiyn
A quick fix for several issues that break a Solaris/Illumos build.
Also, adds a CPU target specification (as seen in a patch for OpenBSD #31727).
2016-02-22 07:08:25 +00:00
bors
e628398f34 Auto merge of #31811 - alexcrichton:clean-deps, r=sanxiyn
The standard library doesn't depend on rustc_bitflags, so move it to explicit
dependencies on all other crates. Additionally, the arena/fmt_macros deps could
be dropped from libsyntax.
2016-02-22 05:20:39 +00:00
bors
19437bd452 Auto merge of #31805 - cuviper:android-lfs, r=alexcrichton
Android should use 64-bit LFS symbols for `lseek` and `ftruncate`, lest
those offset parameters suffer a lossy cast down to a 32-bit `off_t`.

Unlike GNU/Linux, Android's `stat`, `dirent`, and related functions are
always 64-bit LFS compatible, and `open` already implies `O_LARGEFILE`,
so all those don't need to follow Linux.  It might be nice to unify them
anyway, but those other LFS symbols aren't present in API 18 bionic.

r? @alexcrichton
2016-02-22 03:08:39 +00:00
bors
24bb648d84 Auto merge of #31806 - gokhanettin:to_lowercase-doc, r=japaric
`to_lowercase` example mistakenly calls `to_uppercase` function. This fixes the example.
2016-02-22 01:07:07 +00:00
bors
c92e910c11 Auto merge of #31810 - gandro:netbsd-fix-stat, r=alexcrichton
Some struct members have a slighty different name on NetBSD. This has been fixed in the libc crate, but not in libstd, breaking the NetBSD build. Related C struct definition: http://nxr.netbsd.org/xref/src/sys/sys/stat.h?r=1.68#59

This also removes the broken `st_spare()` from MetadataExt, since it is private field reserved for future use.

@dhuseby In case this conflicts with any of your pending patches, feel free to intervene - I'm happy to withdraw this PR.

r? @alexcrichton
2016-02-21 23:08:24 +00:00
Nikita Baksalyar
e77c79e96d
Fix broken Solaris build 2016-02-22 01:58:49 +03:00
Paul Dicker
98fa5ac342 RaiseException is used by everything except x86 gnu 2016-02-21 20:41:49 +01:00
bors
f93a62b68d Auto merge of #31792 - Zoxc:sysroot, r=alexcrichton
With these changes you can build a freestanding sysroot without using floating points using a Cargo.toml and copying the `deps` folder cargo outputs.
```
[package]
name = "sysroot"
version = "0.1.0"

[lib]
path = "lib.rs"
crate-type = ["rlib"]

[dependencies.core]
path = "../vendor/rust/src/src/libcore"
features = ["disable_float"]

[dependencies]
collections = { path = "../vendor/rust/src/src/libcollections" }
```
2016-02-21 19:24:02 +00:00
Alex Crichton
95761417c3 rustbuild: Sync some Cargo.toml/lib.rs dependencies
The standard library doesn't depend on rustc_bitflags, so move it to explicit
dependencies on all other crates. Additionally, the arena/fmt_macros deps could
be dropped from libsyntax.
2016-02-21 09:49:13 -08:00
Paul Dicker
94db864965 Fixes for 32-bit 2016-02-21 18:15:41 +01:00
Sebastian Wicki
028106c434 Fix struct stat usage on NetBSD
Some struct members have a slighty different name on NetBSD. This has been
fixed in the libc crate, but not in libstd.

This also removes `st_spare` from MetadataExt, since it is private field
reserved for future use.
2016-02-21 16:35:37 +01:00
John Kåre Alsaker
8ade080412 Fix liballoc dependencies 2016-02-21 15:32:43 +01:00
bors
0f62d219fb Auto merge of #31802 - alexcrichton:fix-dist-rustbuild, r=japaric
Forgot to add a few directories to `make dist` so `--enable-rustbuild` can
continue to work.

Closes #31801
2016-02-21 13:17:37 +00:00
Gökhan Karabulut
84003cda1f Fix to_lowercase example 2016-02-21 13:19:50 +02:00
bors
80122b2248 Auto merge of #31799 - cshaffer:book-fixes, r=steveklabnik
I noticed a few PRs fixing some of the words around the code refactor in the guessing game tutorial, this should be all that's left.
2016-02-21 11:15:13 +00:00
bors
0c72f697eb Auto merge of #31785 - sanxiyn:gitmodules, r=alexcrichton
libc moved from rust-lang-nursery to rust-lang.
2016-02-21 09:16:30 +00:00
Josh Stone
7e962166df std: Use Android LFS off64_t, ftruncate64, and lseek64
Android should use 64-bit LFS symbols for `lseek` and `ftruncate`, lest
those offset parameters suffer a lossy cast down to a 32-bit `off_t`.

Unlike GNU/Linux, Android's `stat`, `dirent`, and related functions are
always 64-bit LFS compatible, and `open` already implies `O_LARGEFILE`,
so all those don't need to follow Linux.  It might be nice to unify them
anyway, but those other LFS symbols aren't present in API 18 bionic.

r? @alexcrichton
2016-02-21 01:04:14 -08:00
bors
257fa0f479 Auto merge of #31791 - alexcrichton:llvmup3, r=dotdash
Looks like they picked up a bunch of fixes, one of which is even quite relevant
to us!

Closes #31505
2016-02-21 04:59:50 +00:00