]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoRollup merge of #62108 - Zoxc:sharded-queries, r=oli-obk
Mazdak Farrokhzad [Mon, 12 Aug 2019 08:58:12 +0000 (10:58 +0200)]
Rollup merge of #62108 - Zoxc:sharded-queries, r=oli-obk

Use sharded maps for queries

Based on https://github.com/rust-lang/rust/pull/61779.

r? @Gankro

4 years agoAuto merge of #63469 - Centril:refactor-parser, r=petrochenkov
bors [Mon, 12 Aug 2019 02:35:55 +0000 (02:35 +0000)]
Auto merge of #63469 - Centril:refactor-parser, r=petrochenkov

libsyntax: Refactor `parser.rs` into reasonably sized logical units

Here we split `parser.rs` (~7.9 KLOC) into more reasonably sized files (all < 1.8 KLOC):

- `./src/libsyntax/parse/`
   - `parser.rs`
   - `parser/`
      - `pat.rs`
      - `expr.rs`
      - `stmt.rs`
      - `ty.rs`
      - `path.rs`
      - `generics.rs`
      - `item.rs`
      - `module.rs`

Closes https://github.com/rust-lang/rust/issues/60015.

r? @petrochenkov

4 years agoAuto merge of #63472 - Xanewok:update-rls, r=Mark-Simulacrum
bors [Sun, 11 Aug 2019 22:53:30 +0000 (22:53 +0000)]
Auto merge of #63472 - Xanewok:update-rls, r=Mark-Simulacrum

Update RLS

This update includes the ability to warn on deprecated config keys.
It's important to be able to warn the user whenever they're using
an old configuration rather than giving them a cryptic "unknown
configuration error"

cc https://github.com/rust-lang/rls-vscode/issues/639

Since we removed a config value in the current nightly, it'd be
very good if this change can make also make it before cutting the
next release.

4 years agoAuto merge of #63471 - Mark-Simulacrum:rollup-m756lnx, r=Mark-Simulacrum
bors [Sun, 11 Aug 2019 19:19:33 +0000 (19:19 +0000)]
Auto merge of #63471 - Mark-Simulacrum:rollup-m756lnx, r=Mark-Simulacrum

Rollup of 8 pull requests

Successful merges:

 - #61969 (Add #[repr(transparent)] for several types)
 - #63346 (Lint on some incorrect uses of mem::zeroed / mem::uninitialized)
 - #63433 (Miri shouldn't look at types)
 - #63440 (rename RUST_CTFE_BACKTRACE to RUSTC_CTFE_BACKTRACE)
 - #63441 (Derive Debug for CrateInfo)
 - #63442 (Add an example to show how to insert item to a sorted vec)
 - #63453 (rustdoc: general cleanup)
 - #63464 (Copy ty::Instance instead of passing by reference)

Failed merges:

r? @ghost

4 years agoRollup merge of #63464 - Mark-Simulacrum:deref-instance, r=eddyb
Mark Rousskov [Sun, 11 Aug 2019 19:18:49 +0000 (15:18 -0400)]
Rollup merge of #63464 - Mark-Simulacrum:deref-instance, r=eddyb

Copy ty::Instance instead of passing by reference

ty::Instance is small and Copy, we should not be adding additional
indirection.

Fixes #63409.

r? @eddyb

4 years agoRollup merge of #63453 - Mark-Simulacrum:rustdoc-clean-2, r=GuillaumeGomez
Mark Rousskov [Sun, 11 Aug 2019 19:18:47 +0000 (15:18 -0400)]
Rollup merge of #63453 - Mark-Simulacrum:rustdoc-clean-2, r=GuillaumeGomez

rustdoc: general cleanup

Almost all commits stand alone; but all commits can be reviewed individually.

4 years agoRollup merge of #63442 - lzutao:vec-bin-search-insert, r=Mark-Simulacrum
Mark Rousskov [Sun, 11 Aug 2019 19:18:46 +0000 (15:18 -0400)]
Rollup merge of #63442 - lzutao:vec-bin-search-insert, r=Mark-Simulacrum

