Commit Graph

66659 Commits

Author SHA1 Message Date
Guillaume Gomez
b5f6884aeb Rollup merge of #46825 - GuillaumeGomez:mobile-search, r=QuietMisdreavus
Improve search display on mobile

r? @QuietMisdreavus
2017-12-18 23:08:41 +01:00
Guillaume Gomez
25e5af8a27 Rollup merge of #46824 - GuillaumeGomez:doc-sidebar, r=QuietMisdreavus
Fix dynamic crates listing in doc sidebar

Fixes #46687.

r? @QuietMisdreavus
2017-12-18 23:08:40 +01:00
Guillaume Gomez
c68c4b510c Rollup merge of #46812 - kennytm:fix-align-offset-sign, r=petrochenkov
Fix the wrong subtraction in align_offset intrinsic.

Given how the stage0 implementation in #43903 is written, as well as that in the RFC, I suppose the current implementation has a typo.

cc #44488, cc @oli-obk.
2017-12-18 23:08:39 +01:00
Guillaume Gomez
325d9fb8f6 Rollup merge of #46805 - estebank:unnecessary-unsafe-spans, r=arielb1
Tweak "unecessary unsafe block" error spans
2017-12-18 23:08:38 +01:00
Guillaume Gomez
3a2becbd84 Rollup merge of #46804 - estebank:conflicting-impl-def-span, r=arielb1
Use def span for conflicting impls and recursive fn
2017-12-18 23:08:37 +01:00
Guillaume Gomez
015502c4c5 Rollup merge of #46802 - estebank:redefined-def-span, r=michaelwoerister
Point at def span on redefined name diagnostic
2017-12-18 23:08:35 +01:00
Guillaume Gomez
12cd45286e Rollup merge of #46801 - estebank:impl-extra-req-def-span, r=arielb1
Point at def span in "impl has stricter requirements" diagnostic
2017-12-18 23:08:34 +01:00
Guillaume Gomez
6cc58b3fe8 Rollup merge of #46800 - estebank:expected-closure-def-span, r=arielb1
Rework expected closure error

* point at def span
* add label to primary span
* use `span_label`s instead of `span_note`s
2017-12-18 23:08:33 +01:00
Guillaume Gomez
c0a547a51e Rollup merge of #46790 - frewsxcv:frewsxcv-swap-bytes, r=QuietMisdreavus
Display binary notation for numeric swap_bytes methods.

This better illustrates what's happening to the bits behind the scenes.
2017-12-18 23:08:32 +01:00
Guillaume Gomez
723190752b Rollup merge of #46786 - GuillaumeGomez:fix-sized-rendering, r=QuietMisdreavus
Fix ?Sized where bound not being displayed at the correct place

Fixes #46726.

r? @QuietMisdreavus
2017-12-18 23:08:31 +01:00
Guillaume Gomez
9ab2227db1 Rollup merge of #46700 - GuillaumeGomez:more-relevant-doc-search, r=QuietMisdreavus
make doc search more relevant

Fixes #46595.

r? @QuietMisdreavus

If possible, I'd appreciate a strong check on this PR. :3
2017-12-18 23:08:30 +01:00
Guillaume Gomez
3d4c505078 Improve search display on mobile 2017-12-18 22:30:53 +01:00
Guillaume Gomez
cf18b1f22a Fix dynamic crates listing in doc sidebar 2017-12-18 21:15:46 +01:00
Esteban Küber
e1dc7ac33c Tweak "unecessary unsafe block" error spans 2017-12-18 11:11:35 -08:00
Esteban Küber
0555d256dd Rework expected closure error
* point at def span
* add label to primary span
* use `span_label`s instead of `span_note`s
2017-12-18 08:55:52 -08:00
Esteban Küber
c08dab841d Point at def span in "impl has stricter requirements" diagnostic 2017-12-18 08:54:20 -08:00
kennytm
749d8a880f
Fix the wrong subtraction in align_offset intrinsic. 2017-12-18 22:52:24 +08:00
Michael Woerister
a3c3245e91 incr.comp.: Mark DepKind node as input. 2017-12-18 15:40:07 +01:00
Guillaume Gomez
0df39bfff7 Fix ?Sized where bound not being displayed at the correct place 2017-12-18 10:44:26 +01:00
Esteban Küber
ea64ab7d4e Use def span for conflicting impls and recursive fn 2017-12-17 23:46:55 -08:00
Esteban Küber
61181aeead Point at def span on redefined name diagnostic 2017-12-17 22:44:32 -08:00
bors
a3a7203e2c Auto merge of #46798 - Diggsey:debug-osstr, r=dtolnay
Add lossless debug implementation for unix OsStrs

Fixes #22766

Invalid utf8 byte sequences are replaced with `\xFF` style escape codes, while valid utf8 goes through the normal `Debug` implementation.

This is necessarily different from the windows Debug implementation, which uses `\u{xxxx}` style escape sequences for unpaired surrogates, but both implementations are consistent in that they are both lossless, and display invalid sequences in the way most similar to existing language syntax.

r? @dtolnay
2017-12-18 02:54:11 +00:00
Diggory Blake
8fac7d95bc Add lossless debug implementation for unix OsStrs 2017-12-18 01:52:56 +00:00
Corey Farwell
05cb6a5857 Display binary notation for numeric swap_bytes methods.
This better illustrates what's happening to the bits behind the scenes.
2017-12-17 16:02:11 -05:00
bors
dc39c31699 Auto merge of #46788 - petrochenkov:assocrecov, r=estebank
syntax: recovery for incorrect associated item paths like `[T; N]::clone`

