]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoforce more builds
gnzlbg [Wed, 16 May 2018 18:02:59 +0000 (20:02 +0200)]
force more builds

6 years agoenable fast-math flags
gnzlbg [Mon, 14 May 2018 10:03:04 +0000 (12:03 +0200)]
enable fast-math flags

6 years agoadd gather/scatter tests for pointers of pointers
gnzlbg [Wed, 9 May 2018 15:09:50 +0000 (17:09 +0200)]
add gather/scatter tests for pointers of pointers

6 years agoadd gather/scatter run-time test
gnzlbg [Wed, 9 May 2018 14:47:38 +0000 (16:47 +0200)]
add gather/scatter run-time test

6 years agoadd run-time test and missing codegen test
gnzlbg [Wed, 9 May 2018 14:01:52 +0000 (16:01 +0200)]
add run-time test and missing codegen test

6 years agofix tidy
gnzlbg [Tue, 8 May 2018 14:16:26 +0000 (16:16 +0200)]
fix tidy

6 years agoadd simd float intrinsics and gather/scatter
gnzlbg [Fri, 4 May 2018 18:07:35 +0000 (20:07 +0200)]
add simd float intrinsics and gather/scatter

6 years agomove simd-minmax-test to run-pass; require llvm 7
gnzlbg [Fri, 4 May 2018 16:40:46 +0000 (18:40 +0200)]
move simd-minmax-test to run-pass; require llvm 7

6 years agoAuto merge of #50949 - eddyb:debuginfo, r=mw
bors [Thu, 24 May 2018 09:27:15 +0000 (09:27 +0000)]
Auto merge of #50949 - eddyb:debuginfo, r=mw

rustc_codegen_llvm: remove some debuginfo cruft.

(The second commit passes tests locally but might not on older LLVM versions)

r? @nikomatsakis

6 years agoAuto merge of #50971 - alexcrichton:no-stringify, r=petrochenkov
bors [Thu, 24 May 2018 07:14:21 +0000 (07:14 +0000)]
Auto merge of #50971 - alexcrichton:no-stringify, r=petrochenkov

rustc: Correctly pretty-print macro delimiters

This commit updates the `Mac_` AST structure to keep track of the delimiters
that it originally had for its invocation. This allows us to faithfully
pretty-print macro invocations not using parentheses (e.g. `vec![...]`). This in
turn helps procedural macros due to #43081.

Closes #50840

6 years agoAuto merge of #50943 - oli-obk:cleanups, r=estebank
bors [Thu, 24 May 2018 03:40:16 +0000 (03:40 +0000)]
Auto merge of #50943 - oli-obk:cleanups, r=estebank

impl Trait diagnostic/test cleanups

6 years agoAuto merge of #51010 - nikomatsakis:issue-50996-renamed-extern-crate, r=acrichto
bors [Thu, 24 May 2018 01:25:40 +0000 (01:25 +0000)]
Auto merge of #51010 - nikomatsakis:issue-50996-renamed-extern-crate, r=acrichto

"crate-ify" paths that begin with a renamed crate

This does two things:

- crate-ify paths that begin with a renamed crate (i.e., add `crate::`) to the front

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

I also added tests for a few other scenarios.

r? @alexcrichton

6 years agoAuto merge of #50933 - SimonSapin:anchorage, r=alexcrichton
bors [Wed, 23 May 2018 22:50:12 +0000 (22:50 +0000)]
Auto merge of #50933 - SimonSapin:anchorage, r=alexcrichton

Remove the unstable Float trait

Following up to #49896 and #50629. Fixes #32110.

6 years ago"crate-ify" paths that begin with a renamed crate
Niko Matsakis [Wed, 23 May 2018 20:20:40 +0000 (16:20 -0400)]
"crate-ify" paths that begin with a renamed crate

6 years agoAuto merge of #50916 - oli-obk:miri, r=eddyb
bors [Wed, 23 May 2018 20:13:22 +0000 (20:13 +0000)]
Auto merge of #50916 - oli-obk:miri, r=eddyb

Allow `Size` to be any valid `u64`

cc https://github.com/solson/miri/pull/378#issuecomment-390470725

The alternative is to make mir::interpret's pointer offsets not be `Size`