Add an example to show how to insert item to a sorted vec

Closes #61684
cc #61742
r? @Mark-Simulacrum, @jonas-schievink

4 years agoRollup merge of #63441 - bjorn3:patch-1, r=Mark-Simulacrum
Mark Rousskov [Sun, 11 Aug 2019 19:18:44 +0000 (15:18 -0400)]
Rollup merge of #63441 - bjorn3:patch-1, r=Mark-Simulacrum

Derive Debug for CrateInfo

4 years agoRollup merge of #63440 - RalfJung:ctfe-backtrace, r=oli-obk
Mark Rousskov [Sun, 11 Aug 2019 19:18:43 +0000 (15:18 -0400)]
Rollup merge of #63440 - RalfJung:ctfe-backtrace, r=oli-obk

rename RUST_CTFE_BACKTRACE to RUSTC_CTFE_BACKTRACE

This matches `RUSTC_LOG`. Both affect only rustc, not any Rust program.

4 years agoRollup merge of #63433 - RalfJung:miri-call, r=oli-obk
Mark Rousskov [Sun, 11 Aug 2019 19:18:41 +0000 (15:18 -0400)]
Rollup merge of #63433 - RalfJung:miri-call, r=oli-obk

Miri shouldn't look at types

r? @oli-obk

Fixes https://github.com/rust-lang/rust/issues/62137

4 years agoRollup merge of #63346 - RalfJung:zeroed-lint, r=eddyb
Mark Rousskov [Sun, 11 Aug 2019 19:18:40 +0000 (15:18 -0400)]
Rollup merge of #63346 - RalfJung:zeroed-lint, r=eddyb

Lint on some incorrect uses of mem::zeroed / mem::uninitialized

Cc https://github.com/rust-lang/rust/issues/62825 and https://internals.rust-lang.org/t/make-mem-uninitialized-and-mem-zeroed-panic-for-some-types-where-0-is-a-niche/10605

This does not yet handle `NonNull`/`NonZero*`, but it is a start.

I also improved some doc issues I hit on the way, and added a useful helper to `TyS`.

EDIT: I added the relnotes label mostly as a proposal -- I think this is worth mentioning, but leave the decision up to the release team.

4 years agoRollup merge of #61969 - MikailBag:master, r=Centril
Mark Rousskov [Sun, 11 Aug 2019 19:18:38 +0000 (15:18 -0400)]
Rollup merge of #61969 - MikailBag:master, r=Centril

Add #[repr(transparent)] for several types

In some functions, types mentioned in this PR are transmuted into their inner value.
Example for `PathBuf`: https://github.com/rust-lang/rust/blob/master/src/libstd/path.rs#L1132.
This PR adds `#[repr(transparent)]` to those types, so their correct behavior doesn't depend on compiler details. (As far as I understand, currently that line, converting `PathBuf` to `Vec<u8>`, is UB).

4 years agoUpdate RLS
Igor Matuszewski [Sun, 11 Aug 2019 19:10:16 +0000 (21:10 +0200)]
Update RLS

This update includes the ability to warn on deprecated config keys.
It's important to be able to warn the user whenever they're using
an old configuration rather than giving them a cryptic "unknown
configuration error"

cc https://github.com/rust-lang/rls-vscode/issues/639

Since we removed a config value in the current nightly, it'd be
very good if this change can make also make it before cutting the
next release.

4 years agoparser: {check,expect}_lifetime into ty.rs
Mazdak Farrokhzad [Sun, 11 Aug 2019 18:46:34 +0000 (20:46 +0200)]
parser: {check,expect}_lifetime into ty.rs

4 years agoparser: move into generics.rs
Mazdak Farrokhzad [Sun, 11 Aug 2019 18:44:09 +0000 (20:44 +0200)]
parser: move into generics.rs