cc https://github.com/rust-lang/rust/pull/44970
Fixes https://github.com/rust-lang/rust/issues/42187
r? @estebank
2017-12-17 21:00:27 +00:00
Vadim Petrochenkov
70e5c37319 syntax: recovery for incorrect associated item paths like [T; N]::clone 2017-12-17 19:00:50 +03:00
bors
3cc68bac7c Auto merge of #46436 - eddyb:unpacked, r=arielb1,oli-obk
Detect unaligned fields via `aggregate.align < field.align`, instead of a `packed` flag.

Closes #46423. cc @oli-obk
2017-12-17 15:46:00 +00:00
Eduard-Mihai Burtescu
799a83ca2f Mark miri as broken. 2017-12-17 16:34:54 +02:00
Eduard-Mihai Burtescu
7dc79cc49b miri: pass pointer alignments directly instead of contextually. 2017-12-17 16:34:54 +02:00
Eduard-Mihai Burtescu
08646c6c2c miri: use separate Pointer and Align instead of PtrAndAlign. 2017-12-17 16:34:54 +02:00
Eduard-Mihai Burtescu
ff080d389d miri: track the Align instead of packedness in PtrAndAlign. 2017-12-17 16:34:54 +02:00
Eduard-Mihai Burtescu
5cab0bf0ad rustc_trans: always require alignment for load/store/memcpy. 2017-12-17 16:34:54 +02:00
Eduard-Mihai Burtescu
16307465d5 rustc_trans: always keep track of the Align in LvalueRef. 2017-12-17 16:34:54 +02:00
Eduard-Mihai Burtescu
7c6f242ca8 rustc: don't track whether layouts are "packed". 2017-12-17 16:34:54 +02:00
John Kåre Alsaker
970c613e4a Add sync module to rustc_data_structures 2017-12-17 14:14:51 +01:00
bors
53a6d14e5b Auto merge of #46778 - petrochenkov:nounwrap, r=arielb1
syntax: Rename `P::unwrap` into something less alarming
2017-12-17 04:23:55 +00:00
bors
35376587c8 Auto merge of #46761 - zackmdavis:concerning_incorrect_suggestions_for_referencing_a_cast, r=estebank
in which suggestions to borrow casts or binary expressions are rectified

 resolves #46756

r? @estebank
2017-12-17 01:56:12 +00:00
bors
1b1c792c77 Auto merge of #46750 - varkor:imp-llmod, r=estebank
Improve error messages on LLVM bitcode parsing failure

The LLVM error causing the parse failure is now printed, in the style
of the other thin LTO error messages. This prevents a flood of
assertion failure messages if the bitcode can’t be parsed.
2017-12-16 23:24:13 +00:00
Vadim Petrochenkov
a4aa26aaa0 syntax: Rename P::unwrap into P::into_inner 2017-12-17 02:21:29 +03:00
bors
3bee2b44cf Auto merge of #46763 - zackmdavis:and_the_case_of_the_erroneous_field_pattern_ellipsis, r=petrochenkov
in which `..` is suggested for erroneous `...` in struct field patterns

Resolves #46718. Supersedes #46721.

r? @petrochenkov
2017-12-16 19:32:19 +00:00
bors
4f2ef415ba Auto merge of #46743 - oli-obk:miri, r=eddyb
Some miri cleanups

r? @eddyb
2017-12-16 16:16:16 +00:00
bors
bdae618418 Auto merge of #46722 - arielb1:single-self, r=eddyb
fix broken assertion in type_param

Nested generics (aka method generics) in trait methods don't have an
*additional* Self parameter in their own type parameter list (they have
a Self parameter in the parent generics), so don't try to check we're
correctly adjusting for it.

Fixes #46568.

r? @eddyb
2017-12-16 09:12:04 +00:00
Zack M. Davis
d40197c471 in which .. is suggested for erroneous ... in struct field patterns
Resolves #46718.
2017-12-16 00:58:19 -08:00
Zack M. Davis
73a90194f9 in which suggestions to borrow casts or binary expressions are rectified
This simple patch resolves #46756 (which was specifically about the case of
casts, but it would be poor form indeed to fix a reported issue without at
least a cursory attempt at answering the immortal question, "How does this bug
generalize?").
2017-12-15 23:26:00 -08:00
bors
00fbfcce96 Auto merge of #46719 - estebank:issue-39268, r=pnkfelix
Point at var in short lived borrows instead of drop location

For RLS' sake, point at the borrow location as primary span for short lived borrows, instead of the borrow drop location.

Fix #39268.
2017-12-16 06:31:35 +00:00
bors
b3392f8ae4 Auto merge of #46560 - Yoric:incr, r=michaelwoerister
Loading the dependency graph in the background

Patch is a bit longer than I expected, due to the fact that most of this code relies upon a `Session` value, which is not `Sync`.
2017-12-16 03:54:10 +00:00
bors
39cb4c6057 Auto merge of #46757 - michaelwoerister:revert-46562, r=eddyb
incr.comp.: Revert hashing optimization that caused regression.

This PR reverts part of #46562 which caused [a regression in the crossbeam rust-icci](https://travis-ci.org/rust-icci/crossbeam/builds/316574774) test. I don't know what the problem is exactly yet. Fortunately, the problematic part is also the less important one, so reverting should not have much impact on performance.

r? @eddyb
2017-12-16 01:12:00 +00:00
Michael Woerister
c7e5b703cd incr.comp.: Revert hashing optimization that caused regression. 2017-12-15 16:50:07 -06:00
Andy Russell
b82d2809fd
save-analysis: dump extern crate imports 2017-12-15 16:57:51 -05:00
Andy Russell
b3c39560a4
save-analysis: document process_use_tree 2017-12-15 16:57:51 -05:00