]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #31668 - cuviper:lfs, r=alexcrichton
bors [Tue, 16 Feb 2016 07:01:34 +0000 (07:01 +0000)]
Auto merge of #31668 - cuviper:lfs, r=alexcrichton

This follows the pattern already used for stat functions from #31551.  Now
`ftruncate`, `lseek`, and `readdir_r` use their explicit 64-bit variants for
LFS support, using wider `off_t` and `dirent` types.  This also updates to
`open64`, which uses no different types but implies the `O_LARGEFILE` flag.

Non-Linux platforms just map their normal functions to the 64-bit names.

r? @alexcrichton

8 years agoAuto merge of #31627 - KiChjang:unstable-lint, r=alexcrichton
bors [Tue, 16 Feb 2016 05:16:55 +0000 (05:16 +0000)]
Auto merge of #31627 - KiChjang:unstable-lint, r=alexcrichton

Fixes #31122.

8 years agoAuto merge of #31639 - quodlibetor:doc-search-with-unknown-types, r=alexcrichton
bors [Tue, 16 Feb 2016 03:03:35 +0000 (03:03 +0000)]
Auto merge of #31639 - quodlibetor:doc-search-with-unknown-types, r=alexcrichton

This enables `*` in all type positions in doc searches, which I often
want in order to find functions that create or convert specific
types (e.g. `* -> vec`) but I don't actually know what kinds of input
they expect.

I actually started working on this because of #31598, but I've wanted it
several times when exploring new crates.

8 years agoAuto merge of #31646 - Manishearth:rollup, r=Manishearth
bors [Mon, 15 Feb 2016 22:41:02 +0000 (22:41 +0000)]
Auto merge of #31646 - Manishearth:rollup, r=Manishearth

- Successful merges: #31551, #31581, #31614, #31626, #31632, #31642
- Failed merges:

8 years agoFix wrong help message left in #31368
Johan Lorenzo [Mon, 15 Feb 2016 16:44:06 +0000 (17:44 +0100)]
Fix wrong help message left in #31368

8 years agoClarify contiguous memory array structure of vectors in documentation
Dirk Gadsden [Mon, 15 Feb 2016 01:00:46 +0000 (17:00 -0800)]
Clarify contiguous memory array structure of vectors in documentation

Closes #31554.

Contributes to #29380.

8 years agodoc pages: add the ability to search unknown types
Brandon W Maister [Sat, 13 Feb 2016 20:11:08 +0000 (15:11 -0500)]
doc pages: add the ability to search unknown types

This enables `*` in all type positions in doc searches, which I often
want in order to find functions that create or convert specific
types (e.g. `* -> vec`) but I don't actually know what kinds of input
they expect.

I actually started working on this because of #31598, but I've wanted it
several times when exploring new crates.

8 years agoAdd lint to check that all crates have #![unstable]
Keith Yeung [Sat, 13 Feb 2016 11:44:40 +0000 (06:44 -0500)]
Add lint to check that all crates have #![unstable]

8 years agoAuto merge of #31530 - dirk:dirk/restrict-matching-of-cfg-opts, r=alexcrichton
bors [Mon, 15 Feb 2016 19:30:37 +0000 (19:30 +0000)]
Auto merge of #31530 - dirk:dirk/restrict-matching-of-cfg-opts, r=alexcrichton

Fixes #31497.

8 years agoAuto merge of #31663 - nodakai:cleanup-uint_module, r=alexcrichton
bors [Mon, 15 Feb 2016 17:33:09 +0000 (17:33 +0000)]
Auto merge of #31663 - nodakai:cleanup-uint_module, r=alexcrichton

8 years agoAuto merge of #31656 - jonas-schievink:mirdump, r=nrc
bors [Mon, 15 Feb 2016 14:57:44 +0000 (14:57 +0000)]
Auto merge of #31656 - jonas-schievink:mirdump, r=nrc

This allows obtaining a textual MIR dump for individual items or all items in the crate.

I haven't added any tests since ~~I'm too lazy~~ this is an unstable debugging option, but I'll add one if required.

MIR for a single function can now be dumped using `rustc -Zunstable-options --unpretty mir=my_function` and no longer requires the use of in-source `#[rustc_mir]` attributes.

Blocks rust-lang/rust-playpen#154 (if MIR dump support from the playpen is even wanted).

Example output:
```rust
fn main() {
    let x = Some(0);
    x.unwrap_or_else(|| 1);
}
```

```
MIR for expr || 1 (id=16)
fn(arg0: [closure@test.rs:3:22: 3:26]) -> i32 {
    let mut tmp0: ();

    bb0: {
        return = const 1;
        goto -> bb1;
    }

    bb1: {
        return;
    }
}
MIR for fn main::main (id=4)
fn() -> () {
    let var0: core::option::Option<i32>; // x
    let mut tmp0: ();
    let mut tmp1: i32;
    let mut tmp2: core::option::Option<i32>;
    let mut tmp3: [closure@test.rs:3:22: 3:26];

    bb0: {
        var0 = core::option::Option::Some(const 0);
        tmp2 = var0;
        tmp3 = [closure@test.rs:3:22: 3:26];
        tmp1 = core::option::Option<T>::unwrap_or_else(tmp2, tmp3) -> bb2;
    }

    bb1: {
        return;
    }

    bb2: {
        drop(tmp1) -> bb3;
    }

    bb3: {
        return = ();
        goto -> bb1;
    }
}
```

