]> git.lizzy.rs Git - rust.git/log
rust.git
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 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 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 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 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 agoMake fields of RustdocVisitor private
Mark Rousskov [Wed, 24 Jul 2019 16:59:53 +0000 (12:59 -0400)]
Make fields of RustdocVisitor private

4 years agoresolve: Address FIXME from the previous commit
Vadim Petrochenkov [Fri, 9 Aug 2019 22:40:05 +0000 (01:40 +0300)]
resolve: Address FIXME from the previous commit

Make the `is_import` flag in `ScopeSet` independent from namespace
Fix rebase

4 years agoCleanup & Simplify stuff in lowering.
Mazdak Farrokhzad [Sat, 10 Aug 2019 10:38:19 +0000 (12:38 +0200)]
Cleanup & Simplify stuff in lowering.

4 years agoFix calls to resolver from rustdoc and HIR lowering
Vadim Petrochenkov [Thu, 8 Aug 2019 23:16:45 +0000 (02:16 +0300)]
Fix calls to resolver from rustdoc and HIR lowering

Cleanup some surrounding code.
Support resolution of intra doc links in unnamed block scopes.
(Paths from rustdoc now use early resolution and no longer need results of late resolution like all the built ribs.)

Fix one test hitting file path limits on Windows.

4 years agoresolve: Move some more code around
Vadim Petrochenkov [Thu, 8 Aug 2019 20:57:35 +0000 (23:57 +0300)]
resolve: Move some more code around

Move methods logically belonging to build-reduced-graph into `impl BuildReducedGraphVisitor` and `build_reduced_graph.rs`
Move types mostly specific to late resolution closer to the late resolution visitor

4 years agoresolve: Turn `resolve_error` into a method on `Resolver`
Vadim Petrochenkov [Thu, 8 Aug 2019 20:32:58 +0000 (23:32 +0300)]
resolve: Turn `resolve_error` into a method on `Resolver`

Rename it to `report_error` and move into `diagnostics.rs`

Also turn `check_unused` into a method on `Resolver`

4 years agoresolve: Remove `Deref<Target=Resolver>` implementations
Vadim Petrochenkov [Thu, 8 Aug 2019 11:06:42 +0000 (14:06 +0300)]
resolve: Remove `Deref<Target=Resolver>` implementations

It's now immediately clear what fields belong to the global resolver state and what are specific to passes/visitors.

4 years agoresolve: Track whole parent scope in the visitors
Vadim Petrochenkov [Thu, 8 Aug 2019 00:44:16 +0000 (03:44 +0300)]
resolve: Track whole parent scope in the visitors

Instead of tracking current module and other components separately.
(`ParentScope` includes the module as a component.)

4 years agoresolve: Move late resolution visitor into a separate file
Vadim Petrochenkov [Wed, 7 Aug 2019 23:39:02 +0000 (02:39 +0300)]
resolve: Move late resolution visitor into a separate file

4 years agoresolve: Move late resolution into a separate visitor
Vadim Petrochenkov [Mon, 5 Aug 2019 18:18:50 +0000 (21:18 +0300)]
resolve: Move late resolution into a separate visitor

Move `Resolver` fields specific to late resolution to the new visitor.
The `current_module` field from `Resolver` is replaced with two `current_module`s in `LateResolutionVisitor` and `BuildReducedGraphVisitor`.
Outside of those visitors `current_module` is replaced by passing `parent_scope` to more functions and using the parent module from it.

Visibility resolution no longer have access to later resolution methods and has to use early resolution, so its diagnostics in case of errors regress slightly.

4 years agoAuto merge of #63352 - jgalenson:reproducible-lto, r=alexcrichton
bors [Sat, 10 Aug 2019 10:02:28 +0000 (10:02 +0000)]
Auto merge of #63352 - jgalenson:reproducible-lto, r=alexcrichton

Sort the fat LTO modules to produce deterministic output.

Some projects that use LTO for their release builds are not reproducible.  We can fix this by sorting the fat LTO modules before using them.

It might also be useful to do this for thin LTO, but I couldn't get that to work to test it so I didn't do it.

4 years ago.gitignore: Explain why `/obj/` is ignored
Mazdak Farrokhzad [Sat, 10 Aug 2019 08:39:40 +0000 (10:39 +0200)]
.gitignore: Explain why `/obj/` is ignored

4 years agoExplain why `/tmp/` is ignored
Mazdak Farrokhzad [Sat, 10 Aug 2019 08:01:03 +0000 (10:01 +0200)]
Explain why `/tmp/` is ignored

