]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoRollup merge of #31055 - steveklabnik:alt-tags, r=alexcrichton
Steve Klabnik [Sat, 23 Jan 2016 14:38:42 +0000 (09:38 -0500)]
Rollup merge of #31055 - steveklabnik:alt-tags, r=alexcrichton

8 years agoRollup merge of #31054 - steveklabnik:a11y, r=alexcrichton
Steve Klabnik [Sat, 23 Jan 2016 14:38:42 +0000 (09:38 -0500)]
Rollup merge of #31054 - steveklabnik:a11y, r=alexcrichton

I've been interested in the accessibility of Rustdoc's output, but never did anything about it. Today, I ran a tool, and it suggested adjusting some colors.

Here's some screen shots. Before:
![2016-01-20-114944_443x199_scrot](https://cloud.githubusercontent.com/assets/27786/12455979/d84d7ae8-bf6b-11e5-9aea-0602fb1a8cfa.png)

After:

![2016-01-20-114516_453x204_scrot](https://cloud.githubusercontent.com/assets/27786/12455841/36a55d14-bf6b-11e5-8014-239594c12e46.png)

As you can see, the link text is just a _shade_ darker.

Browsable: http://www.steveklabnik.com/rust-a11y-doc-testing/doc/std/

8 years agoRollup merge of #31050 - apasel422:issue-31048, r=Manishearth
Steve Klabnik [Sat, 23 Jan 2016 14:38:42 +0000 (09:38 -0500)]
Rollup merge of #31050 - apasel422:issue-31048, r=Manishearth

Closes #31048

r? @Manishearth

8 years agoRollup merge of #31045 - Manishearth:diag-prim-shadow, r=steveklabnik
Steve Klabnik [Sat, 23 Jan 2016 14:38:42 +0000 (09:38 -0500)]
Rollup merge of #31045 - Manishearth:diag-prim-shadow, r=steveklabnik

I tried to add an inline `span_suggestion()` to the error as well, but since generics don't have their own span it becomes too fragile/complicated to work.

r? @steveklabnik

fixes #19477

8 years agoRollup merge of #31035 - nathankleyn:improve-visibility-of-entry-api, r=steveklabnik
Steve Klabnik [Sat, 23 Jan 2016 14:38:41 +0000 (09:38 -0500)]
Rollup merge of #31035 - nathankleyn:improve-visibility-of-entry-api, r=steveklabnik

Responding to [a thread of discussion on the Rust subreddit](https://www.reddit.com/r/rust/comments/3racik/mutable_lifetimes_are_too_long_when_matching_an/),
it was identified that the presence of the Entry API is not duly
publicised. This commit aims to add some reasonable examples of
common usages of this API to the main example secion of the `HashMap`
documentation.

This is part of issue #29348.

8 years agoRollup merge of #31031 - brson:issue-30123, r=nikomatsakis
Steve Klabnik [Sat, 23 Jan 2016 14:38:41 +0000 (09:38 -0500)]
Rollup merge of #31031 - brson:issue-30123, r=nikomatsakis

This was fixed in passing. Adding a regression test.

8 years agoRollup merge of #31019 - andreabedini:patch-1, r=alexcrichton
Steve Klabnik [Sat, 23 Jan 2016 14:38:41 +0000 (09:38 -0500)]
Rollup merge of #31019 - andreabedini:patch-1, r=alexcrichton

Documentation of `CStr::from_ptr` suggests using `str::from_utf8(slice.to_bytes()).unwrap()`
to obtain a `&str` but `CStr` has `CStr::to_str` that does exactly that.

(First PR, be nice :)

8 years agoRollup merge of #30997 - bluss:trait-default, r=nikomatsakis
Steve Klabnik [Sat, 23 Jan 2016 14:38:41 +0000 (09:38 -0500)]
Rollup merge of #30997 - bluss:trait-default, r=nikomatsakis

Fix type parameter default error to mention type and trait definitions

Introduced in PR #30724, needs to mention that type parameter defaults
are legal in trait and type definitions too.

8 years agoAuto merge of #31121 - Manishearth:prim-link, r=alexcrichton
bors [Sat, 23 Jan 2016 11:38:43 +0000 (11:38 +0000)]
Auto merge of #31121 - Manishearth:prim-link, r=alexcrichton

We currently nest `<a>` tags which is doubleplusungood. So, for example, `(u8, u8)` will show up
with the left paren linked to the tuple primitive page, and the right paren unlinked, which looks ugly.

8 years agoHandle generics in raw pointers
Manish Goregaokar [Sat, 23 Jan 2016 09:31:17 +0000 (15:01 +0530)]
Handle generics in raw pointers

8 years agoAuto merge of #30958 - dhodder:master, r=brson
bors [Sat, 23 Jan 2016 09:49:34 +0000 (09:49 +0000)]
Auto merge of #30958 - dhodder:master, r=brson

The COPYRIGHT file should be updated to note that Rust no longer ships with AUTHORS.txt.

    $ git log -1 -- AUTHORS.txt
    commit 402749c539edcbc2d850ac3a782cace8661c68e6
    Author: Brian Anderson <banderson@mozilla.com>
    Date:   Wed Dec 2 22:16:08 2015 +0000

        Remove AUTHORS.txt and add-authors.sh

        Keeping this file up to date requires hours of work every release,
        even with the script. It is a fool's errand and we shall not do it
        any longer.

8 years agoAuto merge of #30807 - kolloch:patch-1, r=steveklabnik
bors [Sat, 23 Jan 2016 07:44:17 +0000 (07:44 +0000)]
Auto merge of #30807 - kolloch:patch-1, r=steveklabnik

When I read the book, the following sentence of the reference documentation helped me greatly to understand slices:

"Slices are a view into a block of memory represented as a pointer and a length."

In this commit, I tried to integrate the gist of that into the slice section inside of "primitive-types.md". I am not a native speaker, so feel very free to improve the wording.

r? @steveklabnik

8 years agoAuto merge of #31126 - arielb1:remote-errors, r=eddyb
bors [Sat, 23 Jan 2016 05:54:38 +0000 (05:54 +0000)]
Auto merge of #31126 - arielb1:remote-errors, r=eddyb

Also removed an unused and similarly buggy error path.

Fixes #30535

r? @eddyb

8 years agoAuto merge of #31124 - dirk:dirk/display-and-error-impls-for-string-parse-error,...
bors [Sat, 23 Jan 2016 04:04:26 +0000 (04:04 +0000)]
Auto merge of #31124 - dirk:dirk/display-and-error-impls-for-string-parse-error, r=alexcrichton

Fixes #31106.

- [ ] I wasn't sure of the correct `#[stable(...)]` definition to use here. Happy to fix it if it's incorrect.
- [ ] `ParseError` is sort of an ephemeral non-error, but do let me know if the implementation of `error::Error` for it should return something more descriptive than "parse error".

8 years agoAuto merge of #31116 - bluss:expect-out-cold, r=alexcrichton
bors [Sat, 23 Jan 2016 00:33:23 +0000 (00:33 +0000)]
Auto merge of #31116 - bluss:expect-out-cold, r=alexcrichton

Use cold functions for panic formatting Option::expect, Result::unwrap, expect

These methods are marked inline, but insert a big chunk of formatting
code, as well as other error path related code, such as
deallocating a std::io::Error if you have one.

We can explicitly separate out that code path into a function that is
never inline, since the panicking case should always be rare.

8 years agoAuto merge of #31104 - nrc:save-fix-variant-data, r=alexcrichton
bors [Fri, 22 Jan 2016 22:42:33 +0000 (22:42 +0000)]
Auto merge of #31104 - nrc:save-fix-variant-data, r=alexcrichton

8 years agoAuto merge of #31095 - alexcrichton:remove-old-files, r=brson
bors [Fri, 22 Jan 2016 20:51:38 +0000 (20:51 +0000)]
Auto merge of #31095 - alexcrichton:remove-old-files, r=brson

These are either not used at all today or they're super old and haven't been used in ages, so clean them out.

8 years agoSimplify return for error::Error impl for string::ParseError
Dirk Gadsden [Fri, 22 Jan 2016 19:34:39 +0000 (14:34 -0500)]
Simplify return for error::Error impl for string::ParseError

8 years agoastconv: don't use as_local_node_id for ids in a Def
Ariel Ben-Yehuda [Fri, 22 Jan 2016 19:23:51 +0000 (21:23 +0200)]
astconv: don't use as_local_node_id for ids in a Def

Fixes #30535

8 years agoImplement error::Error and fmt::Display for string::ParseError
Dirk Gadsden [Fri, 22 Jan 2016 18:38:28 +0000 (13:38 -0500)]
Implement error::Error and fmt::Display for string::ParseError

Fixes #31106.

8 years agoAuto merge of #30917 - arthurprs:bs_bounds_check, r=alexcrichton
bors [Fri, 22 Jan 2016 19:00:15 +0000 (19:00 +0000)]
Auto merge of #30917 - arthurprs:bs_bounds_check, r=alexcrichton

Avoid bounds checking for binary search. All calculated indexes are safe and the branch is useless.

8 years agoMove cold panic functions in Option and Result
Ulrik Sverdrup [Fri, 22 Jan 2016 17:19:00 +0000 (18:19 +0100)]
Move cold panic functions in Option and Result

Move functions out of their impl blocks; avoids unnecessary
monomorphization by type parameters that are irrelevant to the message
output.

8 years agoUse cold functions for panic formatting Option::expect, Result::unwrap etc
Ulrik Sverdrup [Fri, 22 Jan 2016 16:06:34 +0000 (17:06 +0100)]
Use cold functions for panic formatting Option::expect, Result::unwrap etc

Option::expect, Result::unwrap, unwrap_err, expect

These methods are marked inline, but insert a big chunk of formatting
code, as well as other error path related code, such as deallocating
a std::io::Error if you have one.

We can explicitly separate out that code path into a function that is
never inline, since the panicking case should always be rare.

8 years agoCorrectly output links for primitive types which enclose their contents
Manish Goregaokar [Fri, 22 Jan 2016 17:45:47 +0000 (23:15 +0530)]
Correctly output links for primitive types which enclose their contents

8 years agoAuto merge of #31087 - nikomatsakis:incr-comp-fulfillment-cache, r=arielb1
bors [Fri, 22 Jan 2016 17:09:37 +0000 (17:09 +0000)]
Auto merge of #31087 - nikomatsakis:incr-comp-fulfillment-cache, r=arielb1

This is a fix for #30741. It simplifies dep-graph tracking for trait matching. I was experimenting with having a greater resolution here, but decided to pare back to just have one dep node for "trait resolutions on trait `Foo`", which means that adding an impl to the trait `Foo` will invalidate all fns that had to do any trait matching at all on `Foo`. This seems like a reasonable starting place.

Independently, I realized I had neglected to record a dependency from trans on typeck -- this is obviously needed, since trans consumes a bunch of data structures that typeck produces (but which are not currently individually tracked) -- and because trans assumes that typeck has been done. Eventually those are going to go away and be replaced with MIR, which will be tracked, so this edge would presumably be derived automatically then, but it's an obvious enough thing to want for now.

r? @arielb1

cc @michaelwoerister -- this might indirectly fix the problem you observed with the trans cache, though it'd be nice to try and craft an independent test case for that.

8 years agoAvoid bounds check for slice binary search
arthurprs [Thu, 14 Jan 2016 20:05:00 +0000 (18:05 -0200)]
Avoid bounds check for slice binary search

8 years agoAuto merge of #31084 - ranma42:cmd-no-unsafe, r=alexcrichton
bors [Fri, 22 Jan 2016 15:18:10 +0000 (15:18 +0000)]
Auto merge of #31084 - ranma42:cmd-no-unsafe, r=alexcrichton

Instead of transmuting, use a match; the compiler has learnt how to
optimize it.

8 years agoAuto merge of #31080 - dhuseby:updating_libc_dep, r=alexcrichton
bors [Fri, 22 Jan 2016 13:27:22 +0000 (13:27 +0000)]
Auto merge of #31080 - dhuseby:updating_libc_dep, r=alexcrichton

this pulls in a fix for the missing O_ACCMODE that was breaking the bsd builds.

8 years agoAuto merge of #31077 - nagisa:mir-temp-promotion, r=dotdash
bors [Fri, 22 Jan 2016 11:36:50 +0000 (11:36 +0000)]
Auto merge of #31077 - nagisa:mir-temp-promotion, r=dotdash

Fixes #31002

r? @nikomatsakis

8 years agoAuto merge of #31074 - gmbonnet:stage0-libdir, r=alexcrichton
bors [Fri, 22 Jan 2016 09:46:17 +0000 (09:46 +0000)]
Auto merge of #31074 - gmbonnet:stage0-libdir, r=alexcrichton

This fixes #27254.

On a 64-bit Linux machine, for example, `configure --libdir=/usr/local/lib64` was creating both `x86_64-unknown-linux-gnu/stage0/lib/rustlib` and `x86_64-unknown-linux-gnu/stage0/lib64/rustlib`. Crates from the stage0 snapshot, like `libcore`, are extracted to `x86_64-unknown-linux-gnu/stage0/lib/rustlib`, but the stage0 compiler was attempting to find them in `x86_64-unknown-linux-gnu/stage0/lib64/rustlib`, which has the highest priority on a 64-bit system.

The issue can be fixed by creating only `x86_64-unknown-linux-gnu/stage0/lib/rustlib`, since this is the only rustlib directory needed for stage0 anyways.

8 years agoAuto merge of #31072 - arielb1:method-callee-cleanup, r=michaelwoerister
bors [Fri, 22 Jan 2016 07:55:13 +0000 (07:55 +0000)]
Auto merge of #31072 - arielb1:method-callee-cleanup, r=michaelwoerister

The old code was terribly ugly and was duplicated in several places.

r? @michaelwoerister

8 years agoAuto merge of #31070 - sfackler:bufreader-box-slice, r=alexcrichton
bors [Fri, 22 Jan 2016 06:04:50 +0000 (06:04 +0000)]
Auto merge of #31070 - sfackler:bufreader-box-slice, r=alexcrichton

Saves a word, and also prevents the impl from accidentally changing the
buffer length.

r? @alexcrichton

8 years agosave-analysis: emit the right kind of variant
Nick Cameron [Fri, 22 Jan 2016 05:53:23 +0000 (18:53 +1300)]
save-analysis: emit the right kind of variant

8 years agoAuto merge of #31068 - sfackler:bufwriter-panic, r=alexcrichton
bors [Fri, 22 Jan 2016 04:13:26 +0000 (04:13 +0000)]
Auto merge of #31068 - sfackler:bufwriter-panic, r=alexcrichton

We don't want to write the same data twice.

Closes #30888

r? @alexcrichton

8 years agoAuto merge of #31064 - retep998:msvc-host-dlls, r=alexcrichton
bors [Fri, 22 Jan 2016 02:22:54 +0000 (02:22 +0000)]
Auto merge of #31064 - retep998:msvc-host-dlls, r=alexcrichton

Fixes https://github.com/rust-lang/rust/issues/31063

r? @alexcrichton

8 years agoAuto merge of #30944 - fhahn:issue-29789-use-constant2, r=nagisa
bors [Fri, 22 Jan 2016 00:31:29 +0000 (00:31 +0000)]
Auto merge of #30944 - fhahn:issue-29789-use-constant2, r=nagisa

This PR for  #29789 uses `rustc::repr::mir::Constant` in `ExprKind::Repeat`, which seems to fit quite nicely. Is there a reason for not re-using that type?

8 years agoetc: Remove old num/libc generation code
Alex Crichton [Thu, 21 Jan 2016 22:48:18 +0000 (14:48 -0800)]
etc: Remove old num/libc generation code

8 years agoetc: Remove the mingw-fix-include directory
Alex Crichton [Thu, 21 Jan 2016 22:47:03 +0000 (14:47 -0800)]
etc: Remove the mingw-fix-include directory

This isn't used anywhere

8 years agoetc: Remove old mklldef.py script
Alex Crichton [Thu, 21 Jan 2016 22:45:53 +0000 (14:45 -0800)]
etc: Remove old mklldef.py script

The compiler has since gained better support for this, so the script is no
longer necessary

8 years agomk: Remove all perf-related targets
Alex Crichton [Thu, 21 Jan 2016 22:45:23 +0000 (14:45 -0800)]
mk: Remove all perf-related targets

I don't believe these have been used at all recently, and I doubt many of them
still work, so remove the stale support.

8 years agoAuto merge of #30882 - petrochenkov:varnamesp, r=nrc
bors [Thu, 21 Jan 2016 22:41:37 +0000 (22:41 +0000)]
Auto merge of #30882 - petrochenkov:varnamesp, r=nrc

Tuple and unit variants from other crates weren't put into type namespace.
Now variant namespacing is aligned with struct namespacing and is not affected by the variant's crate of origin (struct -> type, tuple/unit -> type/value).
Additionally, struct variants from other crates are put into value namespace (struct variants from local crate were already in it). This is not a necessity, but a future proofing measure.

This fix can result in some new shadowing errors in cross-crate scenarios, crater reports [three regressions](https://github.com/rust-lang/rust/pull/30882#issuecomment-172369883).
[breaking-change]

8 years agoAdd Debug impl and erase region for TypedConstVal
Florian Hahn [Thu, 21 Jan 2016 21:49:26 +0000 (22:49 +0100)]
Add Debug impl and erase region for TypedConstVal

8 years agoIntroduce and use TypedConstVal for Repeat
Florian Hahn [Wed, 20 Jan 2016 22:14:00 +0000 (23:14 +0100)]
Introduce and use TypedConstVal for Repeat

8 years ago[MIR] use mir::repr::Constant in ExprKind::Repeat, close #29789
Florian Hahn [Fri, 15 Jan 2016 21:44:53 +0000 (22:44 +0100)]
[MIR] use mir::repr::Constant in ExprKind::Repeat, close #29789

8 years agoAuto merge of #31052 - bluss:split-at-mut-str, r=alexcrichton
bors [Thu, 21 Jan 2016 20:51:34 +0000 (20:51 +0000)]
Auto merge of #31052 - bluss:split-at-mut-str, r=alexcrichton

Use raw pointers to avoid aliasing in str::split_at_mut

Introduce private function  from_raw_parts_mut for str to factor out the logic.

We want to use raw pointers here instead of duplicating a &mut str, to
be on safer ground w.r.t rust aliasing rules.

This has already been fixed for slices in PR #27358, issue #27357

8 years agoresolve: Fix variant namespacing
Vadim Petrochenkov [Thu, 21 Jan 2016 20:22:01 +0000 (23:22 +0300)]
resolve: Fix variant namespacing

8 years agoadd fixme
Ariel Ben-Yehuda [Thu, 21 Jan 2016 20:07:15 +0000 (22:07 +0200)]
add fixme

8 years agoRemove `unsafe` code from `core::cmp`
Andrea Canciani [Thu, 21 Jan 2016 19:20:22 +0000 (20:20 +0100)]
Remove `unsafe` code from `core::cmp`

Instead of transmuting, use a match; the compiler has learnt how to
optimize it.

8 years agoIndicate that trans is always dependent on typeck
Niko Matsakis [Thu, 21 Jan 2016 19:24:01 +0000 (14:24 -0500)]
Indicate that trans is always dependent on typeck

8 years agoRevamp the fulfillment cache tracking to only cache trait-refs, which
Niko Matsakis [Wed, 20 Jan 2016 21:56:29 +0000 (16:56 -0500)]
Revamp the fulfillment cache tracking to only cache trait-refs, which
was the major use-case, and to update the dep-graph. Other kinds of
predicates are now excluded from the cache because there is no easy way
to make a good dep-graph node for them, and because they are not
believed to be that useful. :)

Fixes #30741. (However, the test still gives wrong result for trans,
for an independent reason which is fixed in the next commit.)

8 years agoAuto merge of #31028 - erickt:ast-json, r=michaelwoerister
bors [Thu, 21 Jan 2016 19:01:24 +0000 (19:01 +0000)]
Auto merge of #31028 - erickt:ast-json, r=michaelwoerister

The protocol for `serialize::{En,De}code` doesn't allow for two integers to be serialized next to each other.

Closes #31025.

cc @michaelwoerister

8 years agoupdating the libc dependency to pull in build breaker fixes
Dave Huseby [Thu, 21 Jan 2016 18:05:27 +0000 (10:05 -0800)]
updating the libc dependency to pull in build breaker fixes

8 years agoAuto merge of #31043 - shahn:arc_weak, r=alexcrichton
bors [Thu, 21 Jan 2016 17:11:13 +0000 (17:11 +0000)]
Auto merge of #31043 - shahn:arc_weak, r=alexcrichton

This was accidentally introduced in
7e2ffc7090a70fe8c77a0e03fcec3cb1387141f2,
b44ee371b8beea77aa1364460acbba14a8516559 and
36ba96ea3cfef575ddc5eea7754a1b70b50e2080.

8 years ago[MIR] Promote temps to alloca on multi-assignment
Simonas Kazlauskas [Thu, 21 Jan 2016 16:57:43 +0000 (18:57 +0200)]
[MIR] Promote temps to alloca on multi-assignment

Fixes #31002

8 years agoAuto merge of #31024 - oli-obk:move_checks_out_of_librustc, r=arielb1
bors [Thu, 21 Jan 2016 15:21:09 +0000 (15:21 +0000)]
Auto merge of #31024 - oli-obk:move_checks_out_of_librustc, r=arielb1

-    check_const
-    check_static_recursion
-    check_loop
-    check_rvalues

r? @arielb1

8 years agocore: Use raw pointers to avoid aliasing in str::split_at_mut
Ulrik Sverdrup [Wed, 20 Jan 2016 16:18:54 +0000 (17:18 +0100)]
core: Use raw pointers to avoid aliasing in str::split_at_mut

Introduce private function from_raw_parts_mut for str to factor out the logic.

We want to use raw pointers here instead of duplicating a &mut str, to
be on safer ground w.r.t rust aliasing rules.

8 years agoAuto merge of #31057 - bluss:memrchr-fallback, r=alexcrichton
bors [Thu, 21 Jan 2016 13:31:43 +0000 (13:31 +0000)]
Auto merge of #31057 - bluss:memrchr-fallback, r=alexcrichton

Use the fallback impl for memrchr on non-linux

The memrchr code was never used(!). This brings the memrchr improvements to
non-linux platforms (LineWriter / buffered stdout benefits).

Previous PR #30381

8 years agoclean up trans_static_method_callee and friends
Ariel Ben-Yehuda [Thu, 21 Jan 2016 12:26:35 +0000 (14:26 +0200)]
clean up trans_static_method_callee and friends

8 years agoconfigure: Do not generate two stage0 rustlib dirs when --libdir is set
Guillaume Bonnet [Thu, 21 Jan 2016 12:08:17 +0000 (13:08 +0100)]
configure: Do not generate two stage0 rustlib dirs when --libdir is set

8 years agomove more checks out of librustc
Oliver Schneider [Thu, 21 Jan 2016 09:52:37 +0000 (10:52 +0100)]
move more checks out of librustc

8 years agoAuto merge of #29520 - retep998:staticlib-naming-fiasco, r=alexcrichton
bors [Thu, 21 Jan 2016 09:02:48 +0000 (09:02 +0000)]
Auto merge of #29520 - retep998:staticlib-naming-fiasco, r=alexcrichton

I'm not sure if this was the best way to go about it, but it seems to work.

Fixes https://github.com/rust-lang/rust/issues/29508

r? @alexcrichton

8 years agoAuto merge of #31042 - shahn:weak_annotations, r=alexcrichton
bors [Thu, 21 Jan 2016 07:13:16 +0000 (07:13 +0000)]
Auto merge of #31042 - shahn:weak_annotations, r=alexcrichton

This was accidentally introduced in
7e2ffc7090a70fe8c77a0e03fcec3cb1387141f2.

8 years agoUse a Box<[u8]> in BufReader
Steven Fackler [Thu, 21 Jan 2016 06:40:25 +0000 (22:40 -0800)]
Use a Box<[u8]> in BufReader

Saves a word, and also prevents the impl from accidentally changing the
buffer length.

8 years agoDon't flush in BufWriter destructor after a panic in write
Steven Fackler [Thu, 21 Jan 2016 04:32:14 +0000 (20:32 -0800)]
Don't flush in BufWriter destructor after a panic in write

We don't want to write the same data twice.

Closes #30888

8 years agoAuto merge of #31041 - brson:version, r=alexcrichton
bors [Thu, 21 Jan 2016 05:23:27 +0000 (05:23 +0000)]
Auto merge of #31041 - brson:version, r=alexcrichton

8 years agoAuto merge of #31037 - nrc:cached-ids, r=nikomatsakis
bors [Thu, 21 Jan 2016 03:33:30 +0000 (03:33 +0000)]
Auto merge of #31037 - nrc:cached-ids, r=nikomatsakis

Blocks #30884

r? @nikomatsakis

cc @durka

8 years agoAdd host toolchain DLLs to PATH when executing link.exe
Peter Atashian [Thu, 21 Jan 2016 02:01:56 +0000 (21:01 -0500)]
Add host toolchain DLLs to PATH when executing link.exe
Fixes https://github.com/rust-lang/rust/issues/31063

Signed-off-by: Peter Atashian <retep998@gmail.com>
8 years agoAuto merge of #31010 - petrochenkov:def, r=arielb1
bors [Thu, 21 Jan 2016 01:43:18 +0000 (01:43 +0000)]
Auto merge of #31010 - petrochenkov:def, r=arielb1

All structs and their constructors are defined as `DefStruct`.
`DefTy` is splitted into `DefEnum` and `DefTyAlias`.
Ad hoc flag `bool is_structure` is removed from `DefVariant`, it was required in one place in resolve and could be obtained by other means.
Flag `bool is_ctor` is removed from `DefFn`, it wasn't really used for constructors outside of metadata decoding.

Observable effects:
More specific error messages are selected in some cases.
Two name resolution bugs fixed (https://github.com/rust-lang/rust/issues/30992 and FIXME in compile-fail/empty-struct-braces-expr.rs).

Fixes https://github.com/rust-lang/rust/issues/30992
Closes https://github.com/rust-lang/rust/issues/30361

8 years agoAuto merge of #30982 - KiChjang:zst-collections-tests, r=bluss
bors [Wed, 20 Jan 2016 23:53:24 +0000 (23:53 +0000)]
Auto merge of #30982 - KiChjang:zst-collections-tests, r=bluss

Fixes #28518.

8 years agoAuto merge of #30945 - nagisa:mir-optional-block-dest, r=nikomatsakis
bors [Wed, 20 Jan 2016 22:03:33 +0000 (22:03 +0000)]
Auto merge of #30945 - nagisa:mir-optional-block-dest, r=nikomatsakis

As an attempt to make loop body destination be optional, author implemented a pretty self contained
change and deemed it to be (much) uglier than the alternative of just keeping the unit temporary.
Having the temporary created lazily also has a nice property of not figuring in the MIR of
functions which do not use loops of any sort.

r? @nikomatsakis

8 years agoAuto merge of #30985 - alexcrichton:downgrade-jemaloc, r=brson
bors [Wed, 20 Jan 2016 20:14:18 +0000 (20:14 +0000)]
Auto merge of #30985 - alexcrichton:downgrade-jemaloc, r=brson

We've been seeing a lot of timeouts in tests on the bots and investigation ended
pointing to jemalloc/jemalloc#315 as the culprit. Unfortunately it looks like
that doesn't seem to have a fix on the way soon, so let's temporarily downgrade
back to the previous version of jemalloc we were using (where #30434 was the
most recent upgrade)

8 years agoRename Def's variants and don't reexport them
Vadim Petrochenkov [Wed, 20 Jan 2016 19:31:10 +0000 (22:31 +0300)]
Rename Def's variants and don't reexport them

8 years agoFix associated const resolution on structs
Vadim Petrochenkov [Wed, 20 Jan 2016 18:08:50 +0000 (21:08 +0300)]
Fix associated const resolution on structs

8 years agoRefactor definitions of ADTs in rustc::middle::def
Vadim Petrochenkov [Sun, 17 Jan 2016 19:57:54 +0000 (22:57 +0300)]
Refactor definitions of ADTs in rustc::middle::def

8 years agosyntax: Fix encoding and decoding spans
Erick Tryzelaar [Wed, 20 Jan 2016 18:04:31 +0000 (10:04 -0800)]
syntax: Fix encoding and decoding spans

The protocol for `serialize::{En,De}code` doesn't allow for two
integers to be serialized next to each other. This switches the
protocol to serializing `Span`s as a struct. rbml structs don't
have any overhead, so the metadata shouldn't increase in size,
but it allows the json format to be properly generated, albeit
slightly more heavy than when it was just serializing a span as
a u64.

Closes #31025.

s

8 years agoDowngrade bundled jemalloc version
Alex Crichton [Sun, 17 Jan 2016 19:06:39 +0000 (11:06 -0800)]
Downgrade bundled jemalloc version

We've been seeing a lot of timeouts in tests on the bots and investigation ended
pointing to jemalloc/jemalloc#315 as the culprit. Unfortunately it looks like
that doesn't seem to have a fix on the way soon, so let's temporarily downgrade
back to the previous version of jemalloc we were using (where #30434 was the
most recent upgrade)

8 years agotweak trait css
Steve Klabnik [Wed, 20 Jan 2016 17:34:07 +0000 (12:34 -0500)]
tweak trait css

8 years agotweak struct colors
Steve Klabnik [Wed, 20 Jan 2016 17:26:33 +0000 (12:26 -0500)]
tweak struct colors

8 years agoAuto merge of #30872 - pitdicker:expand_open_options, r=alexcrichton
bors [Wed, 20 Jan 2016 17:19:21 +0000 (17:19 +0000)]
Auto merge of #30872 - pitdicker:expand_open_options, r=alexcrichton

Tracking issue: #30014

This implements the RFC and makes a few other changes.
I have added a few extra tests, and made the Windows and
Unix code as similar as possible.

Part of the RFC mentions the unstable OpenOptionsExt trait
on Windows (see #27720). I have added a few extra methods
to future-proof it for CreateFile2.

8 years agostd: Use the fallback impl for memrchr on non-linux
Ulrik Sverdrup [Wed, 20 Jan 2016 16:59:32 +0000 (17:59 +0100)]
std: Use the fallback impl for memrchr on non-linux

This code was never used(!). This brings the memrchr improvements to
non-linux platforms (LineWriter / buffered stdout benefits).

8 years agoAdd alt tags for logos
Steve Klabnik [Wed, 20 Jan 2016 16:53:20 +0000 (11:53 -0500)]
Add alt tags for logos

8 years agotweak colors for a11y
Steve Klabnik [Wed, 20 Jan 2016 16:40:25 +0000 (11:40 -0500)]
tweak colors for a11y

8 years agoAdd tests for collections to work with ZSTs
Keith Yeung [Sun, 17 Jan 2016 17:26:01 +0000 (12:26 -0500)]
Add tests for collections to work with ZSTs

8 years agoCorrect code in E0382 explanation
Andrew Paseltiner [Wed, 20 Jan 2016 15:21:38 +0000 (10:21 -0500)]
Correct code in E0382 explanation

Closes #31048

8 years agoAdd tests for various diverging & converging loops
Simonas Kazlauskas [Tue, 19 Jan 2016 21:35:32 +0000 (23:35 +0200)]
Add tests for various diverging & converging loops

Mostly testing borrowck and typeck behaviour in presence of `loop` expression

8 years agoImprove E0317 long diagnostics
Manish Goregaokar [Wed, 20 Jan 2016 10:44:42 +0000 (16:14 +0530)]
Improve E0317 long diagnostics

8 years agoAuto merge of #31038 - gereeter:btree-panic, r=Gankro
bors [Wed, 20 Jan 2016 08:18:16 +0000 (08:18 +0000)]
Auto merge of #31038 - gereeter:btree-panic, r=Gankro

…ving elements into it.

Fixes #31029.

8 years agoRemove raw pointer from OpenOptions struct
Paul Dicker [Wed, 20 Jan 2016 07:41:20 +0000 (08:41 +0100)]
Remove raw pointer from OpenOptions struct
Otherwise it is not Send and Sync anymore

8 years agoFix incorrect stability annotations for arc::Weak
Sebastian Hahn [Wed, 20 Jan 2016 05:48:11 +0000 (06:48 +0100)]
Fix incorrect stability annotations for arc::Weak

This was accidentally introduced in
7e2ffc7090a70fe8c77a0e03fcec3cb1387141f2,
b44ee371b8beea77aa1364460acbba14a8516559 and
36ba96ea3cfef575ddc5eea7754a1b70b50e2080.

8 years agoFix incorrect stability annotations for Weak
Sebastian Hahn [Wed, 20 Jan 2016 04:52:05 +0000 (05:52 +0100)]
Fix incorrect stability annotations for Weak

This was accidentally introduced in
7e2ffc7090a70fe8c77a0e03fcec3cb1387141f2.

8 years agoBump version to 1.8
Brian Anderson [Wed, 20 Jan 2016 03:39:19 +0000 (03:39 +0000)]
Bump version to 1.8

8 years agoAuto merge of #30894 - antrik:debug-mpsc, r=brson
bors [Wed, 20 Jan 2016 03:28:54 +0000 (03:28 +0000)]
Auto merge of #30894 - antrik:debug-mpsc, r=brson

Minimal fix for https://github.com/rust-lang/rust/issues/30563

This covers all the public structs I think; except for Iter and
IntoIter, which I don't know if or how they should be handled.

8 years agoIn BTreeMap's merge function, adjust the length of the node before moving elements...
Jonathan S [Wed, 20 Jan 2016 03:07:36 +0000 (21:07 -0600)]
In BTreeMap's merge function, adjust the length of the node before moving elements into it.

8 years agoFix a bug with caching ids in the HIR lowering with nested lowered nodes
Nick Cameron [Wed, 20 Jan 2016 02:34:52 +0000 (15:34 +1300)]
Fix a bug with caching ids in the HIR lowering with nested lowered nodes

Blocks #30884

8 years agoRemove leftover import of `std::str` in doc test
Andrea Bedini [Tue, 19 Jan 2016 23:38:29 +0000 (10:38 +1100)]
Remove leftover import of `std::str` in doc test

8 years agoAuto merge of #30820 - oli-obk:docs/wrapping_ops, r=alexcrichton
bors [Tue, 19 Jan 2016 23:08:25 +0000 (23:08 +0000)]
Auto merge of #30820 - oli-obk:docs/wrapping_ops, r=alexcrichton

r? @steveklabnik

8 years agoAdd examples of the Entry API to the HashMap documentation.
Nathan Kleyn [Tue, 19 Jan 2016 21:54:11 +0000 (21:54 +0000)]
Add examples of the Entry API to the HashMap documentation.

Responding to [a thread of discussion on the Rust
subreddit](https://www.reddit.com/r/rust/comments/3racik/mutable_lifetimes_are_too_long_when_matching_an/),
it was identified that the presence of the Entry API is not duly
publicised. This commit aims to add some reasonable examples of
common usages of this API to the main example secion of the `HashMap`
documentation.

This is part of issue #29348.

8 years agoremove the `SimplifiedType` from the `DepNode` for now, just to keep
Niko Matsakis [Tue, 19 Jan 2016 21:36:13 +0000 (16:36 -0500)]
remove the `SimplifiedType` from the `DepNode` for now, just to keep
size of `DepNode` smaller and because we are not that fine-grained yet
anyhow

8 years ago[MIR] Reintroduce the unit temporary
Simonas Kazlauskas [Fri, 15 Jan 2016 22:36:32 +0000 (00:36 +0200)]
[MIR] Reintroduce the unit temporary

An attempt to make loop body destination be optional, author implemented a pretty self contained
change and deemed it to be (much) uglier than the alternative of just keeping the unit temporary.
Having the temporary created lazily also has a nice property of not figuring in the MIR of
functions which do not use loops of any sort.

8 years agoAdd test for #30123
Brian Anderson [Tue, 19 Jan 2016 20:48:11 +0000 (20:48 +0000)]
Add test for #30123