4 years agoparser: move into stmt.rs
Mazdak Farrokhzad [Sun, 11 Aug 2019 18:32:29 +0000 (20:32 +0200)]
parser: move into stmt.rs

4 years agoparser: move parse_fn_block_decl into expr.rs
Mazdak Farrokhzad [Sun, 11 Aug 2019 18:04:09 +0000 (20:04 +0200)]
parser: move parse_fn_block_decl into expr.rs

4 years agoparser: move parse_ident_or_underscore into item.rs
Mazdak Farrokhzad [Sun, 11 Aug 2019 18:00:38 +0000 (20:00 +0200)]
parser: move parse_ident_or_underscore into item.rs

4 years agoparser: split into {ty, path}.rs
Mazdak Farrokhzad [Sun, 11 Aug 2019 17:59:27 +0000 (19:59 +0200)]
parser: split into {ty, path}.rs

4 years agoparser: split into {item,module}.rs
Mazdak Farrokhzad [Sun, 11 Aug 2019 16:34:42 +0000 (18:34 +0200)]
parser: split into {item,module}.rs

4 years agoCopy ty::Instance instead of passing by reference
Mark Rousskov [Sun, 11 Aug 2019 14:54:38 +0000 (10:54 -0400)]
Copy ty::Instance instead of passing by reference

ty::Instance is small and Copy, we should not be adding additional
indirection.

4 years agoDerive Debug for NativeLibrary and NativeLibraryKind
bjorn3 [Sun, 11 Aug 2019 14:51:36 +0000 (16:51 +0200)]
Derive Debug for NativeLibrary and NativeLibraryKind

4 years agoReduce nesting in externalfiles implementation
Mark Rousskov [Sat, 10 Aug 2019 22:39:50 +0000 (18:39 -0400)]
Reduce nesting in externalfiles implementation

Utilize `?` instead of and_then/map operators

4 years agoDrop RefCell from IdMap in markdown rendering
Mark Rousskov [Sat, 10 Aug 2019 22:36:04 +0000 (18:36 -0400)]
Drop RefCell from IdMap in markdown rendering

4 years agoRemove fmt::Display impls on Markdown structs
Mark Rousskov [Sat, 10 Aug 2019 22:27:17 +0000 (18:27 -0400)]
Remove fmt::Display impls on Markdown structs

These impls prevent ergonomic use of the config (e.g., forcing us to use
RefCell) despite all usecases for these structs only using their Display
impls once.

4 years agoRemove thread-local for playground config
Mark Rousskov [Sat, 10 Aug 2019 22:07:07 +0000 (18:07 -0400)]
Remove thread-local for playground config

4 years agoRemove unnecessary channel
Mark Rousskov [Sat, 10 Aug 2019 21:16:01 +0000 (17:16 -0400)]
Remove unnecessary channel

4 years agoUse a HashSet instead of Vec
Mark Rousskov [Sat, 10 Aug 2019 21:10:13 +0000 (17:10 -0400)]
Use a HashSet instead of Vec

4 years agoDon't store all traits in DocContext
Mark Rousskov [Sat, 10 Aug 2019 20:59:21 +0000 (16:59 -0400)]
Don't store all traits in DocContext

This is already a query so we're just needlessly copying the data
around.

4 years agoStore typed Passes
Mark Rousskov [Sat, 10 Aug 2019 20:43:39 +0000 (16:43 -0400)]
Store typed Passes

4 years agoReplace Arc with Rc around external_traits
Mark Rousskov [Sat, 10 Aug 2019 20:19:25 +0000 (16:19 -0400)]
Replace Arc with Rc around external_traits

4 years agoRemove ReentrantMutex
Mark Rousskov [Sat, 10 Aug 2019 19:20:21 +0000 (15:20 -0400)]
Remove ReentrantMutex

This drops the parking_lot dependency; the ReentrantMutex type appeared
to be unused (at least, no compilation failures occurred).

