Commit Graph

65613 Commits

Author SHA1 Message Date
bors
3610a70ce4 Auto merge of #42972 - GuillaumeGomez:fix-toggles-rustdoc, r=QuietMisdreavus
Toggle wrappers are now generated correctly

Fixes #42674.
2017-07-05 13:56:32 +00:00
bors
692b572236 Auto merge of #43050 - stjepang:doc-vec-fix-parens, r=frewsxcv
Minor fix in docs for Vec

Added missing parentheses after `mem::size_of::<T>`.
2017-07-05 02:04:07 +00:00
bors
1421bedd51 Auto merge of #42732 - cengizIO:master, r=Mark-Simulacrum
Add pager support for `rustc --explain EXXXX`

Hello!

Fixes #32665.

Thanks!

**EDIT:** _I've limited access to a Windows machine so this is taking longer than I've anticipated_. 🐢

cc @alexcrichton @nikomatsakis @Mark-Simulacrum @retep998 @ollie27 @afiune
2017-07-04 23:50:11 +00:00
bors
2fbba5bdba Auto merge of #43051 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 8 pull requests

- Successful merges: #42227, #42836, #42975, #42994, #43041, #43042, #43043, #43045
- Failed merges:
2017-07-04 15:58:24 +00:00
Mark Simulacrum
9cca462ca5 Rollup merge of #43045 - PlasmaPower:patch-1, r=Mark-Simulacrum
README: note how to enable debugging for rustc

I got stuck on this for a bit, looking for a debug option in `./x.py build --help`.

Diff without newline changes:

Before:

> Various other options are also supported, and are documented in the config file.

After:

> Various other options, such as enabling debug information, are also supported, and are documented in the config file.
2017-07-04 07:41:45 -06:00
Mark Simulacrum
f80e58af89 Rollup merge of #43043 - sfackler:reverse-stability, r=Mark-Simulacrum
Add a stability marker for core::cmp::Reverse.0

Closes #43027
2017-07-04 07:41:44 -06:00
Mark Simulacrum
edbfbbfdd8 Rollup merge of #43042 - Mark-Simulacrum:rustbuild-cleanup, r=alexcrichton
Various minor cleanups to rustbuild

This is work I did before the migration to the new rustbuild. I'd prefer to land this first, before my other PR, to make the diff a little clearer.

r? @alexcrichton
2017-07-04 07:41:43 -06:00
Mark Simulacrum
5f732eba7a Rollup merge of #43041 - andersk:dedup_by, r=alexcrichton
Document unintuitive argument order for Vec::dedup_by relation

When trying to use `dedup_by` to merge some auxiliary information from removed elements into kept elements, I was surprised to observe that `vec.dedup_by(same_bucket)` calls `same_bucket(a, b)` where `b` appears before `a` in the vector, and discards `a` when true is returned.  This argument order is probably a bug, but since it has already been stabilized, I guess we should document it as a feature and move on.

(`Vec::dedup` also uses `==` with this unexpected argument order, but I figure that’s not important since `==` is expected to be symmetric with no side effects.)
2017-07-04 07:41:42 -06:00
Mark Simulacrum
2fdb9c978d Rollup merge of #42994 - stepancheg:ignore-iml, r=aturon
Ignore *.iml files

... which are IntelliJ IDEA module files. (`.idea` is IDEA project files.)
2017-07-04 07:41:41 -06:00
Mark Simulacrum
8abc58e6b9 Rollup merge of #42975 - ids1024:symlink2, r=aturon
redox: symlink and readlink
2017-07-04 07:41:40 -06:00
Mark Simulacrum
93e46a95a4 Rollup merge of #42836 - rthomas:29355-debug, r=GuillaumeGomez
Update docs for Debug* structs. #29355

This adds docs for the Debug* structs as well as examples from the
Formatter::debug_* methods, so that a user knows how to construct them.

I added these examples as the builders module is not public and hence
the debug_*_new() functions are not available to a user.

r? @steveklabnik
2017-07-04 07:41:39 -06:00
Mark Simulacrum
32cbbffea2 Rollup merge of #42227 - ollie27:into_to_from, r=aturon
Convert Intos to Froms.

