]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoStabilize non capturing closure to fn coercion
est31 [Tue, 23 May 2017 00:28:13 +0000 (02:28 +0200)]
Stabilize non capturing closure to fn coercion

7 years agoUse parameter environment associated with field use, not field definition
Vadim Petrochenkov [Thu, 18 May 2017 11:28:40 +0000 (14:28 +0300)]
Use parameter environment associated with field use, not field definition

7 years agoAuto merge of #41145 - matthewjasper:stabilize-relaxed-adts, r=petrochenkov
bors [Thu, 25 May 2017 07:24:18 +0000 (07:24 +0000)]
Auto merge of #41145 - matthewjasper:stabilize-relaxed-adts, r=petrochenkov

Stabilize rfc 1506 - Clarified ADT Kinds

Closes #35626

Documentation:

- [ ] Reference rust-lang-nursery/reference#37
- [ ] Book?
- [ ] Rust by example?

7 years agouse shared scripts for init and sccache in cross image
Venkata Giri Reddy [Thu, 25 May 2017 06:43:21 +0000 (00:43 -0600)]
use shared scripts for init and sccache in cross image

7 years agoMake assignments to `Copy` union fields safe
Vadim Petrochenkov [Thu, 18 May 2017 10:40:15 +0000 (13:40 +0300)]
Make assignments to `Copy` union fields safe

7 years agoIgnore pretty.
Jeffrey Seyfried [Thu, 25 May 2017 02:04:03 +0000 (02:04 +0000)]
Ignore pretty.

7 years agoImprove `Self`.
Jeffrey Seyfried [Sun, 21 May 2017 22:35:39 +0000 (22:35 +0000)]
Improve `Self`.

7 years agoAdd tests.
Jeffrey Seyfried [Sat, 25 Mar 2017 02:37:55 +0000 (02:37 +0000)]
Add tests.

7 years agoImprove intercrate hygiene.
Jeffrey Seyfried [Mon, 27 Mar 2017 00:46:00 +0000 (00:46 +0000)]
Improve intercrate hygiene.

7 years agoImprove efficiency.
Jeffrey Seyfried [Sun, 26 Mar 2017 02:11:30 +0000 (02:11 +0000)]
Improve efficiency.

7 years agoHygienize lifetimes.
Jeffrey Seyfried [Sat, 25 Mar 2017 21:14:18 +0000 (21:14 +0000)]
Hygienize lifetimes.

7 years agoHygienize `librustc_privacy`.
Jeffrey Seyfried [Sat, 25 Mar 2017 01:46:38 +0000 (01:46 +0000)]
Hygienize `librustc_privacy`.

7 years agoHygienize `librustc_typeck`.
Jeffrey Seyfried [Fri, 24 Mar 2017 23:03:15 +0000 (23:03 +0000)]
Hygienize `librustc_typeck`.

7 years agoHygienize `librustc_resolve`.
Jeffrey Seyfried [Wed, 22 Mar 2017 08:39:51 +0000 (08:39 +0000)]
Hygienize `librustc_resolve`.

7 years agoRemove `trait_item_map`, clean up `resolver.with_type_parameter_rib()`.
Jeffrey Seyfried [Sat, 18 Mar 2017 02:10:13 +0000 (02:10 +0000)]
Remove `trait_item_map`, clean up `resolver.with_type_parameter_rib()`.

7 years agoDeclarative macros 2.0 without hygiene.
Jeffrey Seyfried [Sat, 18 Mar 2017 01:55:51 +0000 (01:55 +0000)]
Declarative macros 2.0 without hygiene.

7 years agoRefactor out `ast::MacroDef`.
Jeffrey Seyfried [Fri, 17 Mar 2017 21:58:48 +0000 (21:58 +0000)]
Refactor out `ast::MacroDef`.

7 years agobootstrap.py: support verbose for submodules
Tatsuyuki Ishi [Thu, 25 May 2017 05:00:05 +0000 (14:00 +0900)]
bootstrap.py: support verbose for submodules

7 years agobootstrap.py: decode to str
Tatsuyuki Ishi [Mon, 22 May 2017 07:04:34 +0000 (16:04 +0900)]
bootstrap.py: decode to str

Also, improve the split mechanism to address space in paths.

7 years agobootstrap.py: Filter instead of iteration
Tatsuyuki Ishi [Fri, 19 May 2017 11:36:49 +0000 (20:36 +0900)]
bootstrap.py: Filter instead of iteration

7 years agoFormat bootstrap.py using autopep8
Tatsuyuki Ishi [Fri, 19 May 2017 11:16:29 +0000 (20:16 +0900)]
Format bootstrap.py using autopep8

7 years agoUse the improved submodule handling
Tatsuyuki Ishi [Thu, 18 May 2017 08:33:24 +0000 (17:33 +0900)]
Use the improved submodule handling

7 years agoAuto merge of #41700 - GuillaumeGomez:extend-css-stable, r=killercup
bors [Thu, 25 May 2017 04:38:53 +0000 (04:38 +0000)]
Auto merge of #41700 - GuillaumeGomez:extend-css-stable, r=killercup

