]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoUse LvalueRef instead of MaybeSizedValue
Mark Simulacrum [Sun, 1 Jan 2017 22:50:15 +0000 (15:50 -0700)]
Use LvalueRef instead of MaybeSizedValue

7 years agoSimpliy block creation in MirContext
Mark Simulacrum [Sun, 1 Jan 2017 18:13:50 +0000 (11:13 -0700)]
Simpliy block creation in MirContext

7 years agoAdd Builder::sess and Builder::tcx methods
Mark Simulacrum [Sun, 1 Jan 2017 15:46:34 +0000 (08:46 -0700)]
Add Builder::sess and Builder::tcx methods

7 years agoAdd method, new_block, to MirContext for block construction.
Mark Simulacrum [Sun, 1 Jan 2017 08:29:23 +0000 (01:29 -0700)]
Add method, new_block, to MirContext for block construction.

This makes a slow transition to block construction happening only from
MirContext easier.

7 years agoPurge FunctionContext
Mark Simulacrum [Sun, 1 Jan 2017 07:42:09 +0000 (00:42 -0700)]
Purge FunctionContext

7 years agoReplace BlockAndBuilder with Builder.
Mark Simulacrum [Sat, 31 Dec 2016 23:00:24 +0000 (16:00 -0700)]
Replace BlockAndBuilder with Builder.

7 years agoAdd test for i128 ffi usage
est31 [Sun, 1 Jan 2017 22:06:57 +0000 (23:06 +0100)]
Add test for i128 ffi usage

7 years agoenhance u128 overflow tests
est31 [Sun, 1 Jan 2017 18:53:12 +0000 (19:53 +0100)]
enhance u128 overflow tests

7 years agoAdd test for correct span for type
Esteban Küber [Sun, 25 Dec 2016 20:50:28 +0000 (12:50 -0800)]
Add test for correct span for type

Test for #27522.

7 years agoAuto merge of #38414 - estebank:doc-dissambiguate, r=steveklabnik
bors [Wed, 4 Jan 2017 17:11:02 +0000 (17:11 +0000)]
Auto merge of #38414 - estebank:doc-dissambiguate, r=steveklabnik

Rustdoc: disambiguate Implementors when the type name is not unique