4 years ago.gitignore: Readd `/tmp/`
Mazdak Farrokhzad [Sat, 10 Aug 2019 06:47:22 +0000 (08:47 +0200)]
.gitignore: Readd `/tmp/`

It is produced during `./x.py test`

4 years agoAuto merge of #63428 - Centril:rollup-c2ru1z1, r=Centril
bors [Sat, 10 Aug 2019 06:14:13 +0000 (06:14 +0000)]
Auto merge of #63428 - Centril:rollup-c2ru1z1, r=Centril

Rollup of 7 pull requests

Successful merges:

 - #63056 (Give built-in macros stable addresses in the standard library)
 - #63337 (Tweak mismatched types error)
 - #63350 (Use associated_type_bounds where applicable - closes #61738)
 - #63394 (Add test for issue 36804)
 - #63399 (More explicit diagnostic when using a `vec![]` in a pattern)
 - #63419 (check against more collisions for TypeId of fn pointer)
 - #63423 (Mention that tuple structs are private if any of their fields are)

Failed merges:

r? @ghost

4 years agoRollup merge of #63423 - estebank:priv-tuple, r=zackmdavis
Mazdak Farrokhzad [Sat, 10 Aug 2019 06:13:25 +0000 (08:13 +0200)]
Rollup merge of #63423 - estebank:priv-tuple, r=zackmdavis

Mention that tuple structs are private if any of their fields are

CC #39703

4 years agoRollup merge of #63419 - RalfJung:typeid, r=alexcrichton
Mazdak Farrokhzad [Sat, 10 Aug 2019 06:13:24 +0000 (08:13 +0200)]
Rollup merge of #63419 - RalfJung:typeid, r=alexcrichton

check against more collisions for TypeId of fn pointer

Cc https://github.com/rust-lang/rfcs/pull/2738#issuecomment-519923318

4 years agoRollup merge of #63399 - estebank:vec-in-pat, r=Centril
Mazdak Farrokhzad [Sat, 10 Aug 2019 06:13:22 +0000 (08:13 +0200)]
Rollup merge of #63399 - estebank:vec-in-pat, r=Centril

More explicit diagnostic when using a `vec![]` in a pattern