Set --extend-css stable

I think it's now time to set this option stable.

r? @rust-lang/docs

7 years agoFix 'associate type' typo
Charlie Somerville [Thu, 25 May 2017 03:36:59 +0000 (13:36 +1000)]
Fix 'associate type' typo

7 years agoRemove superfluous `;;` sequences
Dan Callahan [Thu, 25 May 2017 02:43:46 +0000 (21:43 -0500)]
Remove superfluous `;;` sequences

7 years agoAuto merge of #42212 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors [Thu, 25 May 2017 01:51:35 +0000 (01:51 +0000)]
Auto merge of #42212 - Mark-Simulacrum:rollup, r=Mark-Simulacrum

Rollup of 15 pull requests

- Successful merges: #41980, #42071, #42120, #42134, #42141, #42142, #42149, #42150, #42159, #42177, #42186, #42191, #42195, #42198, #42211
- Failed merges:

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 agoRemove all instances of fragment_infos and fragment sets
Paul Faria [Wed, 24 May 2017 01:51:21 +0000 (21:51 -0400)]
Remove all instances of fragment_infos and fragment sets

7 years agoadd thiscall calling convention support
Nathan Froyd [Wed, 17 May 2017 13:40:46 +0000 (09:40 -0400)]
add thiscall calling convention support

This support is needed for bindgen to work well on 32-bit Windows, and
also enables people to begin experimenting with C++ FFI support on that
platform.

Fixes #42044.

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 agoExplain why a closure is `FnOnce` in closure errors
Tommy Ip [Wed, 24 May 2017 16:30:27 +0000 (17:30 +0100)]
Explain why a closure is `FnOnce` in closure errors

7 years agoInclude context info into closure_kinds
Tommy Ip [Wed, 24 May 2017 15:23:02 +0000 (16:23 +0100)]
Include context info into closure_kinds

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 agorustbuild: distcheck needs rust-src too
Marc-Antoine Perennou [Wed, 24 May 2017 06:45:12 +0000 (08:45 +0200)]
rustbuild: distcheck needs rust-src too

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
7 years agoAdd precisions for the help message for --extend-css
Guillaume Gomez [Tue, 23 May 2017 18:48:16 +0000 (20:48 +0200)]
Add precisions for the help message for --extend-css

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 agoincr.comp.: Track expanded spans instead of FileMaps.
Michael Woerister [Tue, 23 May 2017 14:21:24 +0000 (16:21 +0200)]
incr.comp.: Track expanded spans instead of FileMaps.

7 years agorustbuild: make distcheck depend on dist-plain-source-tarball
Marc-Antoine Perennou [Tue, 23 May 2017 16:11:04 +0000 (18:11 +0200)]
rustbuild: make distcheck depend on dist-plain-source-tarball

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
7 years agorustbuild: drop unused macro in tets
Marc-Antoine Perennou [Tue, 23 May 2017 16:11:15 +0000 (18:11 +0200)]
rustbuild: drop unused macro in tets

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
7 years agoStabilize in 1.19
Matthew [Tue, 23 May 2017 13:00:20 +0000 (14:00 +0100)]
Stabilize in 1.19

7 years agoGive step_trait a distinct tracking issue from step_by
Scott McMurray [Tue, 23 May 2017 10:08:18 +0000 (03:08 -0700)]
Give step_trait a distinct tracking issue from step_by

iterator_step_by has decoupled their futures, so the tracking issue should split.

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 agoUpdate description of iter::StepBy
Scott McMurray [Sun, 21 May 2017 01:32:43 +0000 (18:32 -0700)]
Update description of iter::StepBy

7 years agoAdd iterator_step_by to the unstable book's summary
Scott McMurray [Sun, 21 May 2017 01:05:18 +0000 (18:05 -0700)]
Add iterator_step_by to the unstable book's summary

7 years agoOverride size_hint and propagate ExactSizeIterator for iter::StepBy
Scott McMurray [Tue, 23 May 2017 09:24:25 +0000 (02:24 -0700)]
Override size_hint and propagate ExactSizeIterator for iter::StepBy

Generally useful, but also a prerequisite for moving a bunch of unit tests off Range::step_by.

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 agoCreate the bin dir
Wesley Wiser [Tue, 23 May 2017 01:32:27 +0000 (21:32 -0400)]
Create the bin dir

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 agorustbuild: split Install out of Dist subcommand
Marc-Antoine Perennou [Thu, 18 May 2017 20:48:14 +0000 (22:48 +0200)]
rustbuild: split Install out of Dist subcommand

only create source tarball for the Dist subcommand
mark install rule as default for Kind::Install
split install-docs
split install-std
factor out empty_dir handling
split install-cargo
split install-analysis
split install-src
rework install-rustc
properly handle cross-compilation setups for install
use pkgname in install
split plain source tarball generation from rust-src dist
document src-tarball in config.toml.exmaple

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
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