fixes #50917

r? @eddyb

6 years agoAuto merge of #50983 - nikomatsakis:issue-50970-migration-lint-fq-path, r=alexcrichton
bors [Wed, 23 May 2018 17:36:28 +0000 (17:36 +0000)]
Auto merge of #50983 - nikomatsakis:issue-50970-migration-lint-fq-path, r=alexcrichton

Issue 50970 migration lint fq path

Similar issue, but for fully qualified paths.

Fixes #50970

r? @alexcrichton

6 years agoAuto merge of #50891 - davidtwco:nll-kill-loans-out-of-scope-at-location-reduce-calls...
bors [Wed, 23 May 2018 15:06:27 +0000 (15:06 +0000)]
Auto merge of #50891 - davidtwco:nll-kill-loans-out-of-scope-at-location-reduce-calls, r=pnkfelix

Remove extra calls to kill_loans_out_of_scope_at_location.

r? @nikomatsakis

6 years agoAuto merge of #50866 - michaelwoerister:relocations-in-vec, r=oli-obk
bors [Wed, 23 May 2018 12:24:48 +0000 (12:24 +0000)]
Auto merge of #50866 - michaelwoerister:relocations-in-vec, r=oli-obk

Use different datastructure for MIRI relocations

This PR makes relocations in MIRI used a sorted vector instead of a `BTreeMap` which should make a few common operations more efficient. Let's see if that's true.

r? @oli-obk

6 years agopacify the mercilous tidy
Niko Matsakis [Wed, 23 May 2018 12:17:04 +0000 (08:17 -0400)]
pacify the mercilous tidy

6 years agohandle fully qualified paths properly when linting
Niko Matsakis [Tue, 22 May 2018 23:01:09 +0000 (19:01 -0400)]
handle fully qualified paths properly when linting

fixes #50970

6 years agoAuto merge of #50528 - whitfin:issue-50508, r=michaelwoerister
bors [Wed, 23 May 2018 09:50:54 +0000 (09:50 +0000)]
Auto merge of #50528 - whitfin:issue-50508, r=michaelwoerister

Remove attribute_cache from CrateMetadata

This PR will fix #50508 by removing the `attribute_cache` from the `CrateMetadata` struct. Seeing as performance was referenced in the original issue, I also cleaned up a `self.entry(node_id);` call which might have occasionally happened redundantly.

r? @michaelwoerister

6 years agoAuto merge of #50798 - bobtwinkles:nll_facts_invalidate, r=nikomatsakis
bors [Wed, 23 May 2018 07:15:34 +0000 (07:15 +0000)]
Auto merge of #50798 - bobtwinkles:nll_facts_invalidate, r=nikomatsakis

Generate "invalidates" facts when -Znll-facts is passed

Most of the new code is copied directly from the heart of the MIR borrowchecker. I was expecting more fundamental structural changes, hence the copying. This appears to work as it stands, but I'd like to submit a follow-up PR to reduce code duplication. I figured that could wait though, since this is blocking a large amount of work in the borrow check repository and I'm out of time for tonight =).

r? @nikomatsakis

6 years agoAuto merge of #50682 - F001:issue-50589, r=petrochenkov
bors [Wed, 23 May 2018 05:09:13 +0000 (05:09 +0000)]
Auto merge of #50682 - F001:issue-50589, r=petrochenkov

Add lint for multiple associated types

Fix https://github.com/rust-lang/rust/issues/50589. cc @abonander

6 years agoAuto merge of #50982 - alexcrichton:less-warnings, r=nikomatsakis
bors [Wed, 23 May 2018 02:44:08 +0000 (02:44 +0000)]
Auto merge of #50982 - alexcrichton:less-warnings, r=nikomatsakis

rustc: Fix another double-lint issue with `crate::`

This commit fixes another issue in the `absolute_path_not_starting_with_crate`
lint where it warns twice about an import which may contain `self`. It turns out
there were a few more locations that needed updating to use `root_id` and
`root_span` introduced in #50970 and after that it looks to work like a charm!

Closes #50978

6 years agoinverting speculative flag
F001 [Wed, 23 May 2018 00:59:08 +0000 (08:59 +0800)]
inverting speculative flag

