Commit Graph

85691 Commits

Author SHA1 Message Date
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
vlad20012
ea3e9a3824 Add libproc_macro to rust-src distribution 2018-10-23 07:51:22 +03: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
Guillaume Gomez
b2f80ddf34 Fix multiple errors 2018-10-22 00:43:23 +02:00
Simon Sapin
ac18635435 Add MaybeUninit::new
Sometimes it *is* initialized!
2018-10-21 23:56:09 +02:00
Jakub Kądziołka
9f7009628f
Fix a typo in the documentation of RangeInclusive 2018-10-21 23:42:19 +02:00
bors
424a749a01 Auto merge of #55179 - bjorn3:miri_public_op_field, r=RalfJung
Give OpTy access to locals for priroda

r? @oli-obk
2018-10-21 20:07:34 +00:00
Peter Hall
0f6e2741f6
Clarified code example
The example was not as clear as it could be because it was making an assumption about the structure of the data in order to multiply the number of collection elements by the item size. This change demonstrates the idea more straightforwardly, without the calculation.
2018-10-21 18:53:09 +01:00
bors
12a88a6b09 Auto merge of #55236 - petrochenkov:pfail, r=davidtwco
Move parse-fail tests to UI

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

r? @davidtwco
2018-10-21 17:26:16 +00:00
Guillaume Gomez
dc5242592b improve search tabs look 2018-10-21 19:25:33 +02:00
Guillaume Gomez
f729f4a75e Update failing test 2018-10-21 19:22:37 +02:00
Guillaume Gomez
9d8de1e30a Fix script to avoid displaying unnecessary items 2018-10-21 19:22:21 +02:00
Guillaume Gomez
edec5807ac Hide items if they use default docs 2018-10-21 18:28:27 +02:00
Guillaume Gomez
ff48ccfeab Improve stability messages display a bit 2018-10-21 18:28:27 +02:00
Matthias Krüger
9378705f82 submodules: update clippy from 5afdf8b7 to b1d03437
Changes:
````
new_ret_no_self: add sample from #3313 to Known Problems section.
Support multiline comments and hopefully fix panic
Check for comments in collapsible ifs
Resolve ICE in needless range loop lint
RIIR update_lints: Update changelog links
Rename if_let_redundant_pattern_matching to redundant_pattern_matching
Add lint for redundant pattern matching for explicit return boolean
Fix issue #3322: reword help message for len_zero
Simplify manual_memcpy suggestion in some cases
Fix dogfood
Update known problems for unnecessary_fold
RIIR update_lints: Replace lint count in README.md
Rename `active_lints` to `usable_lints`
Add comment on WalkDir vs. fs::read_dir
sort_by -> sort_by_key
Some more documentation for clippy_dev
Use `WalkDir` to also gather from subdirectories
Avoid linting `boxed_local` on trait implementations.
Website: Make lint categories linkable
Restore clippy_dummy's placeholder name
Swap order of methods in `needless_range_loop` suggestion in some cases
Revert "Exclude pattern guards from unnecessary_fold lint"
Exclude pattern guards from unnecessary_fold lint
````
2018-10-21 17:56:00 +02:00
bors
0e2f912050 Auto merge of #52984 - fabric-and-ink:remove-canonical-var, r=scalexm
Replace CanonicalVar with DebruijnIndex

Close #49887
2018-10-21 14:42:35 +00:00
bjorn3
b178553e55 Address review comments 2018-10-21 16:16:23 +02:00
bjorn3
c32cf25689 Rename read_local_of_frame to access_local 2018-10-21 15:49:20 +02:00
bjorn3
f46e3ba308 Rename alloc_map_ref to alloc_map 2018-10-21 15:49:20 +02:00
bjorn3
825b55e763 Add alloc_map accessor 2018-10-21 15:49:19 +02:00
bjorn3
3742892749 Use read_local_of_frame in eval_place_to_op
Also make `layout_of_local` accept any `Frame`
2018-10-21 15:49:19 +02:00