```
error: unexpected `(` after qualified path
  --> $DIR/vec-macro-in-pattern.rs:3:14
   |
LL |         Some(vec![x]) => (),
   |              ^^^^^^^
   |              |
   |              unexpected `(` after qualified path
   |              in this macro invocation
   |              use a slice pattern here instead
   |
   = help: for more information, see https://doc.rust-lang.org/edition-guide/rust-2018/slice-patterns.html
   = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
```

Fix #61933.

4 years agoRollup merge of #63394 - jackh726:issue-36804, r=jonas-schievink
Mazdak Farrokhzad [Sat, 10 Aug 2019 06:13:21 +0000 (08:13 +0200)]
Rollup merge of #63394 - jackh726:issue-36804, r=jonas-schievink

Add test for issue 36804

I slightly reduced the repro that ICEs on nightly-2017-01-20.

Closes #36804

4 years agoRollup merge of #63350 - iluuu1994:use-associated-type-bounds, r=Centril
Mazdak Farrokhzad [Sat, 10 Aug 2019 06:13:19 +0000 (08:13 +0200)]
Rollup merge of #63350 - iluuu1994:use-associated-type-bounds, r=Centril

Use associated_type_bounds where applicable - closes #61738

4 years agoRollup merge of #63337 - estebank:break-ee0308, r=Centril
Mazdak Farrokhzad [Sat, 10 Aug 2019 06:13:17 +0000 (08:13 +0200)]
Rollup merge of #63337 - estebank:break-ee0308, r=Centril

Tweak mismatched types error

- Change expected/found for type mismatches in `break`
- Be more accurate when talking about diverging match arms
- Tweak wording of function without a return value
- Suggest calling bare functions when their return value can be coerced to the expected type
- Give more parsing errors when encountering `foo(_, _, _)`

Fix #51767, fix #62677, fix #63136, cc #37384, cc #35241, cc #51669.

4 years agoRollup merge of #63056 - petrochenkov:macstd2, r=alexcrichton
Mazdak Farrokhzad [Sat, 10 Aug 2019 06:13:16 +0000 (08:13 +0200)]
Rollup merge of #63056 - petrochenkov:macstd2, r=alexcrichton

Give built-in macros stable addresses in the standard library

Continuation of https://github.com/rust-lang/rust/pull/62086.

Derive macros corresponding to traits from libcore are now available through the same paths as those traits:
- `Clone` - `{core,std}::clone::Clone`
- `PartialEq` - `{core,std}::cmp::PartialEq`
- `Eq` - `{core,std}::cmp::Eq`
- `PartialOrd` - `{core,std}::cmp::PartialOrd`
- `Ord` - `{core,std}::cmp::Ord`
- `Default` - `{core,std}::default::Default`
- `Debug` - `{core,std}::fmt::Debug`
- `Hash` - `{core,std}::hash::Hash`
- `Copy` - `{core,std}::marker::Copy`

Fn-like built-in macros are now available through libcore and libstd's root module, by analogy with non-builtin macros defined by libcore and libstd:
```rust
{core,std}::{
    __rust_unstable_column,
    asm,
    assert,
    cfg,
    column,
    compile_error,
    concat,
    concat_idents,
    env,
    file,
    format_args,
    format_args_nl,
    global_asm,
    include,
    include_bytes,
    include_str,
    line,
    log_syntax,
    module_path,
    option_env,
    stringify,
    trace_macros,
}
```

Derive macros without a corresponding trait in libcore or libstd are still available only through prelude (also see https://github.com/rust-lang/rust/pull/62507).
Attribute macros also keep being available only through prelude, mostly because they don't have an existing practice to follow. An advice from the library team on their eventual placement would be appreciated.
```rust
    RustcDecodable,
    RustcEncodable,
    bench,
    global_allocator,
    test,
    test_case,
```

r? @alexcrichton

4 years agoAuto merge of #62756 - newpavlov:stabilize_dur_float, r=alexcrichton
bors [Sat, 10 Aug 2019 01:16:48 +0000 (01:16 +0000)]
Auto merge of #62756 - newpavlov:stabilize_dur_float, r=alexcrichton

Stabilize duration_float

Closes: #54361
4 years agoCleanup historical stability comments
Mark Rousskov [Fri, 9 Aug 2019 23:25:34 +0000 (19:25 -0400)]
Cleanup historical stability comments

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

4 years agoAuto merge of #63415 - nikic:bump-llvm-2, r=alexcrichton
bors [Fri, 9 Aug 2019 21:20:48 +0000 (21:20 +0000)]
Auto merge of #63415 - nikic:bump-llvm-2, r=alexcrichton

Update LLVM submodule

Fixes #63361.

r? @alexcrichton

4 years agoGive built-in macros stable addresses in the standard library
Vadim Petrochenkov [Sat, 27 Jul 2019 22:51:21 +0000 (01:51 +0300)]
Give built-in macros stable addresses in the standard library

4 years agoMention that tuple structs are private if their fields are
Esteban Küber [Fri, 9 Aug 2019 19:52:02 +0000 (12:52 -0700)]
Mention that tuple structs are private if their fields are

4 years agocheck against more collisions for TypeId of fn pointer
Ralf Jung [Fri, 9 Aug 2019 18:04:18 +0000 (20:04 +0200)]
check against more collisions for TypeId of fn pointer

4 years agoUpdate LLVM submodule
Nikita Popov [Fri, 9 Aug 2019 17:17:18 +0000 (19:17 +0200)]
Update LLVM submodule

4 years agoreview comments: use structured suggestion
Esteban Küber [Fri, 9 Aug 2019 16:39:30 +0000 (09:39 -0700)]
review comments: use structured suggestion

4 years agoStop test from running on Windows.
Joel Galenson [Fri, 9 Aug 2019 16:24:45 +0000 (09:24 -0700)]
Stop test from running on Windows.

4 years agoupdate Miri
Ralf Jung [Fri, 9 Aug 2019 16:14:56 +0000 (18:14 +0200)]
update Miri

4 years agoMore explicit diagnostic when using a `vec![]` in a pattern
Esteban Küber [Fri, 9 Aug 2019 01:24:00 +0000 (18:24 -0700)]
More explicit diagnostic when using a `vec![]` in a pattern

```
error: unexpected `(` after qualified path
  --> $DIR/vec-macro-in-pattern.rs:3:14
   |
LL |         Some(vec![x]) => (),
   |              ^^^^^^^
   |              |
   |              unexpected `(` after qualified path
   |              in this macro invocation
   |              use a slice pattern here instead
   |
   = help: for more information, see https://doc.rust-lang.org/edition-guide/rust-2018/slice-patterns.html
   = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
```

4 years agofix tests
Esteban Küber [Fri, 9 Aug 2019 14:57:16 +0000 (07:57 -0700)]
fix tests

4 years agoAdd FIXME-s that some types should be transparent
Mikail Bagishov [Wed, 19 Jun 2019 20:15:19 +0000 (23:15 +0300)]
Add FIXME-s that some types should be transparent

4 years agoreview comments: typo and rewording
Esteban Küber [Thu, 8 Aug 2019 23:56:57 +0000 (16:56 -0700)]
review comments: typo and rewording

4 years agoreview comment: review wording or missing return error
Esteban Küber [Thu, 8 Aug 2019 22:55:18 +0000 (15:55 -0700)]
review comment: review wording or missing return error

4 years agoExtend suggestion support for traits and foreign items
Esteban Küber [Thu, 8 Aug 2019 22:53:32 +0000 (15:53 -0700)]
Extend suggestion support for traits and foreign items

4 years agoDifferentiate between tuple structs and tuple variants
Esteban Küber [Thu, 8 Aug 2019 21:59:24 +0000 (14:59 -0700)]
Differentiate between tuple structs and tuple variants

4 years agoTweak wording of fn without explicit return
Esteban Küber [Thu, 8 Aug 2019 21:53:00 +0000 (14:53 -0700)]
Tweak wording of fn without explicit return

4 years agoreview comments
Esteban Küber [Thu, 8 Aug 2019 19:32:18 +0000 (12:32 -0700)]
review comments

4 years agoRecover parser from `foo(_, _)`
Esteban Küber [Thu, 8 Aug 2019 19:31:24 +0000 (12:31 -0700)]
Recover parser from `foo(_, _)`

4 years agoWhen suggesting fn call use an appropriate number of placeholder arguments
Esteban Küber [Thu, 8 Aug 2019 19:01:22 +0000 (12:01 -0700)]
When suggesting fn call use an appropriate number of placeholder arguments

4 years agoSuggest calling function on type error when finding bare fn
Esteban Küber [Wed, 7 Aug 2019 05:29:10 +0000 (22:29 -0700)]
Suggest calling function on type error when finding bare fn

4 years agoChange wording for function without return value
Esteban Küber [Wed, 7 Aug 2019 05:22:04 +0000 (22:22 -0700)]
Change wording for function without return value

Fix #62677

4 years agoBe more accurate when mentioning type of found match arms
Esteban Küber [Wed, 7 Aug 2019 05:20:42 +0000 (22:20 -0700)]
Be more accurate when mentioning type of found match arms

4 years agoDo not suggest using ! with break
Esteban Küber [Wed, 7 Aug 2019 00:24:39 +0000 (17:24 -0700)]
Do not suggest using ! with break

4 years agoTweak mismatched types error on break expressions
Esteban Küber [Tue, 6 Aug 2019 21:20:39 +0000 (14:20 -0700)]
Tweak mismatched types error on break expressions

4 years agoAuto merge of #63408 - Centril:rollup-skqrez3, r=Centril
bors [Fri, 9 Aug 2019 12:14:57 +0000 (12:14 +0000)]
Auto merge of #63408 - Centril:rollup-skqrez3, r=Centril

Rollup of 7 pull requests

Successful merges:

 - #62672 (Deprecate `try!` macro)
 - #62950 (Check rustbook links on all platforms when running locally)
 - #63114 (Remove gensym in format_args)
 - #63397 (Add tests for some ICEs)
 - #63403 (Improve test output)
 - #63404 (enable flt2dec tests in Miri)
 - #63407 (reduce some test sizes in Miri)

Failed merges:

r? @ghost

4 years agoRollup merge of #63407 - RalfJung:miri-test-sizes, r=Centril
Mazdak Farrokhzad [Fri, 9 Aug 2019 12:07:35 +0000 (14:07 +0200)]
Rollup merge of #63407 - RalfJung:miri-test-sizes, r=Centril

reduce some test sizes in Miri

4 years agoRollup merge of #63404 - RalfJung:flt2dec, r=Centril
Mazdak Farrokhzad [Fri, 9 Aug 2019 12:07:34 +0000 (14:07 +0200)]
Rollup merge of #63404 - RalfJung:flt2dec, r=Centril

enable flt2dec tests in Miri

With ldexp implemented (thanks to @christianpoveda), we can finally enable these tests in Miri. Well, most of them -- some are just too slow.

4 years agoRollup merge of #63403 - sntdevco:master, r=Centril
Mazdak Farrokhzad [Fri, 9 Aug 2019 12:07:32 +0000 (14:07 +0200)]
Rollup merge of #63403 - sntdevco:master, r=Centril

Improve test output

I'm continuing to improve the test output for liballoc and libcore

4 years agoRollup merge of #63397 - JohnTitor:add-tests-for-ices, r=Centril
Mazdak Farrokhzad [Fri, 9 Aug 2019 12:07:31 +0000 (14:07 +0200)]
Rollup merge of #63397 - JohnTitor:add-tests-for-ices, r=Centril

Add tests for some ICEs

Closes #43623
Closes #44405

r? @Centril