8 years agoAuto merge of #31640 - rkruppe:require-py27, r=sanxiyn
bors [Mon, 15 Feb 2016 13:04:00 +0000 (13:04 +0000)]
Auto merge of #31640 - rkruppe:require-py27, r=sanxiyn

In other words, enforce what was documented in #30626 (and also stop blaming it on LLVM, we have at least one Python script of our own).

Also, there is no Python later than 2.7 and there never will be.

8 years agoAuto merge of #31653 - tomaka:emscripten-abi, r=eddyb
bors [Mon, 15 Feb 2016 11:07:02 +0000 (11:07 +0000)]
Auto merge of #31653 - tomaka:emscripten-abi, r=eddyb

Needs a correct review because I'm not too confident with how this works.
All tests related to the C ABI are now passing.

References:
- https://github.com/kripken/emscripten-fastcomp-clang/blob/dbe68fecd03d6f646bd075963c3cc0e7130e5767/lib/CodeGen/TargetInfo.cpp#L479-L489
- https://github.com/kripken/emscripten-fastcomp-clang/blob/dbe68fecd03d6f646bd075963c3cc0e7130e5767/lib/CodeGen/TargetInfo.cpp#L466-L477

The `classifyArgumentType` function has two different paths depending on `RAA == CGCXXABI::RAA_DirectInMemory`, but I don't really know what's the corresponding option in Rust.

cc @brson @eddyb

8 years agoAuto merge of #31652 - semarie:openbsd-os-raw, r=alexcrichton
bors [Mon, 15 Feb 2016 09:10:52 +0000 (09:10 +0000)]
Auto merge of #31652 - semarie:openbsd-os-raw, r=alexcrichton

remove unused import that cause an error at compile-time.

r? @alexcrichton

8 years agoAuto merge of #31648 - jseyfried:fix_diagnostics, r=nrc
bors [Mon, 15 Feb 2016 07:13:02 +0000 (07:13 +0000)]
Auto merge of #31648 - jseyfried:fix_diagnostics, r=nrc

This PR fixes two unrelated diagnostics bugs in resolve.

First, it reports privacy errors for an import only after the import resolution is determined, fixing #31402.

Second, it expands the per-module map from block ids to anonymous modules so that it also maps module declarations ids to modules, and it uses this map to in `with_scope` to fix #31644.

r? @nrc

8 years agoRename `error-index-generator` to `error_index_generator`
Dirk Gadsden [Mon, 15 Feb 2016 06:26:37 +0000 (22:26 -0800)]
Rename `error-index-generator` to `error_index_generator`

This is because the tool compiler passes the name of the tool
as a command line `--cfg`. The improved session config parser
is stricter and no longer permits invalid meta items (such as
"error-index-generator").

8 years agoAdd lint to check that all crates have #![unstable]
Keith Yeung [Sat, 13 Feb 2016 11:44:40 +0000 (06:44 -0500)]
Add lint to check that all crates have #![unstable]

8 years agoAuto merge of #31566 - jseyfried:fix_regression, r=nrc
bors [Mon, 15 Feb 2016 05:19:29 +0000 (05:19 +0000)]
Auto merge of #31566 - jseyfried:fix_regression, r=nrc

This fixes a regression caused by #31461 allowing extern crates to be glob imported, and it fixes the test that was supposed to catch it.
r? @nrc

8 years agoAuto merge of #31555 - nrc:err-recover, r=pnkfelix
bors [Mon, 15 Feb 2016 03:17:35 +0000 (03:17 +0000)]
Auto merge of #31555 - nrc:err-recover, r=pnkfelix

Recover from missing brackets in the parser

8 years agostd: use LFS open64 on Linux
Josh Stone [Mon, 15 Feb 2016 00:27:18 +0000 (16:27 -0800)]
std: use LFS open64 on Linux

8 years agostd: use LFS readdir64_r on Linux
Josh Stone [Mon, 15 Feb 2016 00:24:02 +0000 (16:24 -0800)]
std: use LFS readdir64_r on Linux

8 years agostd: use LFS lseek64 on Linux
Josh Stone [Mon, 15 Feb 2016 00:15:39 +0000 (16:15 -0800)]
std: use LFS lseek64 on Linux

8 years agostd: use LFS ftruncate64 on Linux
Josh Stone [Mon, 15 Feb 2016 00:09:57 +0000 (16:09 -0800)]
std: use LFS ftruncate64 on Linux

8 years agoStricter matching of `--cfg` options on rustc
Dirk Gadsden [Wed, 10 Feb 2016 06:48:47 +0000 (22:48 -0800)]
Stricter matching of `--cfg` options on rustc

