Commit Graph

85327 Commits

Author SHA1 Message Date
Esteban Küber
8227a938a4 Point at macro definition when no rules expect token 2018-10-23 21:44:46 -07:00
Josh Stone
f2443a9b20 Set RUST_BACKTRACE=0 for rustdoc-ui/failed-doctest-output.rs
This UI test is sensitive to backtrace output, so it should make sure
that backtraces are not enabled by the environment.
2018-10-23 15:38:31 -07:00
Vadim Petrochenkov
d1e337bded Prohibit macro-expanded extern crate items shadowing crates passed with --extern 2018-10-24 01:33:35 +03:00
Son
35391326a6 Update comment based on suggestion. 2018-10-24 09:28:04 +11:00
Vadim Petrochenkov
7976aa32a9 Minor doc improvements 2018-10-24 00:14:50 +03:00
Vadim Petrochenkov
faefc83a7a Feature gate extern prelude additions from extern crate items
Fix rustdoc and fulldeps tests
2018-10-24 00:14:50 +03:00
Vadim Petrochenkov
0f625ac48d Add extern crate items to extern prelude 2018-10-24 00:14:50 +03:00
iirelu
320ec8137e Hopefully fix compile error
This was added in the fortnight this PR spent stale. I'm hoping this
one-liner fixes it.
2018-10-23 22:27:02 +02:00
bors
f99911a4a0 Auto merge of #55229 - nikomatsakis:issue-54692-closure-signatures, r=MatthewJasper
enforce user annotations in closure signatures

Not *quite* ready yet but I'm opening anyway. Still have to finish running tests locally.

Fixes #54692
Fixes #54124

r? @matthewjasper
2018-10-23 17:44:19 +00:00
Esteban Küber
ad144ac3c1 Modify invalid macro in expression context diagnostic 2018-10-23 10:07:34 -07:00
Esteban Küber
8544db0faa Add macro call span when lacking any other span in diagnostic 2018-10-23 10:07:11 -07:00
Kaz Wesley
3d9231c453 Update stdsimd submodule
Fixes a SSE2 bug.
2018-10-23 09:51:02 -07:00
Niko Matsakis
4394c83cb7 type_check/mod.rs: rustfmt 2018-10-23 10:57:06 -04:00
Niko Matsakis
1371cd27d0 check the self type is well-formed
This fixes `issue-28848.rs` -- it also handles another case that the
AST region checker gets wrong (`wf-self-type.rs`).  I don't actually
think that this is the *right way* to be enforcing this constraint --
I think we should probably do it more generally, perhaps by editing
`predicates_of` for the impl itself. The chalk-style implied bounds
setup ought to fix this.
2018-10-23 10:32:46 -04:00
Matthias Krüger
4972beaf65 fix typos in various places 2018-10-23 15:56:25 +02:00
Carol (Nichols || Goulding)
8d6ee8f54a
Do some copy editing on the release notes
I was reading through the release notes to find something and noticed
some small grammatical and consistency issues.
2018-10-23 07:53:48 -04:00
bors
d74b40205f Auto merge of #55281 - alexcrichton:revert-demote, r=petrochenkov
Revert "rustc: Fix (again) simd vectors by-val in ABI"

This reverts commit 3cc8f738d4.
2018-10-23 10:56:41 +00:00
bors
7cfe5de214 Auto merge of #55113 - mockersf:master, r=estebank
#45829 when a renamed import conflict with a previous import

Fix the suggestion when a renamed import conflict.

It check if the snipped contains `" as "`, and if so uses everything before for the suggestion.
2018-10-23 08:17:18 +00:00
Shotaro Yamada
fda3326a5a Remove redundant clone 2018-10-23 17:13:59 +09:00
Alex Crichton
086f5a55be Revert "rustc: Fix (again) simd vectors by-val in ABI"
This reverts commit 3cc8f738d4.
2018-10-23 00:59:14 -07:00
bors
d570b36cd9 Auto merge of #54778 - scottmcm:stabilize-ihle, r=pnkfelix
Stabilize impl_header_lifetime_elision in 2015