This is technically a possible change in behavior of its users, as
lock() would wait on other threads releasing their guards, but since we
didn't actually remove any threading or such in this code, it appears
that we never used that behavior (the behavior change is only noticeable
if the type previously was used in two threads, in a single thread
ReentrantMutex is useless).

4 years agoUse entry API in store_path
Mark Rousskov [Sat, 10 Aug 2019 17:52:45 +0000 (13:52 -0400)]
Use entry API in store_path

4 years agoRemove crate_name from DocContext
Mark Rousskov [Sat, 10 Aug 2019 17:44:23 +0000 (13:44 -0400)]
Remove crate_name from DocContext

tcx.crate_name is the appropriate way to retrieve the crate name.

4 years agoMove def_id_to_path to use site in visit_ast
Mark Rousskov [Sat, 10 Aug 2019 17:37:31 +0000 (13:37 -0400)]
Move def_id_to_path to use site in visit_ast

4 years agorustdoc: Replace HirVec with slices in doctree
Mark Rousskov [Sat, 10 Aug 2019 17:25:50 +0000 (13:25 -0400)]
rustdoc: Replace HirVec with slices in doctree

4 years agoAuto merge of #63446 - Centril:refactor-lowering, r=oli-obk
bors [Sun, 11 Aug 2019 13:37:37 +0000 (13:37 +0000)]
Auto merge of #63446 - Centril:refactor-lowering, r=oli-obk

Refactor and categorize lowering wrt. items / exprs

Split lowering into more files along the lines of "expression related" and "item related".
Also refactor huge methods into smaller ones.

A next step might be to introduce "type related" and merge patterns and statements combined with expressions into "value related". There's still more work to do but the PR was getting too big :)

r? @oli-obk

4 years agoparser: split into pat.rs
Mazdak Farrokhzad [Sun, 11 Aug 2019 13:24:37 +0000 (15:24 +0200)]
parser: split into pat.rs

4 years agoparser: split into expr.rs
Mazdak Farrokhzad [Sun, 11 Aug 2019 11:14:30 +0000 (13:14 +0200)]
parser: split into expr.rs

4 years agoupdate clippy
Ralf Jung [Sun, 11 Aug 2019 10:06:12 +0000 (12:06 +0200)]
update clippy

4 years agonote down some more future plans
Ralf Jung [Wed, 7 Aug 2019 14:23:11 +0000 (16:23 +0200)]
note down some more future plans

4 years agoallow the lint if a few UB-demonstrating doc tests
Ralf Jung [Wed, 7 Aug 2019 09:59:23 +0000 (11:59 +0200)]
allow the lint if a few UB-demonstrating doc tests

4 years agoproper doc comment for 'recovered' field of variant
Ralf Jung [Wed, 7 Aug 2019 09:52:40 +0000 (11:52 +0200)]
proper doc comment for 'recovered' field of variant

Curtesy of petrochenkov

4 years agonote a FIXME
Ralf Jung [Wed, 7 Aug 2019 08:09:42 +0000 (10:09 +0200)]
note a FIXME

4 years agoadd tuple_fields convenience method and use it in a few places
Ralf Jung [Wed, 7 Aug 2019 07:01:53 +0000 (09:01 +0200)]
add tuple_fields convenience method and use it in a few places

4 years agofix a comment
Ralf Jung [Wed, 7 Aug 2019 06:43:42 +0000 (08:43 +0200)]
fix a comment

4 years agowarn for more cases
Ralf Jung [Wed, 7 Aug 2019 06:42:50 +0000 (08:42 +0200)]
warn for more cases

4 years agoadd basic lint testing for misuse of mem::zeroed and mem::uninitialized
Ralf Jung [Tue, 6 Aug 2019 21:11:52 +0000 (23:11 +0200)]
add basic lint testing for misuse of mem::zeroed and mem::uninitialized

4 years agoAuto merge of #63343 - ishitatsuyuki:revert-62150, r=RalfJung
bors [Sun, 11 Aug 2019 09:58:01 +0000 (09:58 +0000)]
Auto merge of #63343 - ishitatsuyuki:revert-62150, r=RalfJung