This is a resubmission of #42129 without `impl<T> From<Vec<T>> for Box<[T]>`.
2017-07-04 07:41:33 -06:00
Mark Simulacrum
1654a2f5ac Use build.build instead of build.config.build 2017-07-04 07:39:47 -06:00
Mark Simulacrum
5809a7d0b7 Move targets, hosts, and build triple into Build. 2017-07-04 07:31:56 -06:00
Mark Simulacrum
39cf1da81c Store verbosity on Build
Prevents accidental mistakes in not using the right verbosity by going
to only config or flags.
2017-07-04 07:31:56 -06:00
Mark Simulacrum
4dc8fe9083 Store positive instead of negative fail_fast.
This makes later negation much easier to interpret.
2017-07-04 07:31:56 -06:00
Mark Simulacrum
712bd0d841 Remove src_is_git, instead call method on rust_info directly. 2017-07-04 07:31:56 -06:00
Mark Simulacrum
2cc5b084a0 Clarify meaning of Build.cargo, Build.rustc.
Rename Build.{cargo, rustc} to {initial_cargo, initial_rustc}.
2017-07-04 07:31:56 -06:00
Mark Simulacrum
743af95d4b Update a few comments. 2017-07-04 07:31:56 -06:00
Mark Simulacrum
6766abbfa9 Clippy lints 2017-07-04 07:31:55 -06:00
Mark Simulacrum
802b6db004 Cleanup dist 2017-07-04 07:31:55 -06:00
Mark Simulacrum
c6ece966ac Cleanup utils 2017-07-04 07:31:55 -06:00
Mark Simulacrum
388fca81f6 Cleanup compile.rs. 2017-07-04 07:31:55 -06:00
Mark Simulacrum
5b44cbc39f Cleanups to check code. 2017-07-04 07:31:55 -06:00
Mark Simulacrum
d3bf6e562e Remove 'static lifetimes from channels. 2017-07-04 07:31:55 -06:00
Mark Simulacrum
7ed4ee272e Clean up and restructure sanity checking. 2017-07-04 07:31:55 -06:00
Mark Simulacrum
01e83a362c Don't allocate args in order to run find. 2017-07-04 07:31:55 -06:00
bors
de7f061768 Auto merge of #43025 - est31:nan_cross_platform, r=BurntSushi
Make sNaN removal code tolerate different sNaN encodings

IEEE 754-1985 specifies the encoding of NaN floating point numbers,
but while it mentions that NaNs can be subdivided into signaling
and quiet ones, it doesn't fix the encoding of signaling NaNs in binary
formats. This led to different implementations (CPUs) having different
encodings. IEEE 754-2008 finally specified the encoding of signaling NaNs
but some architectures are compatible with it, while others aren't.
Certain MIPS and PA-RISC CPUs have different encodings for signaling
NaNs.

In order to have the float <-> binary cast feature of the std library be
portable to them, we don't mask any quiet NaNs like we did before (only
being compliant to IEEE 754-2008 and nothing else), but instead we
simply pass a known good NaN instead.

Note that in the code removed there was a bug; the 64 bit mask for quiet
NaNs should have been `0x0008000000000000` instead of the specified
`0x0001000000000000`.
2017-07-04 13:21:20 +00:00
Stjepan Glavina
558ce91e09 Minor fix in docs for Vec 2017-07-04 15:14:08 +02:00
Masaki Hara
728d26c886
Add a test for unsized tuple impls. 2017-07-04 21:26:46 +09:00
bors
7a75d2bec4 Auto merge of #43012 - scottmcm:delete-range-step-by, r=alexcrichton
Delete deprecated & unstable range-specific `step_by`

Using the new one is annoying while this one exists, since the inherent method hides the one on iterator.

Tracking issue: #27741
Replacement: #41439
Deprecation: #42310 for 1.19
Fixes #41477
2017-07-04 04:49:59 +00:00
Lee Bousfield
857d9dbaba
README: note how to enable debugging for rustc 2017-07-03 22:06:43 -04:00
bors
ed1ef191b5 Auto merge of #42993 - stepancheg:editorconfig, r=brson
Add .editorconfig to src/rustllvm

... which uses 2 space indent instead of common 4 spaces.
2017-07-04 01:08:15 +00:00
Steven Fackler
dcd7c5f4e8 Add a stability marker for core::cmp::Reverse.0
Closes #43027
2017-07-03 13:46:37 -10:00
Anders Kaseorg
d68c3ab17b Document unintuitive argument order for Vec::dedup_by relation
When trying to use dedup_by to merge some auxiliary information from
removed elements into kept elements, I was surprised to observe that
vec.dedup_by(same_bucket) calls same_bucket(a, b) where b appears
before a in the vector, and discards a when true is returned.  This
argument order is probably a bug, but since it has already been
stabilized, I guess we should document it as a feature and move on.

