Commit Graph

72880 Commits

Author SHA1 Message Date
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
Sébastien Marie 8c7b0938c2 add aarch64-unknown-openbsd support
- make liblibc to point to libc with aarch64-unknown-openbsd
- make c_char (in std::os::raw) to point to right value
2017-12-17 19:48:31 +01: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
varkor 7104e8f7b4 Add an option to allow rustdoc to list modules by appearance
The `--sort-modules-by-appearance` option will list modules in the
order that they appear in the source, rather than sorting them
alphabetically (as is the default). This resolves #8552.
2017-12-17 15:22:50 +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
bors af57acef1c Auto merge of #46709 - Zoxc:par-merge, r=arielb1
Add sync module to rustc_data_structures

This PR is split out from https://github.com/rust-lang/rust/pull/45912, since github apparently can't handle such large PRs.

r? @arielb1
2017-12-17 13:15:40 +00:00
John Kåre Alsaker 970c613e4a Add sync module to rustc_data_structures 2017-12-17 14:14:51 +01:00
Michael Hewson 5c656f0c72 update ui/arbitrary-self-types-not-object-safe with shorter error message 2017-12-17 10:16:41 +01:00
Michael Hewson 23555b9f12 fix ui test
had to tell the test suite that it's supposed to compile
2017-12-17 10:13:09 +01:00
Michael Hewson 63ce99c6f8 add a ui test for the inference variable warning 2017-12-17 10:13:09 +01:00
Michael Hewson 0cc573a9ee better variable names in tests 2017-12-17 10:13:09 +01:00
Michael Hewson 4cae2c087d Add tests with *const Rc<Self> and similar self types 2017-12-17 10:13:09 +01:00
Michael Hewson bc0439b388 Warn about inference variables behind raw pointers in method lookup 2017-12-17 10:13:09 +01:00
Michael Hewson 428b0259b6 remove test for issue #26194 because it is now redundant 2017-12-17 10:13:09 +01:00
Michael Hewson c5fc7c5293 update error message in test/compile-fail/issue-26194.rs 2017-12-17 10:13:09 +01:00
Michael Hewson 8aac984e40 Fix ICE in probe::confirm::extract_existential_trait_ref with raw pointer self 2017-12-17 10:13:09 +01:00
Michael Hewson cb9f552b7c Add a feature_gate test for raw pointer self 2017-12-17 10:13:09 +01:00
Michael Hewson bff74fbfe2 shorten lines for tidy 2017-12-17 10:13:09 +01:00
Michael Hewson e7d1542a52 don't emit a type error if autoderef ends in an inference variable, as long as we went through a raw pointer
This avoids a break in backward compatibility in the following case:

```
let ptr = std::ptr::null();
let _ = &data as *const *const ();
if data.null() {}
```
2017-12-17 10:13:09 +01:00
Michael Hewson 083635eab2 changed some stuff in probe.rs and it broke libstd 2017-12-17 10:13:09 +01:00
Michael Hewson 361b3db886 implement raw-pointer `self`. Works for traits, including trait objects, but not structs 2017-12-17 10:13:09 +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
Simon Sapin 60dc10492c Move PhantomData<T> from Shared<T> to users of both Shared and #[may_dangle]
After discussing [1] today with @pnkfelix and @Gankro,
we concluded that it’s ok for drop checking not to be much smarter
than the current `#[may_dangle]` design which requires an explicit
unsafe opt-in.

[1] https://github.com/rust-lang/rust/issues/27730#issuecomment-316432083
2017-12-16 06:58:16 +01: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
bors abab7633d3 Auto merge of #46540 - euclio:import-parents, r=nrc
save-analysis: add parents to imports

This PR populates the `parent` field added to `Import` in `rls-data` 0.14.

I'm not quite sure if I handled nested imports' parents correctly: this is a new feature to me.

r? @nrc

cc https://github.com/nrc/rls-analysis/issues/123
2017-12-15 22:22:13 +00:00
Niko Matsakis 4f43c5b1e7 stop dumping DefPath into "failed type test" errors
The prior messages were not stable across platforms.
2017-12-15 17:04:48 -05: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
Andy Russell 59fafc8889
save-analysis: add parents to imports 2017-12-15 16:57:42 -05:00
Esteban Küber b562565b09 Same change to point at borrow for mir errors 2017-12-15 13:52:05 -08:00
Taylor Cramer e502194e7e Refactor argument-position impl Trait 2017-12-15 13:29:05 -08:00
varkor a399326ca2 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-15 19:25:05 +00:00