]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoRollup merge of #42211 - aidanhs:aphs-llvm-clone-hacks, r=Mark-Simulacrum
Mark Simulacrum [Thu, 25 May 2017 01:50:11 +0000 (19:50 -0600)]
Rollup merge of #42211 - aidanhs:aphs-llvm-clone-hacks, r=Mark-Simulacrum

Hack around abysmally slow llvm clones

r? @Mark-Simulacrum

(don't r+ yet, let's see what travis says)

7 years agoRollup merge of #42198 - GuillaumeGomez:os-str-doc, r=QuietMisdreavus
Mark Simulacrum [Thu, 25 May 2017 01:50:10 +0000 (19:50 -0600)]
Rollup merge of #42198 - GuillaumeGomez:os-str-doc, r=QuietMisdreavus

Add missing urls for OsStr docs

r? @rust-lang/docs

7 years agoRollup merge of #42195 - SamWhited:fix_broken_link, r=steveklabnik
Mark Simulacrum [Thu, 25 May 2017 01:50:09 +0000 (19:50 -0600)]
Rollup merge of #42195 - SamWhited:fix_broken_link, r=steveklabnik

fix broken link to nomicon in Unsize docs

Add a missing link that is currently broken in the docs (see the last sentence of https://doc.rust-lang.org/std/marker/trait.Unsize.html)

7 years agoRollup merge of #42191 - alexcrichton:update-cargo, r=Mark-Simulacrum
Mark Simulacrum [Thu, 25 May 2017 01:50:09 +0000 (19:50 -0600)]
Rollup merge of #42191 - alexcrichton:update-cargo, r=Mark-Simulacrum

Update Cargo submodule

Contains a fix for rust-lang/cargo#4081

7 years agoRollup merge of #42186 - devurandom:fix/bootstrap-verbose, r=alexcrichton
Mark Simulacrum [Thu, 25 May 2017 01:50:08 +0000 (19:50 -0600)]
Rollup merge of #42186 - devurandom:fix/bootstrap-verbose, r=alexcrichton

bootstrap: Make bootstrap verbose if requested

Fixes: #42099
7 years agoRollup merge of #42177 - est31:master, r=Mark-Simulacrum
Mark Simulacrum [Thu, 25 May 2017 01:50:07 +0000 (19:50 -0600)]
Rollup merge of #42177 - est31:master, r=Mark-Simulacrum

Remove some needless // gate-test- comments

Also, add detection to treat such comments as tidy errors.
We also remove the found_lib_feature code because it
was just repeating the found_feature code. Originally it
was intended to allow for gate-test lines for
lib features, but apparently nobody missed it.

7 years agoRollup merge of #42159 - Havvy:doc-drop, r=steveklabnik
Mark Simulacrum [Thu, 25 May 2017 01:50:06 +0000 (19:50 -0600)]
Rollup merge of #42159 - Havvy:doc-drop, r=steveklabnik

Document drop more.

Adds two examples to Drop and describes the recursive drop on types that contain fields.

7 years agoRollup merge of #42150 - citizen428:feature/error-count-messages, r=Mark-Simulacrum
Mark Simulacrum [Thu, 25 May 2017 01:50:05 +0000 (19:50 -0600)]
Rollup merge of #42150 - citizen428:feature/error-count-messages, r=Mark-Simulacrum

Change error count messages

See #33525 for details. r? @Mark-Simulacrum

7 years agoRollup merge of #42149 - dvyukov:license, r=brson
Mark Simulacrum [Thu, 25 May 2017 01:50:04 +0000 (19:50 -0600)]
Rollup merge of #42149 - dvyukov:license, r=brson

libstd/sync/mpsc: relicense under rust license

These files are licensed under a different license
than the rest of the codebase. This causes potential
issues and inconveniences.
Relicense these files under the standard license.
I hold original copyright on that code.

Fixes #36556

7 years agoRollup merge of #42142 - ids1024:redox, r=aturon
Mark Simulacrum [Thu, 25 May 2017 01:50:03 +0000 (19:50 -0600)]
Rollup merge of #42142 - ids1024:redox, r=aturon

Implement requires_synchronized_create() for Redox

This was breaking the libstd build for Redox.

7 years agoRollup merge of #42141 - ids1024:nobacktrace, r=aturon
Mark Simulacrum [Thu, 25 May 2017 01:50:02 +0000 (19:50 -0600)]
Rollup merge of #42141 - ids1024:nobacktrace, r=aturon

Fix building std without backtrace feature, which was broken in ca8b754

Fixes #42139

7 years agoRollup merge of #42134 - scottmcm:rangeinclusive-struct, r=aturon
Mark Simulacrum [Thu, 25 May 2017 01:50:01 +0000 (19:50 -0600)]
Rollup merge of #42134 - scottmcm:rangeinclusive-struct, r=aturon

Make RangeInclusive just a two-field struct

Not being an enum improves ergonomics and consistency, especially since NonEmpty variant wasn't prevented from being empty.  It can still be iterable without an extra "done" bit by making the range have !(start <= end), which is even possible without changing the Step trait.

Implements merged https://github.com/rust-lang/rfcs/pull/1980; tracking issue https://github.com/rust-lang/rust/issues/28237.

This is definitely a breaking change to anything consuming `RangeInclusive` directly (not as an Iterator) or constructing it without using the sugar.  Is there some change that would make sense before this so compilation failures could be compatibly fixed ahead of time?

r? @aturon (as FCP proposer on the RFC)

7 years agoRollup merge of #42120 - euclio:unicode, r=arielb1
Mark Simulacrum [Thu, 25 May 2017 01:50:00 +0000 (19:50 -0600)]
Rollup merge of #42120 - euclio:unicode, r=arielb1

remove "much" from unicode diagnostic

The English seems slightly awkward to me, and it's unnecessary.

7 years agoRollup merge of #42071 - nrc:parse-mods, r=nikomatsakis
Mark Simulacrum [Thu, 25 May 2017 01:50:00 +0000 (19:50 -0600)]
Rollup merge of #42071 - nrc:parse-mods, r=nikomatsakis

Add an option to the parser to avoid parsing out of line modules

This is useful if parsing from stdin or a String and don't want to try and read in a module from another file. Instead we just leave a stub in the AST.

7 years agoRollup merge of #41980 - gamazeps:thread-send, r=steveklabnik
Mark Simulacrum [Thu, 25 May 2017 01:49:59 +0000 (19:49 -0600)]
Rollup merge of #41980 - gamazeps:thread-send, r=steveklabnik

[Doc] Add `'static` and `Send` constraints explanations to `thread::spawn`

Part of #29378.

Explains why the constraints on the closure and its return value are `'static` and `Send`.

Allows to tick of `thread::spawn` from the list of things to document in the `thread` module.

r? @steveklabnik

7 years agoHack around abysmally slow llvm clones
Aidan Hobson Sayers [Thu, 25 May 2017 00:37:36 +0000 (01:37 +0100)]
Hack around abysmally slow llvm clones

7 years agoUpdate Cargo submodule
Alex Crichton [Wed, 24 May 2017 15:42:00 +0000 (08:42 -0700)]
Update Cargo submodule

Contains a fix for rust-lang/cargo#4081

7 years agoAdd missing urls for OsStr docs
Guillaume Gomez [Wed, 24 May 2017 17:33:40 +0000 (19:33 +0200)]
Add missing urls for OsStr docs

7 years agofix broken link to nomicon in Unsize docs
Sam Whited [Wed, 24 May 2017 16:27:16 +0000 (11:27 -0500)]
fix broken link to nomicon in Unsize docs

7 years agoChange error count messages
Michael Kohl [Mon, 22 May 2017 11:46:05 +0000 (18:46 +0700)]
Change error count messages

See #33525 for details.

7 years agobootstrap: Use common run() function to call cargo
Dennis Schridde [Wed, 24 May 2017 07:11:10 +0000 (09:11 +0200)]
bootstrap: Use common run() function to call cargo

This brings verbosity even to invocation of cargo itself

7 years agobootstrap: Make bootstrap verbose if requested
Dennis Schridde [Wed, 24 May 2017 07:10:15 +0000 (09:10 +0200)]
bootstrap: Make bootstrap verbose if requested

Fixes: #42099
7 years agobootstrap: Actually respect verbosity setting in config.toml
Dennis Schridde [Wed, 24 May 2017 07:09:17 +0000 (09:09 +0200)]
bootstrap: Actually respect verbosity setting in config.toml

7 years agoRemove some needless // gate-test- comments
est31 [Tue, 23 May 2017 18:17:38 +0000 (20:17 +0200)]
Remove some needless // gate-test- comments

Also, add detection to treat such comments as tidy errors.
We also remove the found_lib_feature code because it
was just repeating the found_feature code. Originally it
was intended to allow for gate-test lines for
lib features, but apparently nobody missed it.

7 years agoAuto merge of #42023 - nikomatsakis:issue-36799-ostn15_phf, r=arielb1
bors [Tue, 23 May 2017 09:55:40 +0000 (09:55 +0000)]
Auto merge of #42023 - nikomatsakis:issue-36799-ostn15_phf, r=arielb1

introduce local-scope to prevent `StorageLive`/`StorageDead` in statics

In investigating #36799, I found that we were creating storage-live/storage-dead instructions in statics/constants, where they are not needed. This arose due to the fix for local scopes. This PR tries to fix that (and adds a test -- I'm curious if there is a way to make that test more targeted, though).

r? @arielb1

7 years agoAuto merge of #42015 - nikomatsakis:chalk-trait-env-2, r=eddyb
bors [Tue, 23 May 2017 07:14:42 +0000 (07:14 +0000)]
Auto merge of #42015 - nikomatsakis:chalk-trait-env-2, r=eddyb

remove interior mutability of type-flags

We were previously using the flags on `Ty<'tcx>` instances to do some ad-hoc caching schemes around things like `is_sized()`, `is_freeze()`, and `moves_by_default()`. This PR replaces those schemes with a proper query; the query key is based on the pair of a `(ParameterEnvironment<'tcx>, Ty<'tcx>)` pair. This is also intended to be a preliminary template for what trait-selection and projection will eventually look like.

I did some performance measurements. In the past, I observed a noticeable speedup (6%) for building rustc, but since I've rebased, the numbers appear to be more of a wash:

| Crate | Before | After | Percentage |
| --- | --- | --- | -- |
| syntax | 167s | 166s | 0.6% faster |
| rustc | 376s | 382s | 1.5% slower |

Some advantages of this new scheme:

- `is_sized` etc are proper queries
- we get caching across generic fns, so long as trait environment is identical
- dependency tracking is correct

7 years agoSuggested changes by birkenfeld
Havvy [Tue, 23 May 2017 06:49:35 +0000 (23:49 -0700)]
Suggested changes by birkenfeld

7 years agoAuto merge of #42165 - frewsxcv:rollup, r=frewsxcv
bors [Tue, 23 May 2017 04:48:15 +0000 (04:48 +0000)]
Auto merge of #42165 - frewsxcv:rollup, r=frewsxcv

Rollup of 8 pull requests

- Successful merges: #42016, #42122, #42144, #42145, #42151, #42152, #42160, #42163
- Failed merges:

7 years agoRollup merge of #42163 - projektir:option_links, r=frewsxcv
Corey Farwell [Tue, 23 May 2017 04:15:48 +0000 (00:15 -0400)]
Rollup merge of #42163 - projektir:option_links, r=frewsxcv

Adding links to option::Option

Just adding some links.

7 years agoRollup merge of #42160 - venkatagiri:issue_38821, r=Mark-Simulacrum
Corey Farwell [Tue, 23 May 2017 04:15:47 +0000 (00:15 -0400)]
Rollup merge of #42160 - venkatagiri:issue_38821, r=Mark-Simulacrum

regression test for #38821

Closes #38821

r? @Mark-Simulacrum

7 years agoRollup merge of #42152 - GuillaumeGomez:cstr-docs, r=frewsxcv
Corey Farwell [Tue, 23 May 2017 04:15:46 +0000 (00:15 -0400)]
Rollup merge of #42152 - GuillaumeGomez:cstr-docs, r=frewsxcv

Add missing links for CStr and CString

r? @rust-lang/docs

7 years agoRollup merge of #42151 - Wallacoloo:docfix_into_vec, r=frewsxcv
Corey Farwell [Tue, 23 May 2017 04:15:45 +0000 (00:15 -0400)]
Rollup merge of #42151 - Wallacoloo:docfix_into_vec, r=frewsxcv

Mention Vec::into_boxed_slice in documentation of [T]::into_vec

This is a documentation fix.

`Vec::into_boxed_slice` and `[T]::into_vec` are inverses, so it makes sense to mention the other in their respective documentation for visibility. `Vec::into_boxed_slice` already mentions `[T]::into_vec`, but not the other way around until now.

Tagging @steveklabnik per his request.

7 years agoRollup merge of #42145 - ollie27:rustdoc_inline_renamed, r=steveklabnik
Corey Farwell [Tue, 23 May 2017 04:15:44 +0000 (00:15 -0400)]
Rollup merge of #42145 - ollie27:rustdoc_inline_renamed, r=steveklabnik

rustdoc: Fix names of items in cross crate reexported modules

For renamed reexports the new name should be used.

An example of this (as pointed out in https://github.com/rust-lang/rust/issues/27741#issuecomment-302850721) is two instances of `StepBy` in [`std::iter`](https://doc.rust-lang.org/nightly/std/iter/index.html#structs). [`core::iter`](https://doc.rust-lang.org/nightly/core/iter/index.html#structs) is correct.

Fixes #37608

7 years agoRollup merge of #42144 - cengizIO:master, r=nikomatsakis
Corey Farwell [Tue, 23 May 2017 04:15:43 +0000 (00:15 -0400)]
Rollup merge of #42144 - cengizIO:master, r=nikomatsakis

make ui test output patch compatible #41948

Hello!

Previously with #41474 I've changed the internals of UI test output comparison mechanism.

That change didn't change the diff format that we were producing but we needed to improve it anyway.

This makes unified diff lines a little bit more `patch` compatible.

Also I tried to introduce a unit test to check this but couldn't decide which of the following to implement:

1. Should I replace `println` macros with `Writer`s? And access the produced output within a test?
2. Should I add an external test (something like `src/test/run-pass/command-exec.rs`)
3. There are crates that capture `stdout`. Are they safe to use here? (I don't think so)

Thanks!

cc @nikomatsakis

7 years agoRollup merge of #42122 - rust-lang:frewsxcv/unstable-book, r=steveklabnik
Corey Farwell [Tue, 23 May 2017 04:15:42 +0000 (00:15 -0400)]
Rollup merge of #42122 - rust-lang:frewsxcv/unstable-book, r=steveklabnik

Add a few entries to the Unstable Book.

7 years agoRollup merge of #42016 - pietroalbini:stabilize/loop_break_value, r=nikomatsakis
Corey Farwell [Tue, 23 May 2017 04:15:41 +0000 (00:15 -0400)]
Rollup merge of #42016 - pietroalbini:stabilize/loop_break_value, r=nikomatsakis

Stabilize the loop_break_value feature

Tracking issue: #37339.

Documentation PRs already sent to the various repositories.

7 years agoAdding links to option::Option
projektir [Tue, 23 May 2017 01:59:42 +0000 (21:59 -0400)]
Adding links to option::Option

7 years agoAuto merge of #41559 - GuillaumeGomez:partial-eq-msg, r=estebank
bors [Tue, 23 May 2017 00:36:56 +0000 (00:36 +0000)]
Auto merge of #41559 - GuillaumeGomez:partial-eq-msg, r=estebank

Add better error message when == operator is badly used

Part of #40660.

With the following code:

```rust
fn foo<T: PartialEq>(a: &T, b: T) {
    a == b;
}

fn main() {
    foo(&1, 1);
}
```

It prints:

```
error[E0277]: the trait bound `&T: std::cmp::PartialEq<T>` is not satisfied
 --> test.rs:2:5
  |
2 |     a == b;
  |     ^^^^^^ can't compare `&T` with `T`
  |
  = help: the trait `std::cmp::PartialEq<T>` is not implemented for `&T`
  = help: consider adding a `where &T: std::cmp::PartialEq<T>` bound

error: aborting due to previous error
```

7 years agoSlice::into_vec: Don't link to Vec::into_boxed_slice
Colin Wallace [Mon, 22 May 2017 23:39:31 +0000 (16:39 -0700)]
Slice::into_vec: Don't link to Vec::into_boxed_slice

The documentation for this method appears on multiple different pages,
which causes the relative links to not always work.

7 years agoFix trailing whitespace.
Havvy [Mon, 22 May 2017 23:33:55 +0000 (16:33 -0700)]
Fix trailing whitespace.

7 years agoregression test for #38821
Venkata Giri Reddy [Mon, 22 May 2017 23:09:18 +0000 (17:09 -0600)]
regression test for #38821

Closes #38821

r? @Mark-Simulacrum

7 years agoAdd description of how values are dropped to Drop trait.
Havvy [Mon, 22 May 2017 22:59:00 +0000 (15:59 -0700)]
Add description of how values are dropped to Drop trait.

7 years agoAdd example of variable declaration drop order to Drop trait.
Havvy [Mon, 22 May 2017 22:15:04 +0000 (15:15 -0700)]
Add example of variable declaration drop order to Drop trait.

7 years agoAdd example of recursive drop to Drop trait.
Havvy [Mon, 22 May 2017 22:06:25 +0000 (15:06 -0700)]
Add example of recursive drop to Drop trait.

7 years agoAdd missing links for CStr and CString
Guillaume Gomez [Mon, 22 May 2017 14:55:00 +0000 (16:55 +0200)]
Add missing links for CStr and CString

7 years agofix `atomic_lock_free` test case
Niko Matsakis [Tue, 16 May 2017 12:43:23 +0000 (08:43 -0400)]
fix `atomic_lock_free` test case

7 years agofix DepNode
Niko Matsakis [Tue, 16 May 2017 03:23:40 +0000 (23:23 -0400)]
fix DepNode

Ideally, we'd have the `Ty` inserted directly in the dep-node, but since
we can't do that yet, we extract the characteristic def-id of the type
in question.

7 years agotwo more style nits
Niko Matsakis [Mon, 15 May 2017 23:36:45 +0000 (19:36 -0400)]
two more style nits

7 years agorename `parameter_environment` to `param_env`
Niko Matsakis [Mon, 15 May 2017 22:00:35 +0000 (18:00 -0400)]
rename `parameter_environment` to `param_env`

7 years agouse `ParamEnv` from `ty` rather than importing
Niko Matsakis [Mon, 15 May 2017 21:58:58 +0000 (17:58 -0400)]
use `ParamEnv` from `ty` rather than importing

7 years agorename `ParameterEnvironment` to `ParamEnv`
Niko Matsakis [Mon, 15 May 2017 21:57:30 +0000 (17:57 -0400)]
rename `ParameterEnvironment` to `ParamEnv`

7 years agokill NEEDS_DROP_CACHED
Niko Matsakis [Fri, 12 May 2017 16:04:27 +0000 (12:04 -0400)]
kill NEEDS_DROP_CACHED

7 years agokill FREEZENESS_CACHED
Niko Matsakis [Fri, 12 May 2017 16:04:07 +0000 (12:04 -0400)]
kill FREEZENESS_CACHED

7 years agokill SIZEDNESS_CACHED
Niko Matsakis [Fri, 12 May 2017 16:03:43 +0000 (12:03 -0400)]
kill SIZEDNESS_CACHED

7 years agoremove the cell from type flags completely
Niko Matsakis [Fri, 12 May 2017 16:01:43 +0000 (12:01 -0400)]
remove the cell from type flags completely

7 years agomove `needs_drop` into a query
Niko Matsakis [Fri, 12 May 2017 15:44:31 +0000 (11:44 -0400)]
move `needs_drop` into a query

7 years agorefactor common logic into `ParameterEnvironment::and()`
Niko Matsakis [Fri, 12 May 2017 15:44:00 +0000 (11:44 -0400)]
refactor common logic into `ParameterEnvironment::and()`

7 years agomake parameter-environment a query
Niko Matsakis [Thu, 11 May 2017 21:40:03 +0000 (17:40 -0400)]
make parameter-environment a query

7 years agocentralize the caching for is-copy, is-sized, and is-freeze
Niko Matsakis [Wed, 10 May 2017 14:28:06 +0000 (10:28 -0400)]
centralize the caching for is-copy, is-sized, and is-freeze

Use the trait-environment+type as the key. Note that these
are only invoked on types that live for the entire compilation
(no inference artifacts). We no longer need the various special-case
bits and caches that were in place before.

7 years agoadd arielb1 example
Niko Matsakis [Mon, 22 May 2017 18:40:47 +0000 (14:40 -0400)]
add arielb1 example

7 years agoMention Vec::into_boxed_slice in docs for [T]::into_vec.
Colin Wallace [Mon, 22 May 2017 12:23:47 +0000 (05:23 -0700)]
Mention Vec::into_boxed_slice in docs for [T]::into_vec.

`Vec::into_boxed_slice` and `[T]::into_vec` are inverses, so it makes sense
to mention the other in their respective documentation for visibility.
`Vec::into_boxed_slice` already mentions `[T]::into_vec`, but not the other
way around until now.

7 years agolibstd/sync/mpsc: relicense under rust license
Dmitry Vyukov [Mon, 22 May 2017 07:27:39 +0000 (09:27 +0200)]
libstd/sync/mpsc: relicense under rust license

These files are licensed under a different license
than the rest of the codebase. This causes potential
issues and inconveniences.
Relicense these files under the standard license.
I hold original copyright on that code.

Fixes #36556

7 years agoAuto merge of #42147 - withoutboats:run-pass-test-for-static-in-assoc-const-ty-refs...
bors [Mon, 22 May 2017 06:22:52 +0000 (06:22 +0000)]
Auto merge of #42147 - withoutboats:run-pass-test-for-static-in-assoc-const-ty-refs, r=eddyb

Remove 'static bound in assoc const test.

Types do not have to be `'static` to be referenced in
associated consts.

Fixes #33573.

7 years agoRemove 'static bound in assoc const test.
Without Boats [Mon, 22 May 2017 06:10:01 +0000 (23:10 -0700)]
Remove 'static bound in assoc const test.

Types do not have to be `'static` to be referenced in
associated consts.

7 years agorustdoc: Fix names of items in cross crate reexported modules
Oliver Middleton [Mon, 22 May 2017 01:05:16 +0000 (02:05 +0100)]
rustdoc: Fix names of items in cross crate reexported modules

For renamed reexports the new name should be used.

7 years agoAuto merge of #42140 - anderspapitto:doc-typo-fixes, r=Mark-Simulacrum
bors [Mon, 22 May 2017 00:51:17 +0000 (00:51 +0000)]
Auto merge of #42140 - anderspapitto:doc-typo-fixes, r=Mark-Simulacrum

bootstrap: fix minor comment typos in lib.rs

I noticed these while reading through the build system
documentation. They're hardly worth fixing, but I'm also using this to
get my feet wet with the rustc contribution system.

7 years agomake ui test output patch compatible #41948
Cengiz Can [Sun, 21 May 2017 22:34:36 +0000 (01:34 +0300)]
make ui test output patch compatible #41948

7 years agoAuto merge of #41904 - sfackler:1.18-stabilization, r=alexcrichton
bors [Sun, 21 May 2017 22:06:08 +0000 (22:06 +0000)]
Auto merge of #41904 - sfackler:1.18-stabilization, r=alexcrichton

Stabilize library features for 1.18.0

Closes #38863
Closes #38980
Closes #38903
Closes #36648

r? @alexcrichton

@rust-lang/libs

7 years agoImplement requires_synchronized_create() for Redox
Ian Douglas Scott [Sun, 21 May 2017 20:23:42 +0000 (13:23 -0700)]
Implement requires_synchronized_create() for Redox

This was breaking the libstd build for Redox.

7 years agoFix building without backtrace feature, which was broken in ca8b754
Ian Douglas Scott [Sun, 21 May 2017 19:38:07 +0000 (12:38 -0700)]
Fix building without backtrace feature, which was broken in ca8b754

Fixes #42139

7 years agobootstrap: fix minor comment typos in lib.rs
Anders Papitto [Thu, 18 May 2017 18:59:54 +0000 (19:59 +0100)]
bootstrap: fix minor comment typos in lib.rs

I noticed these while reading through the build system
documentation. They're hardly worth fixing, but I'm also using this to
get my feet wet with the rustc contribution system.

7 years agoReturn a correct size_hint for degenerate inclusive ranges
Scott McMurray [Sun, 21 May 2017 12:03:49 +0000 (05:03 -0700)]
Return a correct size_hint for degenerate inclusive ranges

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

Found while fixing run-pass/range_inclusive test failure.

7 years agoMake RangeInclusive just a two-field struct
Scott McMurray [Mon, 24 Apr 2017 04:14:32 +0000 (21:14 -0700)]
Make RangeInclusive just a two-field struct

Not being an enum improves ergonomics, especially since NonEmpty could be Empty.  It can still be iterable without an extra "done" bit by making the range have !(start <= end), which is even possible without changing the Step trait.

Implements RFC 1980

7 years agoAuto merge of #42131 - neosilky:doc-fix, r=frewsxcv
bors [Sun, 21 May 2017 08:28:05 +0000 (08:28 +0000)]
Auto merge of #42131 - neosilky:doc-fix, r=frewsxcv

Update to trait bounds CSS in rustdoc

Fixed re-submission of #40719.

7 years agoAuto merge of #42132 - cuviper:manifest-paths, r=alexcrichton
bors [Sun, 21 May 2017 06:00:22 +0000 (06:00 +0000)]
Auto merge of #42132 - cuviper:manifest-paths, r=alexcrichton

Update rust-installer to normalize manifest paths

This fixes the backslash-paths found in the manifests of installers that are built on Windows.  This is the most problematic part of #42121, leaving just the non-executable install.sh.

r? @alexcrichton

7 years agoStabilize library features for 1.18.0
Steven Fackler [Thu, 11 May 2017 04:17:24 +0000 (21:17 -0700)]
Stabilize library features for 1.18.0

Closes #38863
Closes #38980
Closes #38903
Closes #36648

7 years agoUpdate rust-installer to normalize manifest paths
Josh Stone [Sun, 21 May 2017 04:55:18 +0000 (21:55 -0700)]
Update rust-installer to normalize manifest paths

7 years agoUpdate to trait bounds CSS in rustdoc
Daniel Lockyer [Sun, 21 May 2017 03:35:26 +0000 (04:35 +0100)]
Update to trait bounds CSS in rustdoc

Fixed resubmission of #40719.

7 years agoAuto merge of #42130 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors [Sun, 21 May 2017 01:53:20 +0000 (01:53 +0000)]
Auto merge of #42130 - Mark-Simulacrum:rollup, r=Mark-Simulacrum

Rollup of 6 pull requests

- Successful merges: #41892, #42062, #42091, #42093, #42098, #42127
- Failed merges:

7 years agoRollup merge of #42127 - clarcharr:lifetimes, r=Mark-Simulacrum
Mark Simulacrum [Sat, 20 May 2017 23:48:16 +0000 (17:48 -0600)]
Rollup merge of #42127 - clarcharr:lifetimes, r=Mark-Simulacrum

Remove unused lifetimes.

This was a typo that made it onto master. Noted by @dtolnay in #42127.

Also note #41960 which suggests warning these.

7 years agoRollup merge of #42098 - japaric:gh42097, r=Mark-Simulacrum
Mark Simulacrum [Sat, 20 May 2017 23:48:15 +0000 (17:48 -0600)]
Rollup merge of #42098 - japaric:gh42097, r=Mark-Simulacrum

core: fix unused_macro warning

when compiling the crate for a target with max-atomic-width = 0

fixes #42097

7 years agoRollup merge of #42093 - llogiq:clippy-librustc_errors, r=arielb1
Mark Simulacrum [Sat, 20 May 2017 23:48:14 +0000 (17:48 -0600)]
Rollup merge of #42093 - llogiq:clippy-librustc_errors, r=arielb1

fix some clippy warnings in librustc_errors

Again, those are small changes to improve readability.

7 years agoRollup merge of #42091 - maccoda:maccoda/env_docs, r=frewsxcv
Mark Simulacrum [Sat, 20 May 2017 23:48:13 +0000 (17:48 -0600)]
Rollup merge of #42091 - maccoda:maccoda/env_docs, r=frewsxcv

Improving std::env docs

Addresses #29351.
Hopefully this addresses the following points:
> -  iterators should use the standard iterator boilerplate like https://doc.rust-lang.org/std/iter/struct.Map.html, this applies to all structs except for JoinPathsError
> -  JoinPathsError should properly link the function it comes from and use language similar to https://doc.rust-lang.org/std/io/struct.Error.html
> -  same wording issues with VarError
> - functions need to ensure linkage to things they refer to in their descriptions
> - Explain the difference between `os` and non-`os` structs and methods

7 years agoRollup merge of #42062 - fhartwig:fix-off-by-one-span, r=nikomatsakis
Mark Simulacrum [Sat, 20 May 2017 23:48:12 +0000 (17:48 -0600)]
Rollup merge of #42062 - fhartwig:fix-off-by-one-span, r=nikomatsakis

Fix off-by-one error in column number in `explain_span`.

Fixes #41938

7 years agoRollup merge of #41892 - Gankro:needs_drop, r=alexcrichton
Mark Simulacrum [Sat, 20 May 2017 23:48:11 +0000 (17:48 -0600)]
Rollup merge of #41892 - Gankro:needs_drop, r=alexcrichton

expose needs_drop under mem

Note that I purposefully didn't update the intrinsic's documentation, because I think it makes sense for it be more... "honest" about its semantics.

7 years agoAdd stub entry to unstable book for needs_drop
Alexis Beingessner [Thu, 11 May 2017 14:15:56 +0000 (10:15 -0400)]
Add stub entry to unstable book for needs_drop

7 years agomigrate everything to using mem::needs_drop
Alexis Beingessner [Wed, 10 May 2017 17:13:42 +0000 (13:13 -0400)]
migrate everything to using mem::needs_drop

7 years agoAuto merge of #42124 - Keruspe:installer, r=alexcrichton
bors [Sat, 20 May 2017 23:27:07 +0000 (23:27 +0000)]
Auto merge of #42124 - Keruspe:installer, r=alexcrichton

update rust-installer

This fixes the default value for sysconfdir

Closes https://github.com/rust-lang/rust/issues/42102
Closes https://github.com/rust-lang/cargo/issues/4070

7 years agoexpose needs_drop under mem::
Alexis Beingessner [Wed, 10 May 2017 16:48:36 +0000 (12:48 -0400)]
expose needs_drop under mem::

7 years agoAuto merge of #42069 - QuietMisdreavus:low_pri, r=alexchrichton
bors [Sat, 20 May 2017 20:55:52 +0000 (20:55 +0000)]
Auto merge of #42069 - QuietMisdreavus:low_pri, r=alexchrichton

Add an option to run rustbuild on low priority on Windows and Unix

This is a resurrection of #40776, combining their Windows setup with an additional setup on Unix to set the program group's *nice*ness to +10 (low-but-not-lowest priority, mirroring the priority in the Windows setup) when the `low_priority` option is on.

7 years agoRemove unused lifetimes.
Clar Charr [Sat, 20 May 2017 19:32:11 +0000 (15:32 -0400)]
Remove unused lifetimes.

7 years agoAuto merge of #42123 - Mark-Simulacrum:revert-41967, r=alexcrichton
bors [Sat, 20 May 2017 18:26:53 +0000 (18:26 +0000)]
Auto merge of #42123 - Mark-Simulacrum:revert-41967, r=alexcrichton

Revert "Reenable opt-level 3"

This reverts commit 30383b2384864173b9238a121f8e83f8968f1e51, from #41967.

We believe that this is causing the failures when compiling rustc on 64 bit (which are probably segfaults).

cc @ishitatsuyuki

7 years agoupdate rust-installer
Marc-Antoine Perennou [Sat, 20 May 2017 16:52:49 +0000 (18:52 +0200)]
update rust-installer

This fixes the default value for sysconfdir

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
7 years agoRevert "Reenable opt-level 3"
Mark Simulacrum [Sat, 20 May 2017 16:33:53 +0000 (10:33 -0600)]
Revert "Reenable opt-level 3"

This reverts commit 30383b2384864173b9238a121f8e83f8968f1e51.

7 years agoAdd basic Unstable Book entry for `attr_literals`.
Corey Farwell [Sat, 20 May 2017 16:08:28 +0000 (12:08 -0400)]
Add basic Unstable Book entry for `attr_literals`.

7 years agoAdd basic Unstable Book entry for `catch_expr`.
Corey Farwell [Sat, 20 May 2017 15:47:51 +0000 (11:47 -0400)]
Add basic Unstable Book entry for `catch_expr`.

7 years agoAuto merge of #42111 - ollie27:stab, r=Mark-Simulacrum
bors [Sat, 20 May 2017 15:42:43 +0000 (15:42 +0000)]
Auto merge of #42111 - ollie27:stab, r=Mark-Simulacrum

Correct some stability versions

These were found by running tidy on stable versions of rust and finding
features stabilised with the wrong version numbers.

7 years agoAdd basic Unstable Book entry for `on_unimplemented`.
Corey Farwell [Sat, 20 May 2017 13:38:45 +0000 (09:38 -0400)]
Add basic Unstable Book entry for `on_unimplemented`.

7 years agoremove "much" from unicode diagnostic
Andy Russell [Sat, 20 May 2017 15:18:26 +0000 (11:18 -0400)]
remove "much" from unicode diagnostic

7 years agoAuto merge of #42113 - segevfiner:fix-ole32-warning, r=petrochenkov
bors [Sat, 20 May 2017 12:05:33 +0000 (12:05 +0000)]
Auto merge of #42113 - segevfiner:fix-ole32-warning, r=petrochenkov

Fix: "warning: redundant linker flag specified for library `ole32`"

llvm-config seems to output this library name correctly now, removing
the need for the hack in "librustc_llvm/build.rs".