(Vec::dedup also uses == with this unexpected argument order, but I
figure that’s not important since == is expected to be symmetric with
no side effects.)

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2017-07-03 18:38:53 -04:00
est31
3ba0f07f08 Make sNaN removal code tolerate different sNaN encodings
IEEE 754-1985 specifies the encoding of NaN floating point numbers,
but while it mentions that NaNs can be subdivided into signaling
and quiet ones, it doesn't fix the encoding of signaling NaNs in binary
formats. This led to different implementations (CPUs) having different
encodings. IEEE 754-2008 finally specified the encoding of signaling NaNs
but some architectures are compatible with it, while others aren't.
Certain MIPS and PA-RISC CPUs have different encodings for signaling
NaNs.

In order to have the float <-> binary cast feature of the std library be
portable to them, we don't mask any quiet NaNs like we did before (only
being compliant to IEEE 754-2008 and nothing else), but instead we
simply pass a known good NaN instead.

Note that in the code removed there was a bug; the 64 bit mask for quiet
NaNs should have been `0x0008000000000000` instead of the specified
`0x0001000000000000`.
2017-07-03 21:51:36 +02:00
bors
734c83642c Auto merge of #42999 - behnam:ucd10, r=alexcrichton
[libstd_unicode] Upgrade to Unicode 10.0.0

Update `libstd_unicode`'s data tables to Unicode 10.0.0, as released on 2017 June 20: http://www.unicode.org/versions/Unicode10.0.0/
2017-07-03 17:00:17 +00:00
bors
4c225c4d17 Auto merge of #42976 - ids1024:redoxfix, r=sfackler
Fix Redox build, apparently broken by #42687
2017-07-03 12:20:57 +00:00
Cengiz Can
06de114f89 remove isatty dependency 2017-07-03 14:13:02 +03:00
Cengiz Can
e1a91443cd use single line comments 2017-07-03 14:13:02 +03:00
Cengiz Can
0e18a9cd55 use embedded implementation instead of istty crate 2017-07-03 14:13:02 +03:00
Cengiz Can
7b0a7fdaf2 do not spawn pager if not tty 2017-07-03 14:13:02 +03:00
Cengiz Can
08b6bebbad use unwrap_or_else to prevent unnecessary alloc 2017-07-03 14:13:02 +03:00
Cengiz Can
1beeb5a277 do not append an extra newline char 2017-07-03 14:13:01 +03:00
Cengiz Can
3146e552d1 use PAGER to view --explain output #32665 2017-07-03 14:13:01 +03:00
bors
1d2db7b9e8 Auto merge of #43010 - stjepang:stabilize-sort-unstable, r=alexcrichton
Stabilize feature sort_unstable

Closes #40585
2017-07-02 23:54:32 +00:00
Stjepan Glavina
66f8cddae5 Remove the remaining feature gates 2017-07-02 21:29:39 +02:00
Stjepan Glavina
21149bcd53 Fix lint errors 2017-07-02 19:14:16 +02:00
Ryan Thomas
d1316b468f Add docs for Debug* structs. #29355
This adds docs for the Debug* structs as well as examples from the
Formatter::debug_* methods, so that a user knows how to construct them.

I added these examples as the builders module is not public and hence
the debug_*_new() functions are not available to a user.

r? @steveklabnik

Review comments.

Mainly adding in the links for all of the structs and functions.

Remove rust tag on code blocks.
2017-07-02 17:42:02 +01:00
bors
0679711398 Auto merge of #42938 - est31:col_number, r=eddyb
Output column number info when panicking

Outputs the column number when panicking. Useful when you e.g. have code like `foo[i] = bar[k] + bar[l]` and you get a panic with index out of bounds, or when you have an expression like `a = b + c + d + e` and the addition overflows. Now you know which operation to blame!

The format is `file:line:column`, just like for compiler errors. Example output with the patch:

```
thread 'main' panicked at 'index out of bounds: the len is 5 but the index is 8', src/main.rs:3:8
```

As some of the API between the compiler and the library landscape gets broken, this is a bit hackier than I'd originally wanted it to be.

* `panic` and `panic_bounds_check` lang items got an additional column param, on stage0 I still have to use the previous version. After a SNAP this should be resolved.
* For `#[derive(RustcDeserialze)]`, stage0 requires a fixed signature for `std::rt::begin_panic`, so we can't change it right away. What we need to do instead is to keep the signature, and add a `begin_panic_new` function that we use in later stages instead. After a SNAP we can change the `begin_panic` function and rely on it instead of `begin_panic_new`, and one SNAP later we can remove `begin_panic_new`.
* Fortunately I didn't have to break anything about the panic hook API, I could easily extend it.

Note that debuginfo remains unchanged, so RUST_BACKTRACE output won't contain any column info. See issue #42921 for discussion on including the column in debuginfo.
2017-07-02 15:40:26 +00:00