Back out #62150

Ref: #62825

cc @RalfJung

4 years agoAuto merge of #63413 - RalfJung:miri, r=oli-obk
bors [Sun, 11 Aug 2019 02:05:40 +0000 (02:05 +0000)]
Auto merge of #63413 - RalfJung:miri, r=oli-obk

update Miri

With https://github.com/rust-lang/rust/pull/63404 landed, we need https://github.com/rust-lang/miri/pull/898 to avoid failures in https://github.com/RalfJung/miri-test-libstd.

r? @oli-obk

4 years agoAuto merge of #63250 - petrochenkov:descrate, r=davidtwco
bors [Sat, 10 Aug 2019 22:29:20 +0000 (22:29 +0000)]
Auto merge of #63250 - petrochenkov:descrate, r=davidtwco

diagnostics: Describe crate root modules in `DefKind::Mod` as "crate"

Or we can use "extern crate" like resolve previously did sometimes, not sure.

r? @davidtwco

4 years agoUpdate cargo
Vadim Petrochenkov [Sat, 10 Aug 2019 20:19:09 +0000 (23:19 +0300)]
Update cargo

4 years agodiagnostics: Describe crate root modules in `DefKind::Mod` as "crate"
Vadim Petrochenkov [Sat, 3 Aug 2019 23:07:35 +0000 (02:07 +0300)]
diagnostics: Describe crate root modules in `DefKind::Mod` as "crate"

4 years agolowering: move lower_arg -> item.rs
Mazdak Farrokhzad [Sat, 10 Aug 2019 18:23:34 +0000 (20:23 +0200)]
lowering: move lower_arg  -> item.rs

4 years agolowering: move scope & capture_clause stuff -> expr.rs
Mazdak Farrokhzad [Sat, 10 Aug 2019 18:21:15 +0000 (20:21 +0200)]
lowering: move scope & capture_clause stuff  -> expr.rs

4 years agolowering: refactor into item.rs
Mazdak Farrokhzad [Sat, 10 Aug 2019 18:13:12 +0000 (20:13 +0200)]
lowering: refactor into item.rs

4 years agolowering: move {lower_arm,arm} -> expr.rs
Mazdak Farrokhzad [Sat, 10 Aug 2019 15:48:09 +0000 (17:48 +0200)]
lowering: move {lower_arm,arm}  -> expr.rs

4 years agolowering: move field -> expr.rs
Mazdak Farrokhzad [Sat, 10 Aug 2019 15:40:35 +0000 (17:40 +0200)]
lowering: move field  -> expr.rs

4 years agolowering: refactor label/dest -> expr.rs
Mazdak Farrokhzad [Sat, 10 Aug 2019 15:37:10 +0000 (17:37 +0200)]
lowering: refactor label/dest  -> expr.rs

4 years agolowering: move lower_{unop,binop} -> expr.rs
Mazdak Farrokhzad [Sat, 10 Aug 2019 15:28:04 +0000 (17:28 +0200)]
lowering: move lower_{unop,binop} -> expr.rs

4 years agolowering: move lower_field -> expr.rs
Mazdak Farrokhzad [Sat, 10 Aug 2019 15:26:11 +0000 (17:26 +0200)]
lowering: move lower_field -> expr.rs

4 years agolowering: move expr builder methods -> expr.rs
Mazdak Farrokhzad [Sat, 10 Aug 2019 15:22:39 +0000 (17:22 +0200)]
lowering: move expr builder methods -> expr.rs

4 years agolowering: move make_async_expr -> expr.rs
Mazdak Farrokhzad [Sat, 10 Aug 2019 14:42:14 +0000 (16:42 +0200)]
lowering: move make_async_expr -> expr.rs

4 years agolowering: extract lower_expr_let
Mazdak Farrokhzad [Sat, 10 Aug 2019 13:42:08 +0000 (15:42 +0200)]
lowering: extract lower_expr_let