6 years agothread info about `CrateLint` through more deeply
Niko Matsakis [Tue, 22 May 2018 22:43:02 +0000 (18:43 -0400)]
thread info about `CrateLint` through more deeply

6 years agoadd `Span` information into `Qself`
Niko Matsakis [Tue, 22 May 2018 19:26:35 +0000 (15:26 -0400)]
add `Span` information into `Qself`

6 years agorustc: Fix another double-lint issue with `crate::`
Alex Crichton [Tue, 22 May 2018 22:34:30 +0000 (15:34 -0700)]
rustc: Fix another double-lint issue with `crate::`

This commit fixes another issue in the `absolute_path_not_starting_with_crate`
lint where it warns twice about an import which may contain `self`. It turns out
there were a few more locations that needed updating to use `root_id` and
`root_span` introduced in #50970 and after that it looks to work like a charm!

Closes #50978

6 years agoAuto merge of #50713 - killercup:update-rustfix, r=alexcrichton
bors [Tue, 22 May 2018 21:33:03 +0000 (21:33 +0000)]
Auto merge of #50713 - killercup:update-rustfix, r=alexcrichton

Update rustfix

- Update compiletest to use rustfix 0.3.1

r? @Manishearth

6 years agoUpdate compiltest to use rustfix 0.3.1
Pascal Hertleif [Sun, 13 May 2018 16:35:40 +0000 (18:35 +0200)]
Update compiltest to use rustfix 0.3.1

6 years agorustc: Correctly pretty-print macro delimiters
Alex Crichton [Tue, 22 May 2018 15:01:21 +0000 (08:01 -0700)]
rustc: Correctly pretty-print macro delimiters

This commit updates the `Mac_` AST structure to keep track of the delimiters
that it originally had for its invocation. This allows us to faithfully
pretty-print macro invocations not using parentheses (e.g. `vec![...]`). This in
turn helps procedural macros due to #43081.

Closes #50840

6 years agoAuto merge of #50969 - nikomatsakis:issue-50673-broken-migration-lint, r=alexcrichton
bors [Tue, 22 May 2018 18:55:54 +0000 (18:55 +0000)]
Auto merge of #50969 - nikomatsakis:issue-50673-broken-migration-lint, r=alexcrichton

fix suggestions with nested paths

Fixes #50673

cc @Manishearth @petrochenkov
r? @alexcrichton

6 years agoRemove the unstable Float trait
Simon Sapin [Mon, 21 May 2018 08:45:11 +0000 (10:45 +0200)]
Remove the unstable Float trait

Following up to #49896 and #50629. Fixes #32110.

E0689 is weird.

6 years agoAuto merge of #50968 - kennytm:rollup, r=kennytm
bors [Tue, 22 May 2018 16:38:12 +0000 (16:38 +0000)]
Auto merge of #50968 - kennytm:rollup, r=kennytm

Rollup of 15 pull requests

Successful merges:

 - #50846 (Add E0665)
 - #50849 (CheckLoopVisitor: also visit closure arguments)
 - #50863 (Make `[T]::len` and `str::len` const fn)
 - #50875 (rustdoc: use "short form" doc(cfg) printing even when combined with other conditionals)
 - #50913 (Fix typo in cell.rs)
 - #50914 (Issue #50636: Improve error diagnostic with missing commas after struct fields.)
 - #50931 (Inline `try_get`.)
 - #50932 (Optimize seen Predicate filtering.)
 - #50945 (Stabilize feature from_ref)
 - #50946 (rustc: Fix procedural macros generating lifetime tokens)
 - #50947 (rustdoc: set tab width in rust source blocks)
 - #50952 (Add the 2018 edition of the book to doc.rust-lang.org)
 - #50958 (Micro-optimization on PR#50697)
 - #50961 (Fix FileCheck finding with MSVC)
 - #50963 (Right-size the `VecDeque` in `coerce_unsized`.)

Failed merges:

6 years agoadd new test and add an existing scenario I didn't see covered
Niko Matsakis [Tue, 22 May 2018 15:45:44 +0000 (11:45 -0400)]
add new test and add an existing scenario I didn't see covered