Includes compile-fail test to check that it fails on incomplete
`--cfg` matches.

Fixes #31497.

8 years agoRebasing
Nick Cameron [Mon, 15 Feb 2016 00:14:31 +0000 (13:14 +1300)]
Rebasing

8 years agolibcore/num: Remove unused macro argument.
NODA, Kai [Sun, 14 Feb 2016 23:34:02 +0000 (07:34 +0800)]
libcore/num: Remove unused macro argument.

It is no longer necessary after dd0d495f50e2d8ba501e6b003cb4c1ef52d95ed5

Signed-off-by: NODA, Kai <nodakai@gmail.com>
8 years agoAuto merge of #31661 - steveklabnik:rollup, r=steveklabnik
bors [Sun, 14 Feb 2016 23:18:00 +0000 (23:18 +0000)]
Auto merge of #31661 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #31607, #31649, #31655, #31658
- Failed merges:

8 years agoRollup merge of #31658 - felgru:master, r=steveklabnik
Steve Klabnik [Sun, 14 Feb 2016 23:02:32 +0000 (18:02 -0500)]
Rollup merge of #31658 - felgru:master, r=steveklabnik

In the Rust code above this block of compiler output, the function is called print_sum, so use the same function name in the error message.

8 years agoRollup merge of #31655 - ollie27:patch-4, r=steveklabnik
Steve Klabnik [Sun, 14 Feb 2016 23:02:32 +0000 (18:02 -0500)]
Rollup merge of #31655 - ollie27:patch-4, r=steveklabnik

r? @steveklabnik

8 years agoRollup merge of #31649 - fbergr:doc, r=steveklabnik
Steve Klabnik [Sun, 14 Feb 2016 23:02:32 +0000 (18:02 -0500)]
Rollup merge of #31649 - fbergr:doc, r=steveklabnik

8 years agoRollup merge of #31607 - steveklabnik:gh31599, r=brson
Steve Klabnik [Sun, 14 Feb 2016 23:02:32 +0000 (18:02 -0500)]
Rollup merge of #31607 - steveklabnik:gh31599, r=brson

Fixes #31599

8 years agoAuto merge of #31460 - alexcrichton:supafast-rustc, r=brson
bors [Sun, 14 Feb 2016 21:24:45 +0000 (21:24 +0000)]
Auto merge of #31460 - alexcrichton:supafast-rustc, r=brson

Looking at some profiles of rustc recently, these seemed like two pretty easy wins we could get in terms of performance on the table.

8 years agoTests
Nick Cameron [Thu, 11 Feb 2016 01:50:19 +0000 (14:50 +1300)]
Tests

8 years agoSome error recovery in the parser
Nick Cameron [Wed, 10 Feb 2016 03:11:27 +0000 (16:11 +1300)]
Some error recovery in the parser

8 years agoAdd some simple error recovery to the parser and fix tests
Nick Cameron [Sun, 31 Jan 2016 19:39:50 +0000 (08:39 +1300)]
Add some simple error recovery to the parser and fix tests

Some tests just add the extra errors, others I fix by doing some simple error recovery. I've tried to avoid doing too much in the hope of doing something more principled later.

In general error messages are getting worse at this stage, but I think in the long run they will get better.

8 years agoerror correction for missing or mismatched closing brackets
Nick Cameron [Fri, 29 Jan 2016 04:49:59 +0000 (17:49 +1300)]
error correction for missing or mismatched closing brackets

8 years agorefactoring: inline some function in the parser
Nick Cameron [Fri, 29 Jan 2016 01:57:58 +0000 (14:57 +1300)]
refactoring: inline some function in the parser

8 years agostd: Stop prefixing jemalloc symbols
Alex Crichton [Sun, 7 Feb 2016 06:54:35 +0000 (22:54 -0800)]
std: Stop prefixing jemalloc symbols

Now that we properly only link in jemalloc when building executables, we have
far less to worry about in terms of polluting the global namespace with the
`free` and `malloc` symbols on Linux. This commit will primarily allow LLVM to
use jemalloc so the compiler will only be using one allocator overall.

Locally this took compile time for libsyntax from 95 seconds to 89 (a 6%
improvement).

8 years agodoc: fix compiler output
Felix Gruber [Sun, 14 Feb 2016 19:50:12 +0000 (20:50 +0100)]
doc: fix compiler output

In the Rust code above, the function is called print_sum, so use the
same function name in the error message.

8 years agotrans: Don't link whole rlibs to executables
Alex Crichton [Thu, 11 Feb 2016 19:06:31 +0000 (11:06 -0800)]
trans: Don't link whole rlibs to executables

Back in 9bc8e6d14 the linking of rlibs changed to using the `link_whole_rlib`
function. This change, however was only intended to affect dylibs, not
executables. For executables we don't actually want to link entire rlibs because
we want the linker to strip out as much as possible.

This commit adds a conditional to this logic to only link entire rlibs if we're
creating a dylib, and otherwise an executable just links an rlib as usual. A
test is included which will fail to link if this behavior is reverted.