4 years agolowering: extract lower_expr_if
Mazdak Farrokhzad [Sat, 10 Aug 2019 13:37:02 +0000 (15:37 +0200)]
lowering: extract lower_expr_if

4 years agolowering: extract lower_expr_while_in_loop_scope
Mazdak Farrokhzad [Sat, 10 Aug 2019 13:28:57 +0000 (15:28 +0200)]
lowering: extract lower_expr_while_in_loop_scope

4 years agolowering: move wrap_in_try_constructor -> expr.rs
Mazdak Farrokhzad [Sat, 10 Aug 2019 13:11:22 +0000 (15:11 +0200)]
lowering: move wrap_in_try_constructor -> expr.rs

4 years agolowering: extract lower_expr_try_block
Mazdak Farrokhzad [Sat, 10 Aug 2019 13:09:18 +0000 (15:09 +0200)]
lowering: extract lower_expr_try_block

4 years agolowering: move lower_await -> expr.rs
Mazdak Farrokhzad [Sat, 10 Aug 2019 13:01:38 +0000 (15:01 +0200)]
lowering: move lower_await -> expr.rs

4 years agolowering: extract lower_expr_closure
Mazdak Farrokhzad [Sat, 10 Aug 2019 12:53:23 +0000 (14:53 +0200)]
lowering: extract lower_expr_closure

4 years agolowering: extract lower_expr_async_closure
Mazdak Farrokhzad [Sat, 10 Aug 2019 12:47:23 +0000 (14:47 +0200)]
lowering: extract lower_expr_async_closure

4 years agolowering: extract lower_expr_range_closed
Mazdak Farrokhzad [Sat, 10 Aug 2019 12:38:11 +0000 (14:38 +0200)]
lowering: extract lower_expr_range_closed

4 years agolowering: extract lower_expr_range
Mazdak Farrokhzad [Sat, 10 Aug 2019 12:34:54 +0000 (14:34 +0200)]
lowering: extract lower_expr_range

4 years agolowering: extract lower_expr_asm
Mazdak Farrokhzad [Sat, 10 Aug 2019 12:28:11 +0000 (14:28 +0200)]
lowering: extract lower_expr_asm

4 years agolowering: extract lower_expr_yield
Mazdak Farrokhzad [Sat, 10 Aug 2019 12:24:34 +0000 (14:24 +0200)]
lowering: extract lower_expr_yield

4 years agolowering: extract lower_expr_for
Mazdak Farrokhzad [Sat, 10 Aug 2019 12:16:57 +0000 (14:16 +0200)]
lowering: extract lower_expr_for

4 years agolowering: extract lower_expr_try
Mazdak Farrokhzad [Sat, 10 Aug 2019 12:14:53 +0000 (14:14 +0200)]
lowering: extract lower_expr_try

4 years agolowering: move lower_expr -> expr.rs
Mazdak Farrokhzad [Sat, 10 Aug 2019 11:50:48 +0000 (13:50 +0200)]
lowering: move lower_expr -> expr.rs

4 years agoAuto merge of #62955 - Mark-Simulacrum:rustdoc-clean-1, r=eddyb
bors [Sat, 10 Aug 2019 17:19:55 +0000 (17:19 +0000)]
Auto merge of #62955 - Mark-Simulacrum:rustdoc-clean-1, r=eddyb

rustdoc: general cleanups

This is purely a refactoring, mostly just simplifying some of the code. Commits are best reviewed individually.

4 years agoUse Result::unwrap_or_else instead of matching
Lzu Tao [Sat, 10 Aug 2019 17:16:58 +0000 (17:16 +0000)]
Use Result::unwrap_or_else instead of matching

4 years agoAdd an example to show how to insert item to a sorted vec
Lzu Tao [Sat, 10 Aug 2019 16:31:38 +0000 (16:31 +0000)]
Add an example to show how to insert item to a sorted vec

4 years agoDerive Debug for CrateInfo
bjorn3 [Sat, 10 Aug 2019 14:47:27 +0000 (16:47 +0200)]
Derive Debug for CrateInfo