6 years agoRollup merge of #50963 - nnethercote:coercion-VecDeque1, r=petrochenkov
kennytm [Tue, 22 May 2018 16:26:23 +0000 (00:26 +0800)]
Rollup merge of #50963 - nnethercote:coercion-VecDeque1, r=petrochenkov

Right-size the `VecDeque` in `coerce_unsized`.

The default capacity of a VecDeque is 8, which is excessive here. In a
"base incremental" check build of rustc-perf's tuple-stress benchmark,
this decreases total heap allocation by 26%. I couldn't see a clear
speedup, but it can't hurt.

6 years agoRollup merge of #50961 - Zoxc:fix-filecheck, r=alexcrichton
kennytm [Tue, 22 May 2018 16:26:22 +0000 (00:26 +0800)]
Rollup merge of #50961 - Zoxc:fix-filecheck, r=alexcrichton

Fix FileCheck finding with MSVC

6 years agoRollup merge of #50958 - KiChjang:nit-50697, r=pnkfelix
kennytm [Tue, 22 May 2018 16:26:21 +0000 (00:26 +0800)]
Rollup merge of #50958 - KiChjang:nit-50697, r=pnkfelix

Micro-optimization on PR#50697

We should stop iterating through the indices in the `init_path_map` once we've already found a match for the local.

r? @nikomatsakis or @pnkfelix

6 years agoRollup merge of #50952 - steveklabnik:2018-book, r=alexcrichton
kennytm [Tue, 22 May 2018 16:26:20 +0000 (00:26 +0800)]
Rollup merge of #50952 - steveklabnik:2018-book, r=alexcrichton

Add the 2018 edition of the book to doc.rust-lang.org

The second edition of the book is on its way to the printers, and as such, is frozen. We've forked off the 2018 edition to add new stuff to; this PR now builds it so that people can read it on doc.rust-lang.org.

6 years agoRollup merge of #50947 - QuietMisdreavus:nice-tabs, r=GuillaumeGomez
kennytm [Tue, 22 May 2018 16:26:19 +0000 (00:26 +0800)]
Rollup merge of #50947 - QuietMisdreavus:nice-tabs, r=GuillaumeGomez

rustdoc: set tab width in rust source blocks

cc https://github.com/rust-lang/rust/issues/49155 (fixes it?)