Presentation [goes from](https://doc.rust-lang.org/stable/std/iter/trait.ExactSizeIterator.html#implementors):

<img width="492" alt="" src="https://cloud.githubusercontent.com/assets/1606434/21276752/b2b50474-c387-11e6-96e1-9766851da269.png">

to:

<img width="787" alt="" src="https://cloud.githubusercontent.com/assets/1606434/21276763/bb37f6b0-c387-11e6-8596-9163cb254674.png">

on cases where there're multiple implementors with the same name.

Fixes #37762.

7 years agotrans: Collect drop-glue translation item for closure env in fn-once-adapters.
Michael Woerister [Wed, 4 Jan 2017 15:01:27 +0000 (10:01 -0500)]
trans: Collect drop-glue translation item for closure env in fn-once-adapters.

7 years agoAuto merge of #38670 - dotdash:transmute_align, r=eddyb
bors [Wed, 4 Jan 2017 14:26:17 +0000 (14:26 +0000)]
Auto merge of #38670 - dotdash:transmute_align, r=eddyb

Fix transmute::<T, U> where T requires a bigger alignment than U

For transmute::<T, U> we simply pointercast the destination from a U
pointer to a T pointer, without providing any alignment information,
thus LLVM assumes that the destination is aligned to hold a value of
type T, which is not necessarily true. This can lead to LLVM emitting
machine instructions that assume said alignment, and thus cause aborts.

To fix this, we need to provide the actual alignment to store_operand()
and in turn to store() so they can set the proper alignment information
on the stores and LLVM can emit the proper machine instructions.

Fixes #32947

7 years agotypeck::coherence::builtin - sort impls in the DefId order
Ariel Ben-Yehuda [Wed, 4 Jan 2017 09:54:57 +0000 (11:54 +0200)]
typeck::coherence::builtin - sort impls in the DefId order

this makes error messages consistent across architectures

7 years agoAuto merge of #38773 - sanxiyn:rustdoc-ice, r=steveklabnik
bors [Wed, 4 Jan 2017 09:24:24 +0000 (09:24 +0000)]
Auto merge of #38773 - sanxiyn:rustdoc-ice, r=steveklabnik

Avoid rustdoc ICE when an unstable feature is used

Fix #36159.

7 years agoFix formatting
abhijeetbhagat [Wed, 4 Jan 2017 09:09:16 +0000 (14:39 +0530)]
Fix formatting

7 years agoFix formatting
abhijeetbhagat [Wed, 4 Jan 2017 08:57:19 +0000 (14:27 +0530)]
Fix formatting

7 years agoFix regression with duplicate `#[macro_export] macro_rules!`.
Jeffrey Seyfried [Tue, 3 Jan 2017 00:36:34 +0000 (00:36 +0000)]
Fix regression with duplicate `#[macro_export] macro_rules!`.

7 years agoAuto merge of #38552 - eddyb:bad-blocks, r=arielb1
bors [Wed, 4 Jan 2017 06:29:14 +0000 (06:29 +0000)]
Auto merge of #38552 - eddyb:bad-blocks, r=arielb1

Don't leak the compiler's internal representation of scopes in error messages.

Fixes #37884 (actually fixes #27942, which was made worse by #37412) by handling more node types.
Ideally we'd turn the unknown node type situations into ICEs and fix them as they show up in errors.
But we might want to backport this patch so I was less aggressive.

7 years agoDon't `unused_qualifications`-check global paths.
Jeffrey Seyfried [Tue, 3 Jan 2017 02:47:18 +0000 (02:47 +0000)]
Don't `unused_qualifications`-check global paths.

7 years agofix help for the --print option
Doug Goldstein [Wed, 4 Jan 2017 05:44:10 +0000 (23:44 -0600)]
fix help for the --print option

Since 8285ab5c99, which was merged in with #38061, the help for the
--print option is missing the surrounding [ ] around the possible
options.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
7 years agoAuto merge of #38707 - redox-os:master, r=brson
bors [Wed, 4 Jan 2017 04:28:15 +0000 (04:28 +0000)]
Auto merge of #38707 - redox-os:master, r=brson

Add socket timeout and ttl support in `sys::redox`

This adds support for `read_timeout`, `write_timeout`, and `ttl` on `TcpStream`, `TcpListener`, and `UdpSocket` in the `sys::redox` module.

The DNS lookup has been set to use a 5 second timeout by default.

7 years agoUpdate for changes to TraitItem on master.
Eduard-Mihai Burtescu [Wed, 4 Jan 2017 02:36:20 +0000 (04:36 +0200)]
Update for changes to TraitItem on master.

7 years agoDon't leak the compiler's internal representation of scopes in error messages.
Eduard-Mihai Burtescu [Thu, 22 Dec 2016 17:46:08 +0000 (19:46 +0200)]
Don't leak the compiler's internal representation of scopes in error messages.

7 years agoFix build after rebase
Andrew Cann [Wed, 4 Jan 2017 03:07:32 +0000 (11:07 +0800)]
Fix build after rebase

7 years agoAuto merge of #38809 - alexcrichton:rustbuild-fresh, r=brson
bors [Wed, 4 Jan 2017 01:51:06 +0000 (01:51 +0000)]
Auto merge of #38809 - alexcrichton:rustbuild-fresh, r=brson

rustbuild: Fix a few rebuilding issues

Did a bit of investigation and found a few small unrelated issues, but this should help clean up a lot of errors we've been seeing locally.

7 years agoAuto merge of #38066 - bluss:string-slice-error, r=sfackler
bors [Tue, 3 Jan 2017 23:51:42 +0000 (23:51 +0000)]
Auto merge of #38066 - bluss:string-slice-error, r=sfackler

Use more specific panic message for &str slicing errors

Separate out of bounds errors from character boundary errors, and print
more details for character boundary errors.

It reports the first error it finds in:

1. begin out of bounds
2. end out of bounds
3. begin <= end violated
3. begin not char boundary
5. end not char boundary.

Example:

    &"abcαβγ"[..4]

    thread 'str::test_slice_fail_boundary_1' panicked at 'byte index 4 is not
    a char boundary; it is inside 'α' (bytes 3..5) of `abcαβγ`'

Fixes #38052

7 years agoRevert cargo.lock
Jeremy Soller [Tue, 3 Jan 2017 22:47:14 +0000 (15:47 -0700)]
Revert cargo.lock

7 years agoRemove -lc, -lm from the target spec - the cross compiler will link those
Jeremy Soller [Tue, 3 Jan 2017 22:42:41 +0000 (15:42 -0700)]
Remove -lc, -lm from the target spec - the cross compiler will link those

7 years agorustbuild: Update where we look for mtime changes
Alex Crichton [Tue, 3 Jan 2017 22:16:05 +0000 (14:16 -0800)]
rustbuild: Update where we look for mtime changes

Recent versions of Cargo lift less output up into the "main" directory, so let's
look more inside the `deps` folder for changes to propagate differences.

Closes #38744
Closes #38746

7 years agorustbuild: Allow create_sysroot in stage0
Alex Crichton [Tue, 3 Jan 2017 22:07:30 +0000 (14:07 -0800)]
rustbuild: Allow create_sysroot in stage0

Despite what the comment says, we actually need to do this. We're not cleaning
out the stage0 compiler's sysroot, but rather just our own sysroot that we
assembled previously.

7 years agosimplify Copy implementation error reporting
Ariel Ben-Yehuda [Tue, 3 Jan 2017 21:54:12 +0000 (23:54 +0200)]
simplify Copy implementation error reporting

Span the affected fields instead of reporting the field/variant name.

7 years agorustfmt coherence::builtin
Ariel Ben-Yehuda [Tue, 3 Jan 2017 19:51:28 +0000 (21:51 +0200)]
rustfmt coherence::builtin

7 years agonormalize field types in copy implementations
Ariel Ben-Yehuda [Sun, 4 Dec 2016 00:04:08 +0000 (02:04 +0200)]
normalize field types in copy implementations

Fixes #34377.

7 years agocoherence: check builtin impls after the specialization graph is ready
Ariel Ben-Yehuda [Sat, 3 Dec 2016 23:32:49 +0000 (01:32 +0200)]
coherence: check builtin impls after the specialization graph is ready

Fixes #33187.

7 years agocoherence: code cleanup
Ariel Ben-Yehuda [Sat, 3 Dec 2016 22:58:13 +0000 (00:58 +0200)]
coherence: code cleanup

7 years agocoherence: move the builtin trait checks to their own module
Ariel Ben-Yehuda [Sat, 3 Dec 2016 22:28:30 +0000 (00:28 +0200)]
coherence: move the builtin trait checks to their own module

no functional changes

7 years agoProperly ban the negation of unsigned integers in type-checking.
Eduard-Mihai Burtescu [Tue, 3 Jan 2017 19:48:17 +0000 (21:48 +0200)]
Properly ban the negation of unsigned integers in type-checking.

7 years agorustc: use -Xlinker when specifying an rpath with ',' in it
Jeremy Fitzhardinge [Tue, 3 Jan 2017 17:45:02 +0000 (09:45 -0800)]
rustc: use -Xlinker when specifying an rpath with ',' in it

The `-Wl` option splits its parameters on commas, so if rustc specifies
`-Wl,-rpath,<path>` when `<path>` contains commas, the path gets split up
and the linker gets a partial path and spurious extra parameters.

Gcc/clang support the more verbose `-Xlinker` option to pass options
to the linker directly, so use it for comma-containing paths.

Fixes rust issue #38795.

7 years agoPrint attributes on expressions when pretty printing.
comex [Tue, 3 Jan 2017 19:24:53 +0000 (20:24 +0100)]
Print attributes on expressions when pretty printing.

7 years agoRegression test and exploratory unit test.
Felix S. Klock II [Tue, 3 Jan 2017 14:54:38 +0000 (09:54 -0500)]
Regression test and exploratory unit test.

7 years agoDont check stability for items that are not pub to universe.
Felix S. Klock II [Thu, 29 Dec 2016 21:00:53 +0000 (16:00 -0500)]
Dont check stability for items that are not pub to universe.

Includes special case handling for trait methods.

Fix #38412.

7 years agoFix process module tests to run on Windows
abhijeetbhagat [Tue, 3 Jan 2017 12:20:30 +0000 (17:50 +0530)]
Fix process module tests to run on Windows

7 years agoAuto merge of #38473 - zackmdavis:issue_kebab, r=sanxiyn
bors [Tue, 3 Jan 2017 09:42:22 +0000 (09:42 +0000)]
Auto merge of #38473 - zackmdavis:issue_kebab, r=sanxiyn

prefer hyphens in test files named after issue numbers

We have a lot of tests with filenames honoring particular issues by
number. Typically, these are called issue-${issue_no}.rs (note the
hyphen):

```
$ find . -regextype posix-egrep -regex '.*/issue-[0-9]*.rs' | wc
   1289    1289   35935
```

We also had a much smaller number of files that are like this, but don't
have a hyphen in between the substring `issue` and the number:

```
$ find . -regextype posix-egrep -regex '.*/issue[0-9]*.rs'
./debuginfo/issue14411.rs
./debuginfo/issue12886.rs
./debuginfo/issue13213.rs
./debuginfo/issue22656.rs
./debuginfo/issue7712.rs
./compile-fail/issue32829.rs
./run-pass/issue24353.rs
./run-pass/issue34796.rs
./run-pass/issue18173.rs
./run-pass/issue22346.rs
./run-pass/auxiliary/issue13507.rs
./run-pass/issue26127.rs
./run-pass/issue22008.rs
./run-pass/issue34569.rs
./run-pass/issue29927.rs
./run-pass/issue36260.rs
```

Some would argue that the inconsistency is æsthetically displeasing,
hence this trivial patch. (Note that run-pass/auxiliary/issue13507.rs
has an excuse; it's `use`d in run-pass/issue-13507-2.rs; the matter of
there being two different compile-fail tests with different name
conventions for issue no. 32829 is also neglected here for the sake of
keeping this trivial cleanup patch as trivial as possible for ease of
review.)

7 years agoFix make tidy
Andrew Cann [Sat, 31 Dec 2016 01:17:51 +0000 (09:17 +0800)]
Fix make tidy

7 years agoChange file structure, add comments for inhabitedness.rs
Andrew Cann [Sat, 31 Dec 2016 00:51:25 +0000 (08:51 +0800)]
Change file structure, add comments for inhabitedness.rs

7 years agoSpelling. s/forrest/forest
Andrew Cann [Fri, 30 Dec 2016 23:35:43 +0000 (07:35 +0800)]
Spelling. s/forrest/forest

7 years agofix comment that got split in two
Niko Matsakis [Fri, 30 Dec 2016 15:51:32 +0000 (10:51 -0500)]
fix comment that got split in two

7 years agoFix build after rebase.
Andrew Cann [Thu, 29 Dec 2016 09:08:33 +0000 (17:08 +0800)]
Fix build after rebase.

Mostly just rename stuff.
Visibility checks use DefIds rather than NodeIds now.

7 years agoRemove E0001 diagnostic
Andrew Cann [Thu, 29 Dec 2016 04:38:02 +0000 (12:38 +0800)]
Remove E0001 diagnostic

7 years agoAmend compile-fail tests
Andrew Cann [Thu, 29 Dec 2016 04:17:40 +0000 (12:17 +0800)]
Amend compile-fail tests

7 years agoDisable unreachable patterns error entirely
Andrew Cann [Sun, 11 Dec 2016 16:01:12 +0000 (00:01 +0800)]
Disable unreachable patterns error entirely

7 years agoFix inhabitedness bug
Andrew Cann [Sun, 11 Dec 2016 15:47:51 +0000 (23:47 +0800)]
Fix inhabitedness bug

7 years agoRefactor is_uninhabited
Andrew Cann [Sun, 11 Dec 2016 14:30:14 +0000 (22:30 +0800)]
Refactor is_uninhabited

We now cache the inhabitedness of types in the GlobalCtxt.

Rather than calculating whether a type is visibly uninhabited from a given
NodeId we calculate the full set of NodeIds from which a type is visibly
uninhabited then cache that set. We can then use that to answer queries about
the inhabitedness of a type relative to any given node.

7 years agoAdd drain method to AccumulateVec/ArrayVec
Andrew Cann [Sun, 11 Dec 2016 14:25:26 +0000 (22:25 +0800)]
Add drain method to AccumulateVec/ArrayVec

You can now call .drain(..) on SmallVec, AccumulateVec and ArrayVec

7 years agoFix test I broke
Andrew Cann [Sun, 11 Dec 2016 14:23:18 +0000 (22:23 +0800)]
Fix test I broke

7 years agoFix build after rebase
Andrew Cann [Sat, 3 Dec 2016 04:56:20 +0000 (12:56 +0800)]
Fix build after rebase

7 years agoFix build after rebase
Andrew Cann [Thu, 1 Dec 2016 04:41:21 +0000 (12:41 +0800)]
Fix build after rebase

7 years agoAuto merge of #38791 - dylanmckay:foreign-item-dc, r=eddyb
bors [Tue, 3 Jan 2017 07:41:43 +0000 (07:41 +0000)]
Auto merge of #38791 - dylanmckay:foreign-item-dc, r=eddyb

Don't warn about dead foreign items if the 'allow(dead_code)' attribute is present

This functionality was missing, and should have existed previously.

Fixes #38780

7 years agoStyle fix
Andrew Cann [Thu, 1 Dec 2016 03:56:55 +0000 (11:56 +0800)]
Style fix

7 years agoImprove error message, fix and add tests.
Andrew Cann [Thu, 1 Dec 2016 03:37:03 +0000 (11:37 +0800)]
Improve error message, fix and add tests.

Changes the non-exhaustive match error message to generate more general
witnesses.

7 years agoMore pattern matching for empty types changes
Andrew Cann [Wed, 30 Nov 2016 17:12:03 +0000 (01:12 +0800)]
More pattern matching for empty types changes

Fix is_uninhabited for enum types. It used to assume that an enums variant's
fields were all private.

Fix MIR generation for irrefutable Variant pattern matches. This allows code
like this to work:

    let x: Result<32, !> = Ok(123);
    let Ok(y) = x;

Carry type information on dummy wildcard patterns. Sometimes we need to expand
these patterns into their constructors and we don't want to be expanding a
TyError into a Constructor::Single.

7 years agoMake is_useful handle empty types properly
Andrew Cann [Tue, 29 Nov 2016 07:10:26 +0000 (15:10 +0800)]
Make is_useful handle empty types properly

7 years agoStart enabling empty types in pattern matching.
Andrew Cann [Mon, 28 Nov 2016 10:38:27 +0000 (18:38 +0800)]
Start enabling empty types in pattern matching.

Remove the assumption at the start of is_useful that any suitably-long array of
wildcard patterns is useful relative the any empty vector. Instead we just
continue to recurse column-wise over the matrix.

This assumption is false in the presence of empty types.
eg. in the simplest case:

let x: ! = ...;
match x {
    // This pattern should not be considered useful by the algorithm
    _   => ...
}

7 years agoReduce the size of static data in std_unicode::tables.
Simon Sapin [Mon, 2 Jan 2017 12:52:20 +0000 (13:52 +0100)]
Reduce the size of static data in std_unicode::tables.

`BoolTrie` works well for sets of code points spread out through
most of Unicode’s range, but is uses a lot of space for sets
with few, mostly low, code points.

This switches a few of its instances to a similar but simpler trie
data structure.

 ## Before

`size_of::<BoolTrie>()` is 1552, which is added to
`table.r3.len() * 8 + t.r5.len() + t.r6.len() * 8`:

* `Cc_table`: 1632
* `White_Space_table`: 1656
* `Pattern_White_Space_table`: 1640
* Total: 4928 bytes

 ## After

`size_of::<SmallBoolTrie>()` is 32, which is added to
`t.r1.len() + t.r2.len() * 8`:

* `Cc_table`: 51
* `White_Space_table`: 273
* `Pattern_White_Space_table`: 193
* Total: 517 bytes

 ## Difference

Every Rust program with `std` statically linked should be about 4 KB smaller.

7 years agoAuto merge of #38782 - clarcharr:stupid, r=GuillaumeGomez
bors [Tue, 3 Jan 2017 02:21:00 +0000 (02:21 +0000)]
Auto merge of #38782 - clarcharr:stupid, r=GuillaumeGomez

Reword 'stupid' and 'crazy' in docs.

These terms are not very descriptive and are better reworded as something else.

7 years agoAdd regression test.
Jeffrey Seyfried [Tue, 3 Jan 2017 02:11:32 +0000 (02:11 +0000)]
Add regression test.

7 years agoFold all spans in the AST.
Jeffrey Seyfried [Tue, 3 Jan 2017 01:33:40 +0000 (01:33 +0000)]
Fold all spans in the AST.

7 years agoDon't warn about dead foreign items if the 'allow(dead_code)' attribute is present
Dylan McKay [Tue, 3 Jan 2017 01:54:15 +0000 (14:54 +1300)]
Don't warn about dead foreign items if the 'allow(dead_code)' attribute is present

This functionality was missing, and should have existed previously.

Fixes #38780

7 years agoReword 'stupid' and 'crazy' in docs.
Clar Charr [Mon, 2 Jan 2017 20:47:00 +0000 (15:47 -0500)]
Reword 'stupid' and 'crazy' in docs.

7 years agoAuto merge of #38543 - philipc:unsized-debuginfo, r=michaelwoerister
bors [Mon, 2 Jan 2017 20:17:01 +0000 (20:17 +0000)]
Auto merge of #38543 - philipc:unsized-debuginfo, r=michaelwoerister

Fix debuginfo for unsized struct members

The member was given the size of a fat pointer, which caused
llvm to emit DWARF attributes for a 128-bit bitfield.

7 years agorustc: Stabilize the `proc_macro` feature
Alex Crichton [Mon, 2 Jan 2017 00:14:35 +0000 (16:14 -0800)]
rustc: Stabilize the `proc_macro` feature

This commit stabilizes the `proc_macro` and `proc_macro_lib` features in the
compiler to stabilize the "Macros 1.1" feature of the language. Many more
details can be found on the tracking issue, #35900.

Closes #35900

7 years agoAuto merge of #38760 - est31:ignorecfg, r=sanxiyn
bors [Mon, 2 Jan 2017 18:10:37 +0000 (18:10 +0000)]
Auto merge of #38760 - est31:ignorecfg, r=sanxiyn

Fix pre-cfg_attr notation in comment

Commit aa3b1261b164eeac3e68573bfc698d1ca943fb05 has changed notation
in the test from `#[ignore(cfg(ignorecfg))]` to `#[cfg_attr(ignorecfg, ignore)]`,
but missed to change the comment in the accompanying Makefile.

7 years agoAuto merge of #38766 - eddyb:less-fake-hir, r=arielb1
bors [Mon, 2 Jan 2017 13:51:43 +0000 (13:51 +0000)]
Auto merge of #38766 - eddyb:less-fake-hir, r=arielb1

Stop creating fake HIR pattern nodes.

This replaces all the HIR patterns `rustc_const_eval` creates with the more appropriate HAIR equivalent.

The only place left that creates HIR nodes is the "explicit lifetimes in function signature" suggestion, which only creates type nodes while rebuilding the signature, but that is only in case of an error.

cc @arielb1

7 years agoRemove some dead Python code.
Simon Sapin [Mon, 2 Jan 2017 11:54:54 +0000 (12:54 +0100)]
Remove some dead Python code.

It was used to measure before/after size in cfaf66c94e29a38cd3264b4a55c85b90213543d9.

7 years agoAvoid rustdoc ICE when an unstable feature is used
Seo Sanghyeon [Mon, 2 Jan 2017 11:32:58 +0000 (20:32 +0900)]
Avoid rustdoc ICE when an unstable feature is used

7 years agoAdd PeekMut::pop
Steven Fackler [Sat, 31 Dec 2016 05:18:17 +0000 (21:18 -0800)]
Add PeekMut::pop

A fairly common workflow is to put a bunch of stuff into a binary heap
and then mutate the top value until its empty. This both makes that a
bit more convenient (no need to save a boolean off and pop after to
avoid borrowck issues), and a bit more efficient since you only shift
once.

7 years agoAuto merge of #38548 - GuillaumeGomez:thread_struct_docs, r=frewsxcv
bors [Sun, 1 Jan 2017 22:45:02 +0000 (22:45 +0000)]
Auto merge of #38548 - GuillaumeGomez:thread_struct_docs, r=frewsxcv

Add missing example for Thread struct

r? @frewsxcv

7 years agoAuto merge of #38765 - xen0n:i-dont-like-red-bots-2, r=alexcrichton
bors [Sun, 1 Jan 2017 20:43:21 +0000 (20:43 +0000)]
Auto merge of #38765 - xen0n:i-dont-like-red-bots-2, r=alexcrichton

rustbuild: fix dist-analysis with full bootstrap disabled

Really fixes #38734, per discussion in #38752 which was solving the underlying problem the wrong way.

This just mirrors the [similar logic] in documentation building as suggested, that just takes the stage1 compiler artifacts instead in case of non-full-bootstrap builds. Actually copying the artifacts around seems to be unnecessary.

r? @alexcrichton

[similar logic]: https://github.com/rust-lang/rust/blob/7b659cfdbce094a790dbb246da2681a47565782a/src/bootstrap/doc.rs#L140-L144

7 years agorustc_const_eval: convert constants to Pattern instead of hir::Pat.
Eduard-Mihai Burtescu [Sun, 1 Jan 2017 20:17:18 +0000 (22:17 +0200)]
rustc_const_eval: convert constants to Pattern instead of hir::Pat.

7 years agorustbuild: fix dist-analysis with full bootstrap disabled
Wang Xuerui [Sun, 1 Jan 2017 20:12:49 +0000 (04:12 +0800)]
rustbuild: fix dist-analysis with full bootstrap disabled

7 years agoFix pre-cfg_attr notation in comment
est31 [Sun, 1 Jan 2017 19:34:23 +0000 (20:34 +0100)]
Fix pre-cfg_attr notation in comment

Commit aa3b1261b164eeac3e68573bfc698d1ca943fb05 has changed notation
in the test from `#[ignore(cfg(ignorecfg))]` to `#[cfg_attr(ignorecfg, ignore)]`,
but missed to change the comment in the accompanying Makefile.

7 years agorustc_const_eval: build Pattern instead of hir::Pat for pretty-printing.
Eduard-Mihai Burtescu [Sun, 1 Jan 2017 18:57:21 +0000 (20:57 +0200)]
rustc_const_eval: build Pattern instead of hir::Pat for pretty-printing.

7 years agoAuto merge of #38692 - estebank:remove-try-from-pprust, r=petrochenkov
bors [Sun, 1 Jan 2017 18:42:34 +0000 (18:42 +0000)]
Auto merge of #38692 - estebank:remove-try-from-pprust, r=petrochenkov

Use `?` instead of `try!` macro in `print::pprust`

7 years agoAuto merge of #38753 - philipc:debuginfo-union, r=petrochenkov
bors [Sun, 1 Jan 2017 16:41:29 +0000 (16:41 +0000)]
Auto merge of #38753 - philipc:debuginfo-union, r=petrochenkov

Add pretty printing of unions in debuggers

Fixes #37479

7 years agoAuto merge of #38745 - CannedYerins:llvm-code-style, r=rkruppe
bors [Sun, 1 Jan 2017 11:58:02 +0000 (11:58 +0000)]
Auto merge of #38745 - CannedYerins:llvm-code-style, r=rkruppe

Improve naming style in rustllvm.

As per the LLVM style guide, use CamelCase for all locals and classes,
and camelCase for all non-FFI functions.
Also, make names of variables of commonly used types more consistent.

Fixes #38688.

r? @rkruppe

7 years agoAuto merge of #38726 - japaric:sparc64, r=sanxiyn
bors [Sun, 1 Jan 2017 09:56:18 +0000 (09:56 +0000)]
Auto merge of #38726 - japaric:sparc64, r=sanxiyn

sparc64-linux support

This is built on top of #38656 and depends on rust-lang/libc#483

Hello world works.

The libc-test test suite passes.

`panic!` doesn't fully work:

```
$ qemu-sparc64-static ./panic
thread 'main' panicked at 'explicit panic', panic.rs:1
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Illegal instruction (core dumped)
```

Backtraces don't work either, probably related to the previous point:

```
$ export RUST_BACKTRACE=1
$ qemu-sparc64-static ./panic
thread 'main' panicked at 'explicit panic', panic.rs:1
stack backtrace:
Illegal instruction (core dumped)
```

r? @alexcrichton

@jakllsch Does panicking / backtraces work on sparc64-netbsd?

cc @glaubitz

7 years agoAdd pretty printing of unions in debuggers
Philip Craig [Sun, 1 Jan 2017 07:46:15 +0000 (17:46 +1000)]
Add pretty printing of unions in debuggers

Fixes #37479

7 years agoAuto merge of #38711 - programble:doc/slice-iter-method-links, r=brson
bors [Sun, 1 Jan 2017 07:54:04 +0000 (07:54 +0000)]
Auto merge of #38711 - programble:doc/slice-iter-method-links, r=brson

Add links to methods on all slice iterator struct docs

In the same style as `std::slice::Iter` to help people find how to create iterators.

r? @steveklabnik

7 years agoAuto merge of #38713 - clarcharr:trusted_len, r=brson
bors [Sun, 1 Jan 2017 05:39:16 +0000 (05:39 +0000)]
Auto merge of #38713 - clarcharr:trusted_len, r=brson

TrustedLen for Empty and Once.

These implementations were missing, so, I went ahead and added them.

7 years agoMerge branch 'master' into sparc64
Seo Sanghyeon [Sun, 1 Jan 2017 03:40:10 +0000 (12:40 +0900)]
Merge branch 'master' into sparc64

7 years agoAuto merge of #38653 - Mark-Simulacrum:dropless-arena, r=eddyb
bors [Sun, 1 Jan 2017 02:39:40 +0000 (02:39 +0000)]
Auto merge of #38653 - Mark-Simulacrum:dropless-arena, r=eddyb

Add a DroplessArena and utilize it as a more efficient arena when possible

I will collect performance (probably just `-Ztime-passes`, and more if that shows significant differences, perhaps).

6feba98 also fixes a potential infinite loop if inplace reallocation failed for `TypedArena` (and `DroplessArena` via copied code).

r? @eddyb

7 years agoAuto merge of #38736 - xen0n:save-the-save-analysis, r=alexcrichton
bors [Sun, 1 Jan 2017 00:27:35 +0000 (00:27 +0000)]
Auto merge of #38736 - xen0n:save-the-save-analysis, r=alexcrichton

rustbuild: save the save analysis

Fixes #38734. ~~call me the nightly firefighter~~

r? @alexcrichton

7 years agoAuto merge of #38708 - alexcrichton:add-distcheck, r=brson
bors [Sat, 31 Dec 2016 22:08:32 +0000 (22:08 +0000)]
Auto merge of #38708 - alexcrichton:add-distcheck, r=brson

Gate on distcheck on Travis

This commit adds a new entry to the Travis matrix to gate on distcheck, the illustrious test process that has historically taken *8 hours* to complete and also breaks all the time on nightly. By adding it to Travis we should hope to never see nightly breakage (like https://github.com/rust-lang/rust/issues/38690) because of this ever again!

"But wait, surely we can't wait 8 hours for all PRs!" you might be thinking, and you are indeed correct. The distcheck added here is much more optimized for speed than the old buildbot instances for a number of reasons:

* We're not building *two host compilers* beforehand. The current distcheck bot does a cross for i686 Linux and x86_64 Linux before it actually runs distcheck, building 6 compilers and LLVM twice. None of this is done in parallel as well (e.g. `-j1`). Not doing any of this work will be a huge win!
* We're using sccache to compile LLVM, so it should be much faster. Distcheck on the bots didn't cache LLVM well and rebuilt it every time.

All in all, this version of "distcheck" should be exactly like other matrix entries that run tests except that it's a *little* slower to start as it has to create the source tarball then rebuild the build system in the distcheck dir. Overall this should be well under the 2 hours that Android is currently taking anyway.

Closes https://github.com/rust-lang/rust/issues/38691

7 years agoAuto merge of #38482 - est31:i128, r=eddyb
bors [Sat, 31 Dec 2016 18:54:31 +0000 (18:54 +0000)]
Auto merge of #38482 - est31:i128, r=eddyb

i128 and u128 support

Brings i128 and u128 support to nightly rust, behind a feature flag. The goal of this PR is to do the bulk of the work for 128 bit integer support. Smaller but just as tricky features needed for stabilisation like 128 bit enum discriminants are left for future PRs.

Rebased version of  #37900, which in turn was a rebase + improvement of #35954 . Sadly I couldn't reopen #37900 due to github. There goes my premium position in the homu queue...

[plugin-breaking-change]

cc #35118 (tracking issue)

7 years agoUtilize new in_arena method instead of hashing for Lifting interned items
Mark Simulacrum [Sat, 31 Dec 2016 15:38:27 +0000 (08:38 -0700)]
Utilize new in_arena method instead of hashing for Lifting interned items

7 years agoSplit CtxtArenas into GlobalArenas and CtxtInterners.
Mark Simulacrum [Sat, 24 Dec 2016 03:48:21 +0000 (20:48 -0700)]
Split CtxtArenas into GlobalArenas and CtxtInterners.

CtxtInterners contains a single DroplessArena, while GlobalArenas
contains the TypedArenas still required for the remaining
Drop-containing types.

7 years agoImprove naming style in rustllvm.
Ian Kerins [Sat, 31 Dec 2016 17:01:23 +0000 (12:01 -0500)]
Improve naming style in rustllvm.

As per the LLVM style guide, use CamelCase for all locals and classes,
and camelCase for all non-FFI functions.
Also, make names of variables of commonly used types more consistent.

Fixes #38688.

7 years agoFix iabs and add some more tests
est31 [Sat, 31 Dec 2016 17:16:55 +0000 (18:16 +0100)]
Fix iabs and add some more tests

7 years agoAuto merge of #38737 - keeperofdakeys:proc-macro-derive-Dec-16, r=jseyfried
bors [Sat, 31 Dec 2016 16:49:27 +0000 (16:49 +0000)]
Auto merge of #38737 - keeperofdakeys:proc-macro-derive-Dec-16, r=jseyfried

Fix panic when using a macros 1.1 custom derive on a struct containing a macro invocation

Fixes #38706

r? @jseyfried

7 years agoFix TypedArena infinitely looping when inplace reallocation fails.
Mark Simulacrum [Sat, 24 Dec 2016 03:47:47 +0000 (20:47 -0700)]
Fix TypedArena infinitely looping when inplace reallocation fails.