~~This is currently blocked on https://github.com/rust-lang/rust/issues/54902; it should be good after that~~

It's already stable in 2018; this finishes the stabilization.

FCP completed (https://github.com/rust-lang/rust/issues/15872#issuecomment-417953153), proposal (https://github.com/rust-lang/rust/issues/15872#issuecomment-412759783).

Tracking issue: https://github.com/rust-lang/rust/issues/15872
Usage examples (from libcore): https://github.com/rust-lang/rust/pull/54687
2018-10-23 04:05:50 +00:00
Wesley Wiser
c535147f29 Replace the run_passes! macro with a regular function
As suggested in the feedback for #55244.

When I replaced the macro with a function, rustc started complaining
that there were two unused functions so I also removed those.
2018-10-22 22:45:36 -04:00
Wesley Wiser
895a4b2d45 Remove the suite_index parameter of the run_passes!() macro
This can be obtained via the `$mir_phase` value.
2018-10-22 22:45:36 -04:00
Niko Matsakis
37e1d2975e Don't rerun Mir passes when inlining
When inlining a function using the Mir inliner, we shouldn't rerun the
various Mir passes on it because the Mir has already been lowered and
that wil break various early Mir passes.

The issue in #50411 is that we've inlined a function with promotions
whose Mir has already been lowered. The promotions are then copied into
the local function and we begin to run passes on their lowered Mir
which causes the ICE.

Fixes #50411
2018-10-22 22:45:36 -04:00
bors
979fb16db9 Auto merge of #55231 - zackmdavis:determinate, r=oli-obk
pick a reference issue for absolute-paths future incompatibility info

It would be kind of embarrassing to ship with the "issue TBD" message!
2018-10-23 01:24:26 +00:00
Esteban Kuber
81a609bd4c
add expected error comment
Co-Authored-By: csmoe <csmoe@msn.com>
2018-10-23 09:03:35 +08:00
Esteban Kuber
82b86e53e0
add expected error comment
Co-Authored-By: csmoe <csmoe@msn.com>
2018-10-23 09:03:11 +08:00
Aaron Hill
4f2624cac9
Fix Rustdoc ICE when checking blanket impls
Fixes #55001, #54744

Previously, SelectionContext would unconditionally cache the selection
result for an obligation. This worked fine for most users of
SelectionContext, but it caused an issue when used by Rustdoc's blanket
impl finder.

The issue occured when SelectionContext chose a ParamCandidate which
contained inference variables. Since inference variables can change
between calls to select(), it's not safe to cache the selection result -
the chosen candidate might not be applicable for future results, leading
to an ICE when we try to run confirmation.

This commit prevents SelectionContext from caching any ParamCandidate
that contains inference variables. This should always be completely
safe, as trait selection should never depend on a particular result
being cached.

I've also added some extra debug!() statements, which I found helpful in
tracking down this bug.
2018-10-22 19:40:43 -04:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
dd91c8fc5a [review comments] modify test and clean up code
Co-Authored-By: estebank <esteban@kuber.com.ar>
2018-10-22 14:56:03 -07:00
Esteban Küber
d0bd69a2d5 review comments 2018-10-22 14:56:02 -07:00
Esteban Küber
e1e52eb5a0 Suggest appropriate syntax on missing lifetime specifier in return type
Suggest using `'static` when a lifetime is missing in the return type
with a structured suggestion instead of a note.
2018-10-22 14:54:29 -07:00
Nicholas Nethercote
b5336c0b97 Add a cheap mode for compute_missing_ctors.
`compute_missing_ctors` is called a lot. It produces a vector, which can
be reasonably large (e.g. 100+ elements), but the vector is almost
always only checked for emptiness.

This commit changes `compute_missing_ctors` so it can be called in a
cheap way that just indicates if the vector would be empty. If
necessary, the function can subsequently be called in an expensive way
to compute the full vector.

This change reduces instruction counts for several benchmarks up to 2%.
2018-10-23 08:20:52 +11:00
Shotaro Yamada
80a6b736ac Unimplement ExactSizeIterator
If root is not START_BLOCK, `basic_blocks().len() - visited` does not represent
their exact size.
2018-10-23 01:54:02 +09:00
Niko Matsakis
64b5599352 stop reporting "unsatisfied lifetime bounds" errors after the first
In particular, after the first for a given region variable. This
suppresses a lot of duplicate errors.
2018-10-22 11:41:46 -04:00
Michael Bradshaw
5b84550d7c Keep an obligation for both sized and unsized types 2018-10-22 07:06:22 -07:00
Niko Matsakis
2921fbaaa8 flesh out closure-substs test 2018-10-22 10:04:47 -04:00
Niko Matsakis
0afccbb654 fix incremental test 2018-10-22 10:04:47 -04:00
Niko Matsakis
dbbdce51dc add regression test for #54124
Fixes #54124
2018-10-22 10:04:47 -04:00
Niko Matsakis
3a17880539 start enforcing closure types 2018-10-22 10:04:47 -04:00
Niko Matsakis
e0871ed318 record supplied sig of closure 2018-10-22 10:04:47 -04:00
Niko Matsakis
a8f3d6dafc convert user-provided signatures into def-id 2018-10-22 10:04:47 -04:00
Niko Matsakis
167b460961 add a table to track user-provided signatures 2018-10-22 10:00:32 -04:00
csmoe
a76690f6a4 optimize unsupported literal diag message 2018-10-22 20:28:37 +08:00
François Mockers
8fe6688fcf better dummy span detection and remove redundant branch 2018-10-22 09:08:09 +02:00
bors
a66dc8a148 Auto merge of #55224 - kryptan:master, r=matthewjasper
Use a keyword in raw identifier example

That's a very small documentation fix. The text says "you can now use keywords as identifiers" but example didn't use a keyword and would work without raw identifiers.
2018-10-22 03:41:28 +00:00
Michael Bradshaw
412ad9bf37 Allow extern statics with an extern type
Fixes #55239
2018-10-21 20:09:42 -07:00
bors
5481485670 Auto merge of #55126 - GuillaumeGomez:improve-search-tabs, r=QuietMisdreavus
improve search tabs look

Fixes #55056.

![screenshot from 2018-10-16 19-06-48](https://user-images.githubusercontent.com/3050060/47034247-1e08b280-d177-11e8-9c1e-c7320af9b561.png)

![screenshot from 2018-10-16 19-09-39](https://user-images.githubusercontent.com/3050060/47034255-2365fd00-d177-11e8-8686-4765d3e56ff5.png)

With this, I think it'll be more obvious.

cc @memoryruins

r? @QuietMisdreavus
2018-10-22 01:04:52 +00:00
varkor
c675111095
Correct trailing ellipsis in name_from_pat 2018-10-22 00:31:07 +01:00
Zack M. Davis
b0d3d3b959 only issue "variant of the expected type" suggestion for enums
Felix S. Klock II pointed out that this suggestion (introduced in
pull-request #43178 / eac74104) was being issued for one-field-struct
expected types (in which case it is misleading and outright wrong),
even though it was only intended for one-field enum-variants (most
notably, `Some`). Particularly tender-hearted code-historians may be
inclined to show mercy towards the author of #43178 on the grounds
that it's somewhat confusing that struct field definitions are given
in a type called `ty::VariantDef`.

Add a conditional to adhere to the original intent. (It would be
possible to generalize to structs, but not obviously net desirable.)
This adds a level of indentation, so the diff here is going to be
easier to read in ignore-whitespace mode (`-w`).

Resolves #55250.
2018-10-21 15:50:45 -07:00
Simon Sapin
ac18635435 Add MaybeUninit::new
Sometimes it *is* initialized!
2018-10-21 23:56:09 +02:00