4 years agorename RUST_CTFE_BACKTRACE to RUSTC_CTFE_BACKTRACE
Ralf Jung [Sat, 10 Aug 2019 14:37:40 +0000 (16:37 +0200)]
rename RUST_CTFE_BACKTRACE to RUSTC_CTFE_BACKTRACE

4 years agoAuto merge of #63437 - Centril:rollup-ryx881p, r=Centril
bors [Sat, 10 Aug 2019 13:44:09 +0000 (13:44 +0000)]
Auto merge of #63437 - Centril:rollup-ryx881p, r=Centril

Rollup of 4 pull requests

Successful merges:

 - #63400 (Try to break resolve into more isolated parts)
 - #63425 (Cleanup historical stability comments)
 - #63429 (.gitignore: Readd `/tmp/`)
 - #63432 (Cleanup & Simplify stuff in lowering)

Failed merges:

r? @ghost

4 years agoRollup merge of #63432 - Centril:simplify-lowering, r=eddyb
Mazdak Farrokhzad [Sat, 10 Aug 2019 13:27:36 +0000 (15:27 +0200)]
Rollup merge of #63432 - Centril:simplify-lowering, r=eddyb

Cleanup & Simplify stuff in lowering

Closes https://github.com/rust-lang/rust/issues/60253 as a byproduct.

It turns out that it is in fact necessary to have a `DropTemps(...)` around the `match_expr` and there is a test (https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-13304.rs) which fails without that.

r? @eddyb

4 years agoRollup merge of #63429 - rust-lang:gitignore-readd-tmp, r=Mark-Simulacrum
Mazdak Farrokhzad [Sat, 10 Aug 2019 13:27:34 +0000 (15:27 +0200)]
Rollup merge of #63429 - rust-lang:gitignore-readd-tmp, r=Mark-Simulacrum

.gitignore: Readd `/tmp/`

Specifically, `/tmp/partitioning-tests/` it is generated by the incremental tests, https://github.com/rust-lang/rust/search?p=2&q=partitioning-tests&unscoped_q=partitioning-tests. These are cleaned up by compiletest but not if you kill testing prematurely (which I just did to test out a rollup, and it is annoying to `rm -rf tmp/`).

r? @Mark-Simulacrum
cc @RalfJung

4 years agoRollup merge of #63425 - Mark-Simulacrum:clean-stability-doc, r=eddyb
Mazdak Farrokhzad [Sat, 10 Aug 2019 13:27:33 +0000 (15:27 +0200)]
Rollup merge of #63425 - Mark-Simulacrum:clean-stability-doc, r=eddyb

Cleanup historical stability comments

These weren't removed by ccbcc720a679ae76155a8 most likely by accident,
let's clean them up now.

4 years agoRollup merge of #63400 - petrochenkov:resplit, r=eddyb
Mazdak Farrokhzad [Sat, 10 Aug 2019 13:27:31 +0000 (15:27 +0200)]
Rollup merge of #63400 - petrochenkov:resplit, r=eddyb

Try to break resolve into more isolated parts

Some small step towards resolve librarification.

"Late resolution" is the pass that resolves most of names in a crate beside imports and macros.
It runs when the crate is fully expanded and its module structure is fully built.
So we just walk through the crate and resolve all the expressions, types, etc.

This pass is pretty self-contained, but it was previously done by implementing `Visitor` on the whole `Resolver` (which is used for many other tasks), and fields specific to this pass were indiscernible from the global `Resolver` state.

This PR moves the late resolution pass into a separate visitor and a separate file, fields specific to this visitor are moved from `Resolver` as well.

I'm especially happy about `current_module` being removed from `Resolver`.
It was used even for operations not related to visiting and changing the `current_module` position in process.
It was also used as an implicit argument for some functions used in this style
```rust
let orig_current_module = mem::replace(&mut self.current_module, module);
self.resolve_ident_somewhere();
self.current_module = orig_current_module;
```
and having effects on e.g. privacy checking somewhere deeply inside `resolve_ident_somewhere`.
Now we explicitly pass a `ParentScope` to those functions instead, which includes the module and some other data describing our position in the crate relatively to which we resolve names.

