Commit Graph

85350 Commits

Author SHA1 Message Date
Steve Klabnik
569228a45e
Fix link to macros chapter
We're gonna link to nightly as this didn't make it into the corresponding stable.
2018-10-24 15:33:48 -04:00
Niko Matsakis
62f0fc5112 port the relate-types code from NLL type-check into a type-op
Add regression tests for #55219 and #55241

Also another test where a duplicate-like error appears to have been
suppressed; I'm not 100% sure why this output changes, though I could
imagine that some duplicate suppression is enabled by this PR.
2018-10-24 15:12:50 -04:00
Niko Matsakis
7c8887ccbf introduce (but do not use) ascribe_user_type goal
Lots of annoying boilerplate.
2018-10-24 15:12:40 -04:00
Esteban Küber
1ab45ec7e3 Point to macro def span instead of whole body 2018-10-24 11:34:23 -07:00
Masaki Hara
1c4864708f Remove license headers from unsized-locals tests. 2018-10-24 23:27:17 +09:00
Masaki Hara
4fd895a6b8 Add autoderef tests for by-value trait objects. 2018-10-24 23:18:15 +09:00
Masaki Hara
b3dce87a86 Move compile-fail/unsized-locals under ui as per #44844. 2018-10-24 22:55:40 +09:00
Masaki Hara
e568e98063 Move codegen_llvm::common::ty_fn_sig into rustc::ty::Instance. 2018-10-24 21:59:07 +09:00
Masaki Hara
06b6b1c790 Make declare_fn accept PolyFnSig instead of Ty. 2018-10-24 21:59:07 +09:00
Masaki Hara
2075316064 Include InstanceDef's discriminant in the symbol hash. 2018-10-24 21:59:07 +09:00
Masaki Hara
609cc26d31 Ensure virtual call receiver PassMode. 2018-10-24 21:59:07 +09:00
Masaki Hara
7c965e3e65 Prefer Move over Copy when dereferencing rvalue objects. 2018-10-24 21:59:07 +09:00
Masaki Hara
7ccf661524 Reflect by-value object safety in the unstable book. 2018-10-24 21:59:07 +09:00
Masaki Hara
4ce35fdd34 Add tests for unsized-locals. 2018-10-24 21:59:07 +09:00
Masaki Hara
5eceab02ec Implement by-value trait object method call. 2018-10-24 21:59:07 +09:00
Masaki Hara
f2ef005d1d Resolve to Instance::VtableShim when necessary. 2018-10-24 21:59:07 +09:00
Masaki Hara
250979c0ae Implement vtable shim generation. 2018-10-24 21:59:07 +09:00
Masaki Hara
1fb085511e Make declare_fn aware of vtable shims. 2018-10-24 21:59:06 +09:00
Masaki Hara
fe3f606cda Add ty_fn_sig_vtable for getting adjusted signature for vtable shims. 2018-10-24 21:59:06 +09:00
Masaki Hara
824315a722 Distinguish vtable shims in symbol paths. 2018-10-24 21:59:06 +09:00
Masaki Hara
6fd914a1af Add vtable-shim helper methods for Instance. 2018-10-24 21:59:06 +09:00
Masaki Hara
0ad4c6f850 Add InstanceDef::VtableShim. 2018-10-24 21:59:06 +09:00
Felix S. Klock II
be2075c661 This is a regression test for #54478.
I confirmed that it fails on:
rustdoc 1.30.0-beta.12 (96a229824 2018-10-04)
and passes on:
rustdoc 1.31.0-nightly (f99911a4a 2018-10-23)
2018-10-24 12:19:47 +02:00
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