8 years agorustc: Ensure FNV hashing is inlined across crates
Alex Crichton [Sun, 7 Feb 2016 06:56:25 +0000 (22:56 -0800)]
rustc: Ensure FNV hashing is inlined across crates

Right now the primary hashing algorithm of the compiler isn't actually inlined
across crates, meaning that it may be missing out on some crucial optimizations
in a few places (perhaps unrolling smaller loops, etc).

This commit made the hashing function disappear from a profiled version of the
compiler, but that's likely because it was just inlined elsewhere. When
compiling winapi, however, this decreased compile time from 18.3 to 17.8 seconds
(a 3% improvement).

8 years agoAuto merge of #31630 - pitdicker:read_link, r=alexcrichton
bors [Sun, 14 Feb 2016 19:42:42 +0000 (19:42 +0000)]
Auto merge of #31630 - pitdicker:read_link, r=alexcrichton

8 years agoFix a couple of issues in from_utf8 docs
Oliver Middleton [Sun, 14 Feb 2016 18:38:37 +0000 (18:38 +0000)]
Fix a couple of issues in from_utf8 docs

8 years agoImplement --unpretty mir
Jonas Schievink [Sun, 14 Feb 2016 18:23:05 +0000 (19:23 +0100)]
Implement --unpretty mir

8 years agoAuto merge of #31642 - rkruppe:rm-regex-script, r=alexcrichton
bors [Sun, 14 Feb 2016 18:00:53 +0000 (18:00 +0000)]
Auto merge of #31642 - rkruppe:rm-regex-script, r=alexcrichton

This file was probably forgotten when libregex moved out of tree. The rust-lang-nursery/regex repo has a nigh-identical file in its script/ folder.

8 years agoFix doc error for Utf8Error
Oliver Middleton [Sun, 14 Feb 2016 17:52:05 +0000 (17:52 +0000)]
Fix doc error for Utf8Error

8 years agoFix signed int checked_neg docs
Oliver Middleton [Sun, 14 Feb 2016 17:44:22 +0000 (17:44 +0000)]
Fix signed int checked_neg docs

8 years agoFix the asmjs ABI
Pierre Krieger [Sun, 14 Feb 2016 16:07:44 +0000 (17:07 +0100)]
Fix the asmjs ABI

8 years agoAuto merge of #31651 - eddyb:fix-26978, r=arielb1
bors [Sun, 14 Feb 2016 16:18:48 +0000 (16:18 +0000)]
Auto merge of #31651 - eddyb:fix-26978, r=arielb1

Handles `str` being an expression's expected type, which was missing from #20083.
Fixes #26978.

8 years agoDo not expect blocks to have type str.
Eduard Burtescu [Sun, 14 Feb 2016 13:38:48 +0000 (15:38 +0200)]
Do not expect blocks to have type str.

8 years agoRemove incorrect documentation
Steve Klabnik [Fri, 12 Feb 2016 16:55:31 +0000 (11:55 -0500)]
Remove incorrect documentation

Fixes #31599

8 years agodoc: Remove trailing whitespace
fbergr [Sun, 14 Feb 2016 12:31:20 +0000 (14:31 +0200)]
doc: Remove trailing whitespace

8 years agoAuto merge of #31626 - mitaa:rdoc-srch-escape, r=alexcrichton
bors [Sun, 14 Feb 2016 12:13:58 +0000 (12:13 +0000)]
Auto merge of #31626 - mitaa:rdoc-srch-escape, r=alexcrichton

Maybe they should be Markdown rendered instead, though that doesn't really seem to work all that well.

fixes #31059

r? @alexcrichton

8 years agopolish `std::os::*::raw` deprecation on openbsd
Sébastien Marie [Sun, 14 Feb 2016 11:03:46 +0000 (12:03 +0100)]
polish `std::os::*::raw` deprecation on openbsd

remove unused import that cause an error at compile-time.

8 years agoAuto merge of #31614 - mitaa:rdoc_locitem_extmac, r=alexcrichton
bors [Sun, 14 Feb 2016 10:10:50 +0000 (10:10 +0000)]
Auto merge of #31614 - mitaa:rdoc_locitem_extmac, r=alexcrichton

fixes #26606

r? @alexcrichton

8 years agoRename Module field anonymous_children to module_children, expand it to include both...
Jeffrey Seyfried [Sat, 13 Feb 2016 23:39:51 +0000 (23:39 +0000)]
Rename Module field anonymous_children to module_children, expand it to include both named an anonymous modules, and fix #31644

8 years agoRename Module field children to resolutions
Jeffrey Seyfried [Sun, 14 Feb 2016 08:46:54 +0000 (08:46 +0000)]
Rename Module field children to resolutions

8 years agoAuto merge of #31391 - frewsxcv:test, r=alexcrichton
bors [Sun, 14 Feb 2016 08:25:39 +0000 (08:25 +0000)]
Auto merge of #31391 - frewsxcv:test, r=alexcrichton

Part of #31185