Rustdoc was one of the users of `current_module`, it set it for resolving intra-doc links.
Now it passes it explicitly as an argument as well (I also supported resolving paths from rustdoc in unnamed blocks as a drive-by fix).

Visibility resolution is also changed to use early resolution (which is correct because it's used during the work of `BuildReducedGraphVisitor`, i.e. integration of a new AST fragment into the existing partially built module structures.) instead of untimely late resolution (which worked only due to restrictions on paths in visibilities like inability to refer to anything except ancestor modules).
This slightly regresses its diagnostics because late resolution has a more systematic error detection and recovery currently.
Due to changes in `current_module` and visibilities `BuildReducedGraphVisitor` ended up almost as heavily affected by this refactoring as late resolution.

Fixes https://github.com/rust-lang/rust/issues/63223 (due to visibility resolution changes).

4 years agoRevert "Rollup merge of #62150 - alex:mem-uninit-refactor, r=RalfJung"
Tatsuyuki Ishi [Wed, 7 Aug 2019 04:19:07 +0000 (13:19 +0900)]
Revert "Rollup merge of #62150 - alex:mem-uninit-refactor, r=RalfJung"

This reverts commit 1d45156866b54c3fc36edfdfcdd8149ad9cb5711, reversing
changes made to 0f92eb8a4a7d8715381f5b5d748d22315f6ff9c7.

4 years agofix test
Ralf Jung [Sat, 10 Aug 2019 12:49:11 +0000 (14:49 +0200)]
fix test

4 years agoImplement Clean<Crate> on hir::Crate directly
Mark Rousskov [Sat, 10 Aug 2019 11:30:39 +0000 (07:30 -0400)]
Implement Clean<Crate> on hir::Crate directly

4 years agoReplace is_doc_reachable with is_public
Mark Rousskov [Wed, 24 Jul 2019 21:26:21 +0000 (17:26 -0400)]
Replace is_doc_reachable with is_public

4 years agoRemove NodeId from doctree::Module
Mark Rousskov [Wed, 24 Jul 2019 20:28:51 +0000 (16:28 -0400)]
Remove NodeId from doctree::Module

4 years agoGather deprecation information during cleaning
Mark Rousskov [Wed, 24 Jul 2019 20:22:48 +0000 (16:22 -0400)]
Gather deprecation information during cleaning

4 years agoGather stability information during cleaning
Mark Rousskov [Wed, 24 Jul 2019 20:18:32 +0000 (16:18 -0400)]
Gather stability information during cleaning

4 years agoMake exact_paths a non-optional field on RustdocVisitor
Mark Rousskov [Wed, 24 Jul 2019 19:25:23 +0000 (15:25 -0400)]
Make exact_paths a non-optional field on RustdocVisitor

Also privatizes needlessly public methods to enforce which methods
callers are intended to call, i.e., only `new` and `visit`.

4 years agoRepresent ownership transfer in RustdocVisitor::visit
Mark Rousskov [Wed, 24 Jul 2019 19:24:25 +0000 (15:24 -0400)]
Represent ownership transfer in RustdocVisitor::visit

Previously visit could be called multiple times, but this is inaccurate,
as it deconstructs Visitor state.

4 years agoRemove Option from resolver
Mark Rousskov [Wed, 24 Jul 2019 18:43:40 +0000 (14:43 -0400)]
Remove Option from resolver

4 years agoMiri shouldn't look at types
Ralf Jung [Sat, 10 Aug 2019 11:08:47 +0000 (13:08 +0200)]
Miri shouldn't look at types

4 years agoMake fields of RustdocVisitor private
Mark Rousskov [Wed, 24 Jul 2019 16:59:53 +0000 (12:59 -0400)]
Make fields of RustdocVisitor private