This sets the tab width ([in supported browsers](https://developer.mozilla.org/en-US/docs/Web/CSS/tab-size)) in Rust source blocks to 4 spaces wide (instead of the default 8), to correspond with the style guidelines.

6 years agoRollup merge of #50946 - alexcrichton:fix-parse-lifetime, r=petrochenkov
kennytm [Tue, 22 May 2018 16:26:18 +0000 (00:26 +0800)]
Rollup merge of #50946 - alexcrichton:fix-parse-lifetime, r=petrochenkov

rustc: Fix procedural macros generating lifetime tokens

This commit fixes an accidental regression from #50473 where lifetime tokens
produced by procedural macros ended up getting lost in translation in the
compiler and not actually producing parseable code. The issue lies in the fact
that a lifetime's `Ident` is prefixed with `'`. The `glue` implementation for
gluing joint tokens together forgot to take this into account so the lifetime
inside of `Ident` was missing the leading tick!

The `glue` implementation here is updated to create a new `Symbol` in these
situations to manufacture a new `Ident` with a leading tick to ensure it parses
correctly.

Closes #50942

6 years agoRollup merge of #50945 - stjepang:stabilize-from-ref, r=SimonSapin
kennytm [Tue, 22 May 2018 16:26:17 +0000 (00:26 +0800)]
Rollup merge of #50945 - stjepang:stabilize-from-ref, r=SimonSapin

Stabilize feature from_ref

Function `from_ref_mut` is now renamed to `from_mut`, as discussed in #45703.

Closes #45703.

r? @SimonSapin

6 years agoRollup merge of #50932 - nnethercote:seen-Predicates, r=eddyb
kennytm [Tue, 22 May 2018 16:26:15 +0000 (00:26 +0800)]
Rollup merge of #50932 - nnethercote:seen-Predicates, r=eddyb

Optimize seen Predicate filtering.

This speeds up a few rustc-perf benchmark runs, most notably ones
involving 'coercions', the best by 2%.

6 years agoRollup merge of #50931 - nnethercote:inline-try_get, r=michaelwoerister
kennytm [Tue, 22 May 2018 16:26:14 +0000 (00:26 +0800)]
Rollup merge of #50931 - nnethercote:inline-try_get, r=michaelwoerister

Inline `try_get`.

This speeds up lots of rustc-perf benchmark runs. The maximum
improvement is 1%, but there are a lot in the 0.5--1.0% range.

6 years agoRollup merge of #50914 - simartin:issue_50636, r=oli-obk
kennytm [Tue, 22 May 2018 16:26:13 +0000 (00:26 +0800)]
Rollup merge of #50914 - simartin:issue_50636, r=oli-obk

Issue #50636: Improve error diagnostic with missing commas after struct fields.

Fixes #50636

6 years agoRollup merge of #50913 - d-e-s-o:fix-typo, r=joshtriplett
kennytm [Tue, 22 May 2018 16:26:12 +0000 (00:26 +0800)]
Rollup merge of #50913 - d-e-s-o:fix-typo, r=joshtriplett

Fix typo in cell.rs

6 years agoRollup merge of #50875 - QuietMisdreavus:short-features, r=GuillaumeGomez
kennytm [Tue, 22 May 2018 16:26:11 +0000 (00:26 +0800)]
Rollup merge of #50875 - QuietMisdreavus:short-features, r=GuillaumeGomez

rustdoc: use "short form" doc(cfg) printing even when combined with other conditionals

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

The original "short form" printing was introduced when `target_feature` was added to the `doc(cfg)` handling. However, it didn't properly propagate the "short form" indicator if the cfg was a combination of multiple conditionals, so the linked issue happened. This changes the handling to use a bool in the original `Html` wrapper, rather than a separate wrapper struct that defers to the original one.

6 years agoRollup merge of #50863 - oli-obk:const_len, r=SimonSapin,Gankro
kennytm [Tue, 22 May 2018 16:26:10 +0000 (00:26 +0800)]
Rollup merge of #50863 - oli-obk:const_len, r=SimonSapin,Gankro

Make `[T]::len` and `str::len` const fn

r? @Gankro

6 years agoRollup merge of #50849 - est31:visit_closure_args, r=michaelwoerister
kennytm [Tue, 22 May 2018 16:26:08 +0000 (00:26 +0800)]
Rollup merge of #50849 - est31:visit_closure_args, r=michaelwoerister

CheckLoopVisitor: also visit closure arguments

This turns the ICE #50581 in this code:

```rust
fn main() {
    |_: [u8; break]| ();
}
```

from
```
    'assertion failed: self.tcx.sess.err_count() > 0', librustc_typeck/check/mod.rs
```
to
```
    librustc_mir/hair/cx/expr.rs:543: invalid loop id for break: not inside loop scope
```

which is an ICE as well but at a later stage during compilation and most importantly
fixes of bug #50576 will fix this as well.

As this "only" moves an ICE to a later stage, I didn't add any tests.

Now I have manually verified the default impls of the visitor trait to check whether we have missed any other opportunity to visit more stuff and coudln't find anything (except the missing `break` visit I've fixed in #50829 but that one was already r+'d so I didn't want to push more commits).

6 years agoRollup merge of #50846 - GuillaumeGomez:add-e0665, r=frewsxcv
kennytm [Tue, 22 May 2018 16:26:06 +0000 (00:26 +0800)]
Rollup merge of #50846 - GuillaumeGomez:add-e0665, r=frewsxcv

Add E0665

6 years agopacify the mercilous tidy
Niko Matsakis [Tue, 22 May 2018 15:45:36 +0000 (11:45 -0400)]
pacify the mercilous tidy

6 years agocreate a rust-2018 directory for tests related to edition transition
Niko Matsakis [Tue, 22 May 2018 15:34:34 +0000 (11:34 -0400)]
create a rust-2018 directory for tests related to edition transition

6 years agobuild the 2018 edition
steveklabnik [Mon, 21 May 2018 19:31:12 +0000 (15:31 -0400)]
build the 2018 edition

6 years agopass down information about the root tree and use that to guide lint
Niko Matsakis [Tue, 22 May 2018 15:10:17 +0000 (11:10 -0400)]
pass down information about the root tree and use that to guide lint

6 years agoAdd some doc comments to SortedMap.
Michael Woerister [Mon, 21 May 2018 17:17:00 +0000 (19:17 +0200)]
Add some doc comments to SortedMap.

6 years agoCleanup SortedMap by wrapping element lookup in a method.
Michael Woerister [Mon, 21 May 2018 17:16:26 +0000 (19:16 +0200)]
Cleanup SortedMap by wrapping element lookup in a method.

6 years agoRemove SortedMap::iter_mut() since that allows to break the element sorting order...
Michael Woerister [Mon, 21 May 2018 17:15:00 +0000 (19:15 +0200)]
Remove SortedMap::iter_mut() since that allows to break the element sorting order which lookup relies on.

6 years agoRemove benchmarks from SortedMap.
Michael Woerister [Mon, 21 May 2018 14:12:02 +0000 (16:12 +0200)]
Remove benchmarks from SortedMap.

6 years agoUse SortedMap instead of BTreeMap for relocations in MIRI.
Michael Woerister [Fri, 18 May 2018 14:06:20 +0000 (16:06 +0200)]
Use SortedMap instead of BTreeMap for relocations in MIRI.

6 years agoAdd SortedMap to rustc_data_structures.
Michael Woerister [Fri, 18 May 2018 09:48:11 +0000 (11:48 +0200)]
Add SortedMap to rustc_data_structures.

6 years agoAuto merge of #49172 - oli-obk:const_let, r=eddyb
bors [Tue, 22 May 2018 12:57:06 +0000 (12:57 +0000)]
Auto merge of #49172 - oli-obk:const_let, r=eddyb

Allow let bindings and destructuring in constants and const fn

r? @eddyb

cc https://github.com/rust-lang/rust/issues/48821

6 years agoDeduplicate match arms
Oliver Schneider [Tue, 22 May 2018 11:56:37 +0000 (13:56 +0200)]
Deduplicate match arms

6 years agoAuto merge of #50520 - Zoxc:alloc-misc, r=oli-obk
bors [Tue, 22 May 2018 10:35:59 +0000 (10:35 +0000)]
Auto merge of #50520 - Zoxc:alloc-misc, r=oli-obk

Misc changes related to Miri allocations

This builds on top of https://github.com/rust-lang/rust/pull/50249

r? @oli-obk

6 years agoPrevent local paths into libstd from leaking into ui tests
Oliver Schneider [Tue, 22 May 2018 10:00:27 +0000 (12:00 +0200)]
Prevent local paths into libstd from leaking into ui tests

6 years agoRight-size the `VecDeque` in `coerce_unsized`.
Nicholas Nethercote [Tue, 22 May 2018 06:51:28 +0000 (16:51 +1000)]
Right-size the `VecDeque` in `coerce_unsized`.

The default capacity of a VecDeque is 8, which is excessive here. In a
"base incremental" check build of rustc-perf's tuple-stress benchmark,
this decreases total heap allocation by 26%. I couldn't see a clear
speedup, but it can't hurt.

6 years agoFix a typo in a comment
Oliver Schneider [Tue, 8 May 2018 15:29:09 +0000 (17:29 +0200)]
Fix a typo in a comment

6 years agoRemove now unused error code
Oliver Schneider [Tue, 8 May 2018 12:35:45 +0000 (14:35 +0200)]
Remove now unused error code

6 years agoReport let bindings and statements as unstable
Oliver Schneider [Tue, 8 May 2018 11:59:26 +0000 (13:59 +0200)]
Report let bindings and statements as unstable

6 years agoBe more explicit about what's skipped
Oliver Schneider [Mon, 7 May 2018 09:30:41 +0000 (11:30 +0200)]
Be more explicit about what's skipped

6 years agoAllow let bindings in const fn and constants
Oliver Schneider [Tue, 27 Mar 2018 19:16:37 +0000 (21:16 +0200)]
Allow let bindings in const fn and constants

6 years agoAuto merge of #50876 - matthewjasper:rollback-trivial-bounds, r=nikomatsakis
bors [Tue, 22 May 2018 06:54:34 +0000 (06:54 +0000)]
Auto merge of #50876 - matthewjasper:rollback-trivial-bounds, r=nikomatsakis

Filter global bounds from ParamEnv again.

This PR adds back the filtering of global bounds from ParamEnv as a temporary solution for #50825.

<details>

Long term, the fix seems like it should be changing the priority in `candidate_should_be_dropped_in_favor_of` so that (global) where clauses aren't considered as highly.

https://github.com/rust-lang/rust/blob/a722296b6ec17fecd3f16a7d3f9232b83e5de800/src/librustc/traits/select.rs#L2017-L2022

</details>

r? @nikomatsakis

6 years agoFix FileCheck finding
John Kåre Alsaker [Tue, 22 May 2018 01:40:01 +0000 (03:40 +0200)]
Fix FileCheck finding

6 years agoMicro-optimization on PR#50697
Keith Yeung [Tue, 22 May 2018 04:45:15 +0000 (21:45 -0700)]
Micro-optimization on PR#50697

6 years agoAuto merge of #50838 - alexcrichton:token-impls, r=eddyb
bors [Tue, 22 May 2018 04:17:20 +0000 (04:17 +0000)]
Auto merge of #50838 - alexcrichton:token-impls, r=eddyb

rustc: Fix joint-ness of stringified token-streams

This commit fixes `StringReader`'s parsing of tokens which have been stringified
through procedural macros. Whether or not a token tree is joint is defined by
span information, but when working with procedural macros these spans are often
dummy and/or overridden which means that they end up considering all operators
joint if they can!

The fix here is to track the raw source span as opposed to the overridden span.
With this information we can more accurately classify `Punct` structs as either
joint or not.

Closes #50700

6 years agoIntroduce AllocType which indicates what AllocIds point to
John Kåre Alsaker [Wed, 2 May 2018 04:03:06 +0000 (06:03 +0200)]
Introduce AllocType which indicates what AllocIds point to

6 years agoMove the allocation interner out of InterpretInternerInner
John Kåre Alsaker [Wed, 2 May 2018 04:03:02 +0000 (06:03 +0200)]
Move the allocation interner out of InterpretInternerInner

6 years agoGet rid of literal_alloc_cache
John Kåre Alsaker [Tue, 1 May 2018 10:18:53 +0000 (12:18 +0200)]
Get rid of literal_alloc_cache

6 years agoAuto merge of #50486 - Manishearth:approx-stab, r=nrc
bors [Tue, 22 May 2018 01:53:55 +0000 (01:53 +0000)]
Auto merge of #50486 - Manishearth:approx-stab, r=nrc

Stabilize suggestion applicability field in json output

cc @killercup

r? @nrc

6 years agoAuto merge of #49283 - varkor:combining-chars-escape_debug, r=SimonSapin
bors [Mon, 21 May 2018 23:26:32 +0000 (23:26 +0000)]
Auto merge of #49283 - varkor:combining-chars-escape_debug, r=SimonSapin

Escape combining characters in char::Debug

Although combining characters are technically printable, they make little sense to print on their own with `Debug`: it'd be better to escape them like non-printable characters.

This is a breaking change, but I imagine the fact `escape_debug` is rare and almost certainly primarily used for debugging that this is an acceptable change.
Resolves #41922.

r? @alexcrichton
cc @clarcharr

6 years agorustdoc: set tab width in rust source blocks
QuietMisdreavus [Mon, 21 May 2018 16:29:56 +0000 (11:29 -0500)]
rustdoc: set tab width in rust source blocks

6 years agoAuto merge of #50812 - kennytm:fix-50756-miri-bad-float-behavior, r=oli-obk
bors [Mon, 21 May 2018 21:16:16 +0000 (21:16 +0000)]
Auto merge of #50812 - kennytm:fix-50756-miri-bad-float-behavior, r=oli-obk

Fix issue #50811 (`NaN > NaN` was true).

Fix #50811

Make sure the float comparison output is consistent with the expected behavior when NaN is involved.

----

Note: This PR is a **BREAKING CHANGE**. If you have used `>` or `>=` to compare floats, and make the result as the length of a fixed array type, like:

```rust
use std::f64::NAN;
let x: [u8; (NAN > NAN) as usize] = [1];
```

then the code will no longer compile. Previously, all float comparison involving NaN will just return "Greater", i.e. `NAN > NAN` would wrongly return `true` during const evaluation. If you need to retain the old behavior (why), you may replace `a > b` with `a != a || b != b || a > b`.

6 years agoFix tables.rs
varkor [Mon, 21 May 2018 18:12:36 +0000 (19:12 +0100)]
Fix tables.rs

6 years agoAvoid counting characters and add explanatory comment to test
varkor [Mon, 21 May 2018 17:57:49 +0000 (18:57 +0100)]
Avoid counting characters and add explanatory comment to test

6 years agoOnly escape extended grapheme characters in the first position
varkor [Thu, 17 May 2018 09:45:34 +0000 (10:45 +0100)]
Only escape extended grapheme characters in the first position

6 years agoMake {char, str}::escape_debug and impl Debug for {char, str} consistent
varkor [Wed, 16 May 2018 22:20:22 +0000 (23:20 +0100)]
Make {char, str}::escape_debug and impl Debug for {char, str} consistent

6 years agoUse Grapheme_Extend instead of Mn
varkor [Wed, 16 May 2018 22:19:58 +0000 (23:19 +0100)]
Use Grapheme_Extend instead of Mn

6 years agoUse the correct output directory for downloading Unicode files
varkor [Wed, 16 May 2018 22:08:19 +0000 (23:08 +0100)]
Use the correct output directory for downloading Unicode files

6 years agoRemove example in test for is_nonspacing_mark because it's currently private
varkor [Fri, 13 Apr 2018 23:21:25 +0000 (00:21 +0100)]
Remove example in test for is_nonspacing_mark because it's currently private

6 years agoAdd test for Debug formatting of char
varkor [Thu, 12 Apr 2018 21:19:02 +0000 (22:19 +0100)]
Add test for Debug formatting of char

6 years agoEscape combining characters in escape_debug
varkor [Thu, 12 Apr 2018 10:39:18 +0000 (11:39 +0100)]
Escape combining characters in escape_debug

6 years agoKeep tables.rs copyright notice up to date
varkor [Thu, 12 Apr 2018 11:24:08 +0000 (12:24 +0100)]
Keep tables.rs copyright notice up to date

6 years agoDownload unicode data files in directory of unicode.py
varkor [Thu, 12 Apr 2018 11:09:47 +0000 (12:09 +0100)]
Download unicode data files in directory of unicode.py

6 years agoUpdate unicode/tables.rs with Mn
varkor [Thu, 12 Apr 2018 10:57:49 +0000 (11:57 +0100)]
Update unicode/tables.rs with Mn

6 years agoUpdate .gitignore for libstd_unicode
varkor [Thu, 12 Apr 2018 10:46:52 +0000 (11:46 +0100)]
Update .gitignore for libstd_unicode

6 years agoupdate tests
Manish Goregaokar [Mon, 21 May 2018 17:47:34 +0000 (10:47 -0700)]
update tests

6 years agoRemove rustc_serialize_exclude_null
Manish Goregaokar [Sun, 6 May 2018 20:30:57 +0000 (13:30 -0700)]
Remove rustc_serialize_exclude_null

6 years agoStabilize suggestion applicability field in json output
Manish Goregaokar [Sun, 6 May 2018 20:30:06 +0000 (13:30 -0700)]
Stabilize suggestion applicability field in json output

6 years agorustc_codegen_llvm: remove closure env alloca hack around upvar debuginfo.
Eduard-Mihai Burtescu [Mon, 21 May 2018 17:38:41 +0000 (20:38 +0300)]
rustc_codegen_llvm: remove closure env alloca hack around upvar debuginfo.

6 years agorustc_codegen_llvm: remove debuginfo::VariableKind::CapturedVariable.
Eduard-Mihai Burtescu [Mon, 21 May 2018 15:30:55 +0000 (18:30 +0300)]
rustc_codegen_llvm: remove debuginfo::VariableKind::CapturedVariable.

6 years agoAuto merge of #50801 - eddyb:param-things, r=nikomatsakis
bors [Mon, 21 May 2018 17:19:39 +0000 (17:19 +0000)]
Auto merge of #50801 - eddyb:param-things, r=nikomatsakis

Quick refactoring around Substs & friends.

r? @nikomatsakis