8 years agoAuto merge of #31581 - petrochenkov:patrefact, r=Manishearth
bors [Sun, 14 Feb 2016 06:18:10 +0000 (06:18 +0000)]
Auto merge of #31581 - petrochenkov:patrefact, r=Manishearth

cc https://github.com/rust-lang/rust/pull/31487#issuecomment-182945101
plugin-[breaking-change]

The first commit renames `ast::Pat_` to `ast::PatKind` and uses its variants in enum qualified form. I've also taken the opportunity and renamed `PatKind::Region` into `PatKind::Ref`.

The second commit splits `PatKind::Enum` into `PatKind::TupleStruct` and `PatKind::UnitStruct`.
So, pattern kinds now correspond to their struct/variant kinds - `Struct`, `TupleStruct` and `UnitStruct`.
@nikomatsakis @nrc @arielb1 Are you okay with this naming scheme?
An alternative possible naming scheme is `PatKind::StructVariant`, `PatKind::TupleVariant`, `PatKind::UnitVariant` (it's probably closer to the common use, but I like it less).

I intend to apply these changes to HIR later, they should not necessarily go in the same nightly with https://github.com/rust-lang/rust/pull/31487
r? @Manishearth

8 years agoAdd LLVM ModulePass regression test using run-make.
Corey Farwell [Tue, 2 Feb 2016 04:46:02 +0000 (23:46 -0500)]
Add LLVM ModulePass regression test using run-make.

Part of #31185

8 years agoAuto merge of #31551 - alexcrichton:deprecate-std-os-raw, r=brson
bors [Sun, 14 Feb 2016 02:17:38 +0000 (02:17 +0000)]
Auto merge of #31551 - alexcrichton:deprecate-std-os-raw, r=brson

This commit is an implementation of [RFC 1415][rfc] which deprecates all types
in the `std::os::*::raw` modules.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1415-trim-std-os.md

Many of the types in these modules don't actually have a canonical platform
representation, for example the definition of `stat` on 32-bit Linux will change
depending on whether C code is compiled with LFS support or not. Unfortunately
the current types in `std::os::*::raw` are billed as "compatible with C", which
in light of this means it isn't really possible.

To make matters worse, platforms like Android sometimes define these types as
*smaller* than the way they're actually represented in the `stat` structure
itself. This means that when methods like `DirEntry::ino` are called on Android
the result may be truncated as we're tied to returning a `ino_t` type, not the
underlying type.

The commit here incorporates two backwards-compatible components:

* Deprecate all `raw` types that aren't in `std::os::raw`
* Expand the `std::os::*::fs::MetadataExt` trait on all platforms for method
  accessors of all fields. The fields now returned widened types which are the
  same across platforms (consistency across platforms is not required, however,
  it's just convenient).

and two also backwards-incompatible components:

* Change the definition of all `std::os::*::raw` type aliases to
  correspond to the newly widened types that are being returned on each
  platform.
* Change the definition of `std::os::*::raw::stat` on Linux to match the LFS
  definitions rather than the standard ones.

The breaking changes here will specifically break code that assumes that `libc`
and `std` agree on the definition of `std::os::*::raw` types, or that the `std`
types are faithful representations of the types in C. An [audit] has been
performed of crates.io to determine the fallout which was determined two be
minimal, with the two found cases of breakage having been fixed now.

[audit]: https://github.com/rust-lang/rfcs/pull/1415#issuecomment-180645582

---

Ok, so after all that, we're finally able to support LFS on Linux! This commit
then simultaneously starts using `stat64` and friends on Linux to ensure that we
can open >4GB files on 32-bit Linux. Yay!

Closes #28978
Closes #30050
Closes #31549

8 years agoAuto merge of #31643 - Manishearth:rollup, r=Manishearth
bors [Sat, 13 Feb 2016 23:37:10 +0000 (23:37 +0000)]
Auto merge of #31643 - Manishearth:rollup, r=Manishearth

- Successful merges: #31535, #31537, #31542, #31559, #31563, #31582, #31584, #31585, #31589, #31607, #31609, #31610, #31612, #31629, #31635, #31637, #31638
- Failed merges:

8 years agoRollup merge of #31638 - rkruppe:rm-tex, r=alexcrichton
Manish Goregaokar [Sat, 13 Feb 2016 22:29:11 +0000 (03:59 +0530)]
Rollup merge of #31638 - rkruppe:rm-tex, r=alexcrichton

This file is unused since #27789

8 years agoRollup merge of #31637 - rkruppe:ignore-pdb, r=alexcrichton
Manish Goregaokar [Sat, 13 Feb 2016 22:29:11 +0000 (03:59 +0530)]
Rollup merge of #31637 - rkruppe:ignore-pdb, r=alexcrichton

8 years agoRollup merge of #31635 - semarie:grep-e, r=alexcrichton
Manish Goregaokar [Sat, 13 Feb 2016 22:29:11 +0000 (03:59 +0530)]
Rollup merge of #31635 - semarie:grep-e, r=alexcrichton

The BSD grep for "basic regex" don't support \| as alternate operator (at least under OpenBSD).

Use multiple -e arguments for expressing alternative. I have checked it under Linux (Debian).

8 years agoRollup merge of #31629 - petevine:master, r=alexcrichton
Manish Goregaokar [Sat, 13 Feb 2016 22:29:11 +0000 (03:59 +0530)]
Rollup merge of #31629 - petevine:master, r=alexcrichton

This PR should make it easier to create a baseline x86 compiler  as well as make cross-compilation possible through a separate set of rlibs.

Plus, a few Linux distributions (e.g. Debian) have voiced interest in having this target available.

8 years agoRollup merge of #31612 - raindev:grammar, r=steveklabnik
Manish Goregaokar [Sat, 13 Feb 2016 22:29:11 +0000 (03:59 +0530)]
Rollup merge of #31612 - raindev:grammar, r=steveklabnik

I feel sorry for bothering you with such a literally one character changes. If it is counter productive feel free to point it out in the comments, that would be totally understandable. I could try to pack such a changes together in one PR to make them less distractive.

r? @steveklabnik

8 years agoRollup merge of #31610 - Manishearth:doc-clarify-txrx, r=steveklabnik
Manish Goregaokar [Sat, 13 Feb 2016 22:29:10 +0000 (03:59 +0530)]
Rollup merge of #31610 - Manishearth:doc-clarify-txrx, r=steveklabnik

Not everyone knows this convention. We could just rename the variables in the
example, but since this notation is commonly used it's a good opportunity to
introduce it.

r? @steveklabnik

8 years agoRollup merge of #31609 - erickt:nit, r=sfackler
Manish Goregaokar [Sat, 13 Feb 2016 22:29:10 +0000 (03:59 +0530)]
Rollup merge of #31609 - erickt:nit, r=sfackler

8 years agoRollup merge of #31589 - reem:remove-unnecessary-poison-bounds, r=sfackler
Manish Goregaokar [Sat, 13 Feb 2016 22:29:10 +0000 (03:59 +0530)]
Rollup merge of #31589 - reem:remove-unnecessary-poison-bounds, r=sfackler

None

8 years agoRollup merge of #31585 - tshepang:over-explanation, r=brson
Manish Goregaokar [Sat, 13 Feb 2016 22:29:10 +0000 (03:59 +0530)]
Rollup merge of #31585 - tshepang:over-explanation, r=brson

…o read

8 years agoRollup merge of #31584 - tshepang:shorten, r=steveklabnik
Manish Goregaokar [Sat, 13 Feb 2016 22:29:10 +0000 (03:59 +0530)]
Rollup merge of #31584 - tshepang:shorten, r=steveklabnik

8 years agoRollup merge of #31582 - tshepang:missing-words, r=steveklabnik
Manish Goregaokar [Sat, 13 Feb 2016 22:29:09 +0000 (03:59 +0530)]
Rollup merge of #31582 - tshepang:missing-words, r=steveklabnik

8 years agoRollup merge of #31563 - SDX2000:docfixes1, r=steveklabnik
Manish Goregaokar [Sat, 13 Feb 2016 22:29:09 +0000 (03:59 +0530)]
Rollup merge of #31563 - SDX2000:docfixes1, r=steveklabnik

This is a minor change. Please see title. IMO this is important since this is the first instance when we talk about allocating a vector. Not saying that it is allocated on the stack here leaves room for speculation and this might put off some people (they might not even read the later sections which go into more detail about this).

8 years agoRollup merge of #31559 - scottrobertwhittaker:fix-typo, r=steveklabnik
Manish Goregaokar [Sat, 13 Feb 2016 22:29:09 +0000 (03:59 +0530)]
Rollup merge of #31559 - scottrobertwhittaker:fix-typo, r=steveklabnik

"destructors" was misspelled.

r? @steveklabnik

8 years agoRollup merge of #31542 - nodakai:concat_idents-desc, r=steveklabnik
Manish Goregaokar [Sat, 13 Feb 2016 22:29:09 +0000 (03:59 +0530)]
Rollup merge of #31542 - nodakai:concat_idents-desc, r=steveklabnik

Just a small documentation change.

It would be great if anyone could check my English.

8 years agoRollup merge of #31537 - ollie27:book_doc_example, r=steveklabnik
Manish Goregaokar [Sat, 13 Feb 2016 22:29:09 +0000 (03:59 +0530)]
Rollup merge of #31537 - ollie27:book_doc_example, r=steveklabnik

The code sections shouldn't be inside a ```text block.

r? @steveklabnik

8 years agoRollup merge of #31535 - Ketsuban:more-detail-in-wrapping-shift-documentation, r...
Manish Goregaokar [Sat, 13 Feb 2016 22:29:09 +0000 (03:59 +0530)]
Rollup merge of #31535 - Ketsuban:more-detail-in-wrapping-shift-documentation, r=steveklabnik

`wrapping_shl` and `wrapping_shr` are easy to mistake for rotations, when in fact they work somewhat differently. The documentation currently available is a little sparse and easy to misinterpret, so I've added a warning to anyone who bumps into them that the equivalent rotate methods may actually be what they're looking for.

If it's deemed useful to add a symmetrical mention to the documentation for the `rotate_left` and `rotate_right` methods, I can certainly have a go at that, but my gut feeling is that people likely to want a rotate will already know about the wrapping-arithmetic methods, for example from writing CPU simulators.

8 years agostd: Deprecate all std::os::*::raw types
Alex Crichton [Fri, 5 Feb 2016 01:16:47 +0000 (17:16 -0800)]
std: Deprecate all std::os::*::raw types

This commit is an implementation of [RFC 1415][rfc] which deprecates all types
in the `std::os::*::raw` modules.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1415-trim-std-os.md

Many of the types in these modules don't actually have a canonical platform
representation, for example the definition of `stat` on 32-bit Linux will change
depending on whether C code is compiled with LFS support or not. Unfortunately
the current types in `std::os::*::raw` are billed as "compatible with C", which
in light of this means it isn't really possible.

To make matters worse, platforms like Android sometimes define these types as
*smaller* than the way they're actually represented in the `stat` structure
itself. This means that when methods like `DirEntry::ino` are called on Android
the result may be truncated as we're tied to returning a `ino_t` type, not the
underlying type.

The commit here incorporates two backwards-compatible components:

* Deprecate all `raw` types that aren't in `std::os::raw`
* Expand the `std::os::*::fs::MetadataExt` trait on all platforms for method
  accessors of all fields. The fields now returned widened types which are the
  same across platforms (consistency across platforms is not required, however,
  it's just convenient).

and two also backwards-incompatible components:

* Change the definition of all `std::os::*::raw` type aliases to
  correspond to the newly widened types that are being returned on each
  platform.
* Change the definition of `std::os::*::raw::stat` on Linux to match the LFS
  definitions rather than the standard ones.

The breaking changes here will specifically break code that assumes that `libc`
and `std` agree on the definition of `std::os::*::raw` types, or that the `std`
types are faithful representations of the types in C. An [audit] has been
performed of crates.io to determine the fallout which was determined two be
minimal, with the two found cases of breakage having been fixed now.

[audit]: https://github.com/rust-lang/rfcs/pull/1415#issuecomment-180645582

---

Ok, so after all that, we're finally able to support LFS on Linux! This commit
then simultaneously starts using `stat64` and friends on Linux to ensure that we
can open >4GB files on 32-bit Linux. Yay!

Closes #28978
Closes #30050
Closes #31549

8 years agoRemove a regex-related script
Robin Kruppe [Sat, 13 Feb 2016 21:55:01 +0000 (22:55 +0100)]
Remove a regex-related script

This file was probably forgotten when libregex moved out of tree. The rust-lang-nursery/regex repo has a nigh-identical file in its script/ folder.

8 years agoAuto merge of #31602 - mitaa:rdoc_doc_shorter, r=alexcrichton
bors [Sat, 13 Feb 2016 21:43:28 +0000 (21:43 +0000)]
Auto merge of #31602 - mitaa:rdoc_doc_shorter, r=alexcrichton

fixes #25787
fixes #30366

r? @alexcrichton

8 years agoReport privacy errors at most once per import (fixes #31402)
Jeffrey Seyfried [Thu, 11 Feb 2016 06:17:01 +0000 (06:17 +0000)]
Report privacy errors at most once per import (fixes #31402)

8 years agoconfigure: require Python 2.7
Robin Kruppe [Sat, 13 Feb 2016 20:19:44 +0000 (21:19 +0100)]
configure: require Python 2.7

In other words, enforce what was documented in #30626 (and also stop blaming it on LLVM, we have at least one Python script of our own).

Also, there is no Python later than 2.7 and there never will be.

8 years agodoc pages: add the ability to search unknown types
Brandon W Maister [Sat, 13 Feb 2016 20:11:08 +0000 (15:11 -0500)]
doc pages: add the ability to search unknown types

This enables `*` in all type positions in doc searches, which I often
want in order to find functions that create or convert specific
types (e.g. `* -> vec`) but I don't actually know what kinds of input
they expect.

I actually started working on this because of #31598, but I've wanted it
several times when exploring new crates.

8 years agoFixes #28528
Paul Dicker [Sat, 13 Feb 2016 19:44:37 +0000 (20:44 +0100)]
Fixes #28528
Fix `read_link` to also be able to read the target of junctions on Windows.
Also the path returned should not include a NT namespace, and there were
some problems with permissions.

8 years agoAuto merge of #31596 - mitaa:rdoc_assoc_item, r=alexcrichton
bors [Sat, 13 Feb 2016 19:28:09 +0000 (19:28 +0000)]
Auto merge of #31596 - mitaa:rdoc_assoc_item, r=alexcrichton

8 years agoRemove the last remaining .tex file
Robin Kruppe [Sat, 13 Feb 2016 19:27:57 +0000 (20:27 +0100)]
Remove the last remaining .tex file

8 years agoAdd *.pdb to .gitignore
Robin Kruppe [Sat, 13 Feb 2016 19:23:19 +0000 (20:23 +0100)]
Add *.pdb to .gitignore

8 years agouse a compatible syntax for grep GNU/BSD
Sébastien Marie [Sat, 13 Feb 2016 19:03:08 +0000 (20:03 +0100)]
use a compatible syntax for grep GNU/BSD

The BSD grep for "basic regex" don't support \| as alternate operator.
Use multiple -e arguments for expressing alternative.

8 years agoAuto merge of #31591 - alexcrichton:make-clean-with-rustbuild, r=brson
bors [Sat, 13 Feb 2016 17:05:50 +0000 (17:05 +0000)]
Auto merge of #31591 - alexcrichton:make-clean-with-rustbuild, r=brson

At the same time also touch up the job management on Windows to be a little more resilient to failure.

8 years agoAdd a new i586 Linux target
petevine [Sat, 13 Feb 2016 16:03:00 +0000 (17:03 +0100)]
Add a new i586 Linux target

8 years agoAuto merge of #31588 - soltanmm:layer, r=nikomatsakis
bors [Sat, 13 Feb 2016 15:25:23 +0000 (15:25 +0000)]
Auto merge of #31588 - soltanmm:layer, r=nikomatsakis

<sup>**context:** moving back to a layered approach to type checking.</sup>

It looks like they'd not ended up tightly coupled in the time one was owned by the other. Every instance outside of `FnCtxt.inh` was from an `InferCtxt` created and dropped in the same function body.

This conflicts slightly with #30652, but there too it looks like the `FulfillmentContext` is from an `InferCtxt` that is created and dropped within the same function body (across one call to a module-private function).

That said, I heard that the PR that originally moved `FulfillmentContext` into `InferCtxt` was big, which leaves me concerned that I'm missing something.

r? @nikomatsakis

8 years agoAuto merge of #31579 - ollie27:msvc_link, r=alexcrichton
bors [Sat, 13 Feb 2016 13:44:02 +0000 (13:44 +0000)]
Auto merge of #31579 - ollie27:msvc_link, r=alexcrichton

/LARGEADDRESSAWARE is already enabled for i686-pc-windows-gnu so we should probably be consistent.
https://msdn.microsoft.com/en-us/library/wz223b1z.aspx

/SAFESEH is a good thing to enable by default.
https://msdn.microsoft.com/en-us/library/9a89h429.aspx

8 years agoSplit ast::PatKind::Enum into tuple struct and path patterns
Vadim Petrochenkov [Sat, 13 Feb 2016 12:51:27 +0000 (15:51 +0300)]
Split ast::PatKind::Enum into tuple struct and path patterns

8 years agoAuto merge of #31570 - tomaka:ignore-emscripten, r=brson
bors [Sat, 13 Feb 2016 12:03:38 +0000 (12:03 +0000)]
Auto merge of #31570 - tomaka:ignore-emscripten, r=brson

Ignores 82 rpass tests that use threads.
I took care to only ignore tests that call `thread::spawn`. Some tests, for example `issue-16597`, also do fail because of lack of threads support, but for other reasons.

With this PR, we're down to 49 failures.

r? @brson

8 years agoRename ast::Pat_ and its variants
Vadim Petrochenkov [Thu, 11 Feb 2016 18:16:33 +0000 (21:16 +0300)]
Rename ast::Pat_ and its variants

8 years agoEscape search-index item descriptions
mitaa [Sat, 13 Feb 2016 10:27:53 +0000 (11:27 +0100)]
Escape search-index item descriptions

The item descriptions are included verbatim in search results
causing certain character sequences to misbehave.

8 years agoAuto merge of #31564 - durka:lang-item-icemelt, r=nikomatsakis
bors [Sat, 13 Feb 2016 10:23:49 +0000 (10:23 +0000)]
Auto merge of #31564 - durka:lang-item-icemelt, r=nikomatsakis

This changes three ICEs to fatal errors.

I've grepped for `lang_item.*expect` and `\.expect.*lang` and didn't come up with any more. But, there could be more ICEs lurking.

I wasn't sure about a test because there already _is_ a cfail test for missing lang items, but it only checks one.

Relevant to (already closed) #31477 #31480 #31558.
cc @lilred

8 years agoAuto merge of #31562 - llogiq:lint_post, r=Manishearth
bors [Sat, 13 Feb 2016 08:27:42 +0000 (08:27 +0000)]
Auto merge of #31562 - llogiq:lint_post, r=Manishearth

This fixes #31512 for me.

A bit of explanation: I want to have `check_block_post(&mut self, &Context, &Block)` and `check_crate_post(&mut self, &Context, &Crate)` methods in both early and late lint passes. Ideally we'd have _post methods for all operations that walk, but this'll do for now.

@Manishearth r?

8 years agoAuto merge of #31557 - retep998:house-directory, r=alexcrichton
bors [Sat, 13 Feb 2016 06:47:29 +0000 (06:47 +0000)]
Auto merge of #31557 - retep998:house-directory, r=alexcrichton

This is the simple solution. I know @nodakai was working on a more complex solution that overhauled the `fill_utf16_buf` stuff.

r? @alexcrichton