]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoAuto merge of #75790 - LeSeulArtichaut:std-intra-doc, r=jyn514
bors [Sat, 22 Aug 2020 08:54:29 +0000 (08:54 +0000)]
Auto merge of #75790 - LeSeulArtichaut:std-intra-doc, r=jyn514

Use intra-doc-links in `std::sync::*`

Helps with #75080.
r? @jyn514

3 years agoAuto merge of #75776 - GuillaumeGomez:missing-doc-examples-lint-improvements, r=jyn514
bors [Sat, 22 Aug 2020 06:51:13 +0000 (06:51 +0000)]
Auto merge of #75776 - GuillaumeGomez:missing-doc-examples-lint-improvements, r=jyn514

Missing doc examples lint improvements

Fixes #75719.

To be merged after #75718 (only the two last commits are from this PR).

Since you already reviewed #75718, I'll set you as reviewer here as well. :)

r? @jyn514

3 years agoAuto merge of #75772 - tmiasko:io-maybe-no, r=dtolnay
bors [Sat, 22 Aug 2020 04:39:15 +0000 (04:39 +0000)]
Auto merge of #75772 - tmiasko:io-maybe-no, r=dtolnay

Remove unused `Maybe` wrapper around raw standard streams

* Remove result type from raw standard streams constructors
* Make raw standard stream constructors const
* Remove wrapper type handling absent raw standard streams

cargo checked with:

```shell
env CC=true ./x.py check library/std/ \
  --target i686-unknown-linux-gnu \
  --target wasm32-unknown-emscripten \
  --target wasm32-wasi \
  --target x86_64-fortanix-unknown-sgx \
  --target x86_64-pc-windows-gnu \
  --target x86_64-unknown-cloudabi \
  --target x86_64-unknown-hermit \
  --target x86_64-unknown-linux-gnu \
  --target x86_64-uwp-windows-gnu \
  --target x86_64-wrs-vxworks
```

Note: Last target doesn't compile currently.

3 years agoAuto merge of #75792 - matthiaskrgr:bootstrap_clippy, r=Dylan-DPC
bors [Sat, 22 Aug 2020 02:38:36 +0000 (02:38 +0000)]
Auto merge of #75792 - matthiaskrgr:bootstrap_clippy, r=Dylan-DPC

bootstrap: fix a couple of clippy lint warnings

clippy::print_literal
clippy::clone_on_copy
clippy::single_char_pattern
clippy::into_iter_on_ref
clippy::match_like_matches_macro

3 years agoAuto merge of #75797 - Dylan-DPC:rollup-lfeytr7, r=Dylan-DPC
bors [Sat, 22 Aug 2020 00:16:02 +0000 (00:16 +0000)]
Auto merge of #75797 - Dylan-DPC:rollup-lfeytr7, r=Dylan-DPC

Rollup of 12 pull requests

Successful merges:

 - #75705 (Move to intra-doc links for /library/core/src/intrinsics.rs)
 - #75711 (Split `astconv.rs` into its own submodule)
 - #75718 (Don't count variants/fields/consts/associated types in doc-coverage doc examples)
 - #75725 (Use intra-doc-links in `alloc`)
 - #75745 (Remove duplication in `fold_item`)
 - #75753 (Another motivation for CFG: return-oriented programming)
 - #75769 (Minor, remove double nesting of a test module)
 - #75771 (Extend normalization in const-eval-query-stack test)
 - #75781 (More inline asm register name fixups for LLVM)
 - #75782 (Convert core/src/str/pattern.rs to Intra-doc links)
 - #75787 (Use intra-doc-links in `core::ops::*`)
 - #75788 (MIR call terminator represents diverging calls too)

Failed merges:

 - #75773 (Introduce expect snapshot testing library into rustc)

r? @ghost

3 years agoRollup merge of #75788 - nagisa:mir-call-doccomment, r=wesleywiser
Dylan DPC [Sat, 22 Aug 2020 00:14:59 +0000 (02:14 +0200)]
Rollup merge of #75788 - nagisa:mir-call-doccomment, r=wesleywiser

MIR call terminator represents diverging calls too

@bors rollup=always

3 years agoRollup merge of #75787 - LeSeulArtichaut:core-intra-doc, r=jyn514
Dylan DPC [Sat, 22 Aug 2020 00:14:57 +0000 (02:14 +0200)]
Rollup merge of #75787 - LeSeulArtichaut:core-intra-doc, r=jyn514

Use intra-doc-links in `core::ops::*`

Helps with #75080.
r? @jyn514

3 years agoRollup merge of #75782 - GuillaumeGomez:more-links, r=jyn514
Dylan DPC [Sat, 22 Aug 2020 00:14:56 +0000 (02:14 +0200)]
Rollup merge of #75782 - GuillaumeGomez:more-links, r=jyn514

Convert core/src/str/pattern.rs to Intra-doc links

Part of #75080.

3 years agoRollup merge of #75781 - Amanieu:asm-fix, r=nagisa
Dylan DPC [Sat, 22 Aug 2020 00:14:54 +0000 (02:14 +0200)]
Rollup merge of #75781 - Amanieu:asm-fix, r=nagisa

More inline asm register name fixups for LLVM

Fixes #75761

r? @nagisa

3 years agoRollup merge of #75771 - tmiasko:const-eval-query-stack-normalize, r=jonas-schievink
Dylan DPC [Sat, 22 Aug 2020 00:14:52 +0000 (02:14 +0200)]
Rollup merge of #75771 - tmiasko:const-eval-query-stack-normalize, r=jonas-schievink

Extend normalization in const-eval-query-stack test

Builds with debuginfo have additional information in backtrace.

3 years agoRollup merge of #75769 - matklad:flatten, r=petrochenkov
Dylan DPC [Sat, 22 Aug 2020 00:14:50 +0000 (02:14 +0200)]
Rollup merge of #75769 - matklad:flatten, r=petrochenkov

Minor, remove double nesting of a test module

3 years agoRollup merge of #75753 - koutheir:patch-1, r=steveklabnik
Dylan DPC [Sat, 22 Aug 2020 00:14:49 +0000 (02:14 +0200)]
Rollup merge of #75753 - koutheir:patch-1, r=steveklabnik

Another motivation for CFG: return-oriented programming

3 years agoRollup merge of #75745 - jyn514:refactor-resolve, r=Manishearth
Dylan DPC [Sat, 22 Aug 2020 00:14:47 +0000 (02:14 +0200)]
Rollup merge of #75745 - jyn514:refactor-resolve, r=Manishearth

Remove duplication in `fold_item`

r? @Manishearth

3 years agoRollup merge of #75725 - LeSeulArtichaut:alloc-intra-doc, r=jyn514
Dylan DPC [Sat, 22 Aug 2020 00:14:45 +0000 (02:14 +0200)]
Rollup merge of #75725 - LeSeulArtichaut:alloc-intra-doc, r=jyn514

Use intra-doc-links in `alloc`

I didn't have time to test this, so I will let the CI do it for me.

r? @jyn514 cc #75080

3 years agoRollup merge of #75718 - GuillaumeGomez:coverage-ui-doc-examples-count, r=jyn514
Dylan DPC [Sat, 22 Aug 2020 00:14:44 +0000 (02:14 +0200)]
Rollup merge of #75718 - GuillaumeGomez:coverage-ui-doc-examples-count, r=jyn514

Don't count variants/fields/consts/associated types in doc-coverage doc examples

Fixes #75714.

I think I'll need to update the equivalent lint too. Creating an issue for that!

r? @jyn514

3 years agoRollup merge of #75711 - CohenArthur:split-up-astconv, r=oli-obk
Dylan DPC [Sat, 22 Aug 2020 00:14:41 +0000 (02:14 +0200)]
Rollup merge of #75711 - CohenArthur:split-up-astconv, r=oli-obk

Split `astconv.rs` into its own submodule

Fixes #67418

This changed induced a few changes across the Type checker, but only there. Mostly, it was just renaming `Self::` into something else to call specific methods from a subtrait instead of having a 2500+ lines one.

I split up the `astconv.rs` file into its own module. This way, directives such as
```rust
use crate::astconv::AstConv;
```
are still valid, and doing
```rust
use crate::astconv::{AstConv, AstConvGeneric};
```
is possible

(instead of having two modules, one named `astconv_generic.rs` for example and `astconv.rs`)

I'm not entirely sure that the name `AstConvGeneric` is a good one. However, only methods related to lifetimes or generics have been moved over to this module. Sorry about the large diff.

I'd be very happy to make any correction you deem necessary.

r? @oli-obk

3 years agoRollup merge of #75705 - denisvasilik:intra-doc-links-intrinsics, r=jyn514
Dylan DPC [Sat, 22 Aug 2020 00:14:36 +0000 (02:14 +0200)]
Rollup merge of #75705 - denisvasilik:intra-doc-links-intrinsics, r=jyn514

Move to intra-doc links for /library/core/src/intrinsics.rs

Helps with #75080.

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc

Known issues:

* The following f32 and f64 primitive methods cannot be resolved:

    f32/f64::powi
    f32/f64::sqrt
    f32/f64::sin
    f32/f64::cos
    f32/f64::powf
    f32/f64::exp
    f32/f64::exp2
    f32/f64::ln
    f32/f64::log2
    f32/f64::log10
    f32/f64::mul_add
    f32/f64::abs
    f32/f64::copysign
    f32/f64::floor
    f32/f64::ceil
    f32/f64::trunc
    f32/f64::round

* Links from core to std:

    [`std::pointer::*`]
    [`std::process::abort`]
    [`from_raw_parts`]
    [`Vec::append`]

* Links with anchors?

I provided a separate commit that replaced links with anchors by intra-doc links.
Here the anchor location information gets lost, so its questionable whether to
actually replace those links.

3 years agoUse intra-doc-links in `std::sync::*`
LeSeulArtichaut [Fri, 21 Aug 2020 22:26:28 +0000 (00:26 +0200)]
Use intra-doc-links in `std::sync::*`

3 years agobootstrap: fix a couple of clippy lint warnings
Matthias Krüger [Fri, 21 Aug 2020 23:08:04 +0000 (01:08 +0200)]
bootstrap: fix a couple of clippy lint warnings

clippy::print_literal
clippy::clone_on_copy
clippy::single_char_pattern
clippy::into_iter_on_ref
clippy::match_like_matches_macro

3 years agoAdd more links
Guillaume Gomez [Fri, 21 Aug 2020 18:43:36 +0000 (20:43 +0200)]
Add more links

3 years agoRemove links that get imported from the prelude
LeSeulArtichaut [Fri, 21 Aug 2020 21:25:07 +0000 (23:25 +0200)]
Remove links that get imported from the prelude

3 years agoUse intra-doc-links in `core::ops::*`
LeSeulArtichaut [Fri, 21 Aug 2020 20:34:21 +0000 (22:34 +0200)]
Use intra-doc-links in `core::ops::*`

3 years agoMIR call terminator represents diverging calls too
Simonas Kazlauskas [Fri, 21 Aug 2020 21:11:52 +0000 (00:11 +0300)]
MIR call terminator represents diverging calls too

3 years agoAdd regression test
Amanieu d'Antras [Fri, 21 Aug 2020 18:52:48 +0000 (19:52 +0100)]
Add regression test

3 years agoAdded link to Microsoft's documentation of CFG
Dr. Koutheir Attouchi [Fri, 21 Aug 2020 18:52:30 +0000 (14:52 -0400)]
Added link to Microsoft's documentation of CFG

3 years agoFixed a typo
Dr. Koutheir Attouchi [Fri, 21 Aug 2020 18:47:18 +0000 (14:47 -0400)]
Fixed a typo

3 years agoConvert links to intra-doc links format
Guillaume Gomez [Fri, 21 Aug 2020 18:28:57 +0000 (20:28 +0200)]
Convert links to intra-doc links format

3 years agoAuto merge of #75708 - JohnTitor:stay-cool-full-bootstrap-builder, r=pietroalbini
bors [Fri, 21 Aug 2020 17:43:27 +0000 (17:43 +0000)]
Auto merge of #75708 - JohnTitor:stay-cool-full-bootstrap-builder, r=pietroalbini

Remove the full-bootstrap builder from CI

Fixes #75198

3 years agoMore inline asm register name fixups for LLVM
Amanieu d'Antras [Fri, 21 Aug 2020 17:42:06 +0000 (18:42 +0100)]
More inline asm register name fixups for LLVM

Fixes #75761

3 years agoApply suggestions from code review
LeSeulArtichaut [Fri, 21 Aug 2020 11:09:32 +0000 (13:09 +0200)]
Apply suggestions from code review

Co-authored-by: Joshua Nelson <joshua@yottadb.com>
3 years agoRework imports used solely for docs
Denis Vasilik [Fri, 21 Aug 2020 17:19:58 +0000 (19:19 +0200)]
Rework imports used solely for docs

3 years agoApply auto-formatter
Denis Vasilik [Fri, 21 Aug 2020 16:50:09 +0000 (18:50 +0200)]
Apply auto-formatter

3 years agoIncorporate suggestions from review
Denis Vasilik [Fri, 21 Aug 2020 16:35:17 +0000 (18:35 +0200)]
Incorporate suggestions from review

3 years agoStrenghten tests for missing_doc_code_examples lint
Guillaume Gomez [Fri, 21 Aug 2020 16:05:51 +0000 (18:05 +0200)]
Strenghten tests for missing_doc_code_examples lint

3 years agoUnify checks for lint missing_doc_code_examples and --show-coverage
Guillaume Gomez [Fri, 21 Aug 2020 13:33:34 +0000 (15:33 +0200)]
Unify checks for lint missing_doc_code_examples and --show-coverage

3 years agoAuto merge of #75694 - RalfJung:miri-align-to, r=nagisa
bors [Fri, 21 Aug 2020 15:40:48 +0000 (15:40 +0000)]
Auto merge of #75694 - RalfJung:miri-align-to, r=nagisa

enable align_to tests in Miri

With https://github.com/rust-lang/miri/issues/1074 resolved, we can enable these tests in Miri.

I also tweaked the test sized to get reasonable execution times with decent test coverage.

3 years agoShow line even if there is no code examples
Guillaume Gomez [Fri, 21 Aug 2020 14:43:04 +0000 (16:43 +0200)]
Show line even if there is no code examples

3 years agoIgnore more kind of items for doc examples
Guillaume Gomez [Fri, 21 Aug 2020 11:51:03 +0000 (13:51 +0200)]
Ignore more kind of items for doc examples

3 years agoMinor, remove double nesting of a test module
Aleksey Kladov [Fri, 21 Aug 2020 11:30:39 +0000 (13:30 +0200)]
Minor, remove double nesting of a test module

3 years agoRemove wrapper type handling absent raw standard streams
Tomasz Miąsko [Fri, 21 Aug 2020 00:00:00 +0000 (00:00 +0000)]
Remove wrapper type handling absent raw standard streams

Raw standard streams are always available.  Remove unused wrapper type
that was supposed to be responsible for handling their absence.

3 years agoMake raw standard stream constructors const
Tomasz Miąsko [Thu, 20 Aug 2020 00:00:00 +0000 (00:00 +0000)]
Make raw standard stream constructors const

3 years agoRemove result type from raw standard streams constructors
Tomasz Miąsko [Thu, 20 Aug 2020 00:00:00 +0000 (00:00 +0000)]
Remove result type from raw standard streams constructors

Raw standard streams constructors are infallible. Remove unnecessary
result type.

3 years agoAuto merge of #75697 - lzutao:mir-dumb-const-prefix, r=oli-obk
bors [Fri, 21 Aug 2020 11:08:31 +0000 (11:08 +0000)]
Auto merge of #75697 - lzutao:mir-dumb-const-prefix, r=oli-obk

Suppress "const" prefix of FnDef constants in MIR dump

I [was asked][1] to suppress the `const` infront of `FnDef`.
I tried to suppress comments for other types, but turned out that `const ()` and `()` is different: https://github.com/rust-lang/rust/pull/75697#discussion_r473892806

[1]: https://github.com/rust-lang/rust/pull/75670#issuecomment-675574333

3 years agoastconv: Split astconv.rs into its own module with submodules
CohenArthur [Wed, 19 Aug 2020 17:07:03 +0000 (19:07 +0200)]
astconv: Split astconv.rs into its own module with submodules

To separate the astconv.rs file, I split it into its own module with a
subtrait called GenericAstConv. This subtrait handles methods related to
generics, be it types or lifetimes.

typeck: Add bounds module and Bounds struct

bounds: Run fmt, add documentation

generic_astconv: Add subtrait GenericAstConv

Some methods of AstConv deal exclusively with Generics. Therefore, it
makes sense to have them in their own trait. Some other methods from
AstConv might be added to it later

generic_astconv: Add more methods from AstConv

Add check_generic_arg_count_for_call() and check_generic_arg_count()

astconv: Add module for clarity

generic: Rename GenericAstConv -> AstConvGeneric

generic: add more methods to AstConvGeneric

astconv: Remove AstConvGeneric trait, add impl dyn AstConv in other
module

astconv: Add errors module to handle AstConv complaints

fmt: format code in astconv/

astconv: Remove old file

astconv: Fix visibility on GenericArgPosition

astconv: Fix visibility on GenericArgPosition

astconv: Fix function visibility on other originally private functions

3 years agoAuto merge of #75765 - JohnTitor:rollup-lexaoa9, r=JohnTitor
bors [Fri, 21 Aug 2020 09:00:49 +0000 (09:00 +0000)]
Auto merge of #75765 - JohnTitor:rollup-lexaoa9, r=JohnTitor

Rollup of 5 pull requests

Successful merges:

 - #75324 (clarify documentation of remove_dir errors)
 - #75532 (Fix RFC-1014 test)
 - #75664 (Update mailmap for mati865)
 - #75727 (Switch to intra-doc links in `core::result`)
 - #75750 (Move to intra doc links for std::thread documentation)

Failed merges:

r? @ghost

3 years agoRollup merge of #75750 - poliorcetics:intra-links-std-thread, r=jyn514
Yuki Okushi [Fri, 21 Aug 2020 08:55:15 +0000 (17:55 +0900)]
Rollup merge of #75750 - poliorcetics:intra-links-std-thread, r=jyn514

Move to intra doc links for std::thread documentation

Helps with #75080.

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc

r? @jyn514

3 years agoRollup merge of #75727 - camelid:intra-doc-links-for-core-result, r=jyn514
Yuki Okushi [Fri, 21 Aug 2020 08:55:14 +0000 (17:55 +0900)]
Rollup merge of #75727 - camelid:intra-doc-links-for-core-result, r=jyn514

Switch to intra-doc links in `core::result`

Part of #75080.

@rustbot modify labels: A-intra-doc-links T-doc T-rustdoc

3 years agoRollup merge of #75664 - mati865:mailmap, r=Dylan-DPC
Yuki Okushi [Fri, 21 Aug 2020 08:55:12 +0000 (17:55 +0900)]
Rollup merge of #75664 - mati865:mailmap, r=Dylan-DPC

Update mailmap for mati865

3 years agoRollup merge of #75532 - tmiasko:rfc-1014, r=nikomatsakis
Yuki Okushi [Fri, 21 Aug 2020 08:55:10 +0000 (17:55 +0900)]
Rollup merge of #75532 - tmiasko:rfc-1014, r=nikomatsakis

Fix RFC-1014 test

Use two printlns when testing that writing to a closed stdout does not
panic. Otherwise the test is ineffective, since the current implementation
silently ignores the error during first println regardless.

3 years agoRollup merge of #75324 - ericseppanen:master, r=JohnTitor
Yuki Okushi [Fri, 21 Aug 2020 08:55:08 +0000 (17:55 +0900)]
Rollup merge of #75324 - ericseppanen:master, r=JohnTitor

clarify documentation of remove_dir errors

remove_dir will error if the path doesn't exist or isn't a directory.

It's useful to clarify that this is "remove dir or fail" not "remove dir
if it exists".

I don't think this belongs in the title. "Removes an existing, empty
directory" is strangely worded-- there's no such thing as a non-existing
directory.  Better to just say explicitly it will return an error.

3 years agoImprove wording
Guillaume Gomez [Fri, 21 Aug 2020 07:49:26 +0000 (09:49 +0200)]
Improve wording

3 years agoSwitched ROP link to Desktop layout instead of mobile layout
Dr. Koutheir Attouchi [Fri, 21 Aug 2020 07:34:25 +0000 (03:34 -0400)]
Switched ROP link to Desktop layout instead of mobile layout

3 years agoAuto merge of #75642 - matklad:lexer-comments, r=petrochenkov
bors [Fri, 21 Aug 2020 06:05:39 +0000 (06:05 +0000)]
Auto merge of #75642 - matklad:lexer-comments, r=petrochenkov

Move doc comment parsing to rustc_lexer

Plain comments are trivia, while doc comments are not, so it feels
like this belongs to the rustc_lexer.

The specific reason to do this is the desire to use rustc_lexer in
rustdoc for syntax highlighting, without duplicating "is this a doc
comment?" logic there.

r? @ghost

3 years agoAuto merge of #74846 - Aaron1011:fix/pat-token-capture, r=petrochenkov
bors [Fri, 21 Aug 2020 02:16:35 +0000 (02:16 +0000)]
Auto merge of #74846 - Aaron1011:fix/pat-token-capture, r=petrochenkov

Capture tokens for Pat used in macro_rules! argument

This extends PR #73293 to handle patterns (Pat). Unlike expressions,
patterns do not support custom attributes, so we only need to capture
tokens during macro_rules! argument parsing.

3 years agoSuppress "const" prefix of FnDef in MIR dump
Lzu Tao [Thu, 20 Aug 2020 09:44:20 +0000 (09:44 +0000)]
Suppress "const" prefix of FnDef in MIR dump

3 years agoExtend normalization in const-eval-query-stack test
Tomasz Miąsko [Fri, 21 Aug 2020 00:00:00 +0000 (00:00 +0000)]
Extend normalization in const-eval-query-stack test

Builds with debuginfo have additional information in backtrace.

3 years agoAuto merge of #73565 - matthewjasper:core-min-spec, r=nagisa
bors [Thu, 20 Aug 2020 23:05:31 +0000 (23:05 +0000)]
Auto merge of #73565 - matthewjasper:core-min-spec, r=nagisa

Use min_specialization in libcore

Getting `TrustedRandomAccess` to work is the main interesting thing here.

- `get_unchecked` is now an unstable, hidden method on `Iterator`
- The contract for `TrustedRandomAccess` is made clearer in documentation
- Fixed a bug where `Debug` would create aliasing references when using the specialized zip impl
- Added tests for the side effects of `next_back` and `nth`.

closes #68536

3 years agoAnother motivation for CFG: return-oriented programming
Dr. Koutheir Attouchi [Thu, 20 Aug 2020 22:54:40 +0000 (18:54 -0400)]
Another motivation for CFG: return-oriented programming

3 years agoUse intra-doc-links in `alloc`
LeSeulArtichaut [Thu, 20 Aug 2020 21:43:46 +0000 (23:43 +0200)]
Use intra-doc-links in `alloc`

3 years agoAuto merge of #75494 - matthewjasper:defer-recursive-projection-error, r=nikomatsakis
bors [Thu, 20 Aug 2020 20:27:22 +0000 (20:27 +0000)]
Auto merge of #75494 - matthewjasper:defer-recursive-projection-error, r=nikomatsakis

Don't immediately error for cycles during normalization

#73452 meant some normalization cycles could be detected earlier, breaking some code.
This PR makes defers errors for normalization cycles to fulfillment, fixing said code.

Fixes #74868

r? @nikomatsakis

3 years agoMove to intra doc links for std::thread documentation
Alexis Bourget [Thu, 20 Aug 2020 20:03:00 +0000 (22:03 +0200)]
Move to intra doc links for std::thread documentation

3 years agoFix intra-doc links
Camelid [Thu, 20 Aug 2020 19:39:12 +0000 (12:39 -0700)]
Fix intra-doc links

One of the original links was linking to the wrong thing as well.

Co-authored-by: Joshua Nelson <joshua@yottadb.com>
3 years agofmt
Guillaume Gomez [Thu, 20 Aug 2020 19:28:06 +0000 (21:28 +0200)]
fmt

3 years agoAdd documentation for --show-coverage option
Guillaume Gomez [Thu, 20 Aug 2020 19:26:42 +0000 (21:26 +0200)]
Add documentation for --show-coverage option

3 years agoUpdate how doc examples are counted
Guillaume Gomez [Thu, 20 Aug 2020 19:15:02 +0000 (21:15 +0200)]
Update how doc examples are counted

3 years agoRemove "total" columns in --show-coverage output
Guillaume Gomez [Thu, 20 Aug 2020 19:09:40 +0000 (21:09 +0200)]
Remove "total" columns in --show-coverage output

3 years agoDon't immediately error for cycles during normalization
Matthew Jasper [Thu, 13 Aug 2020 19:45:08 +0000 (20:45 +0100)]
Don't immediately error for cycles during normalization

3 years agoAuto merge of #75747 - cuviper:rollup-icke90l, r=cuviper
bors [Thu, 20 Aug 2020 18:02:46 +0000 (18:02 +0000)]
Auto merge of #75747 - cuviper:rollup-icke90l, r=cuviper

Rollup of 8 pull requests

Successful merges:

 - #75672 (Move to intra-doc links for task.rs and vec.rs)
 - #75702 (Clean up E0759 explanation)
 - #75703 (Enable stack-overflow detection on musl for non-main threads)
 - #75710 (Fix bad printing of const-eval queries)
 - #75716 (Upgrade Emscripten on CI to 1.39.20 )
 - #75731 (Suppress ty::Float in MIR comments of ty::Const)
 - #75733 (Remove duplicated alloc vec bench push_all_move)
 - #75743 (Rename rustc_lexer::TokenKind::Not to Bang)

Failed merges:

r? @ghost

3 years agoRollup merge of #75743 - matklad:excl, r=davidtwco
Josh Stone [Thu, 20 Aug 2020 17:07:34 +0000 (10:07 -0700)]
Rollup merge of #75743 - matklad:excl, r=davidtwco

Rename rustc_lexer::TokenKind::Not to Bang

All other tokens are named by the punctuation they use, rather than
by semantics operation they stand for. `!` is the only exception to
the rule, let's fix it.

3 years agoRollup merge of #75733 - pickfire:patch-3, r=matklad
Josh Stone [Thu, 20 Aug 2020 17:07:32 +0000 (10:07 -0700)]
Rollup merge of #75733 - pickfire:patch-3, r=matklad

Remove duplicated alloc vec bench push_all_move

push_all_move is the same as extend

3 years agoRollup merge of #75731 - lzutao:mir-cmts-suppress-float-ty-const, r=oli-obk
Josh Stone [Thu, 20 Aug 2020 17:07:30 +0000 (10:07 -0700)]
Rollup merge of #75731 - lzutao:mir-cmts-suppress-float-ty-const, r=oli-obk

Suppress ty::Float in MIR comments of ty::Const

Already covered by MIR constant comments

3 years agoRollup merge of #75716 - tlively:upgrade-emscripten-1.39.20, r=cuviper
Josh Stone [Thu, 20 Aug 2020 17:07:28 +0000 (10:07 -0700)]
Rollup merge of #75716 - tlively:upgrade-emscripten-1.39.20, r=cuviper

Upgrade Emscripten on CI to 1.39.20

This Emscripten version was the first to be cut after the LLVM 11
release branch was created, so it should be the most compatible with
LLVM 11. The old version we were using was incompatible with LLVM 11
because its wasm-ld did not understand all the relocations that LLVM
11 emits.

3 years agoRollup merge of #75710 - ThibsG:FixBadPrinting75447, r=oli-obk
Josh Stone [Thu, 20 Aug 2020 17:07:27 +0000 (10:07 -0700)]
Rollup merge of #75710 - ThibsG:FixBadPrinting75447, r=oli-obk

Fix bad printing of const-eval queries

Fixes: #75447
r? @RalfJung

cc @oli-obk

3 years agoRollup merge of #75703 - tmiasko:stack-overflow-musl, r=cuviper
Josh Stone [Thu, 20 Aug 2020 17:07:24 +0000 (10:07 -0700)]
Rollup merge of #75703 - tmiasko:stack-overflow-musl, r=cuviper

Enable stack-overflow detection on musl for non-main threads

3 years agoRollup merge of #75702 - GuillaumeGomez:cleanup-e0759, r=pickfire
Josh Stone [Thu, 20 Aug 2020 17:07:22 +0000 (10:07 -0700)]
Rollup merge of #75702 - GuillaumeGomez:cleanup-e0759, r=pickfire

Clean up E0759 explanation

r? @Dylan-DPC

cc @pickfire

3 years agoRollup merge of #75672 - kofls:intradoc-fix, r=jyn514
Josh Stone [Thu, 20 Aug 2020 17:07:19 +0000 (10:07 -0700)]
Rollup merge of #75672 - kofls:intradoc-fix, r=jyn514

Move to intra-doc links for task.rs and vec.rs

Partial fix for #75080

links for [`get`], [`get_mut`] skipped due to #75643
link for [`copy_from_slice`] skipped due to #63351

3 years agoRemove duplicate binding in match
Joshua Nelson [Thu, 20 Aug 2020 16:15:17 +0000 (12:15 -0400)]
Remove duplicate binding in match

Co-authored-by: lzutao <taolzu@gmail.com>
3 years agoSuppress ty::Float in MIR comments of ty::Const
Lzu Tao [Thu, 20 Aug 2020 03:43:17 +0000 (03:43 +0000)]
Suppress ty::Float in MIR comments of ty::Const

Already covered by MIR constant comments

3 years agoUpdate rustdoc coverage UI test
Guillaume Gomez [Wed, 19 Aug 2020 20:44:58 +0000 (22:44 +0200)]
Update rustdoc coverage UI test

3 years agoIgnore code examples on given items where it doesn't make sense
Guillaume Gomez [Wed, 19 Aug 2020 20:44:21 +0000 (22:44 +0200)]
Ignore code examples on given items where it doesn't make sense

3 years agoAuto merge of #75562 - oli-obk:const_prop_no_aggregates, r=wesleywiser
bors [Thu, 20 Aug 2020 15:39:06 +0000 (15:39 +0000)]
Auto merge of #75562 - oli-obk:const_prop_no_aggregates, r=wesleywiser

Check that we don't use `Rvalue::Aggregate` after the deaggregator

fixes #75481

r? @wesleywiser

cc @RalfJung (modified the validator)

3 years agoRemove duplication in `fold_item`
Joshua Nelson [Thu, 20 Aug 2020 15:19:11 +0000 (11:19 -0400)]
Remove duplication in `fold_item`

3 years agoApply suggestions from code review
Oliver Scherer [Thu, 20 Aug 2020 14:56:19 +0000 (16:56 +0200)]
Apply suggestions from code review

Co-authored-by: Wesley Wiser <wwiser@gmail.com>
3 years agoRename rustc_lexer::TokenKind::Not to Bang
Aleksey Kladov [Thu, 20 Aug 2020 13:51:39 +0000 (13:51 +0000)]
Rename rustc_lexer::TokenKind::Not to Bang

All other tokens are named by the punctuation they use, rather than
by semantics operation they stand for. `!` is the only exception to
the rule, let's fix it.

3 years agoApply review comments
Guillaume Gomez [Thu, 20 Aug 2020 13:25:35 +0000 (15:25 +0200)]
Apply review comments

3 years agoAuto merge of #75670 - lzutao:suppress-mir-fndef-ty, r=oli-obk
bors [Thu, 20 Aug 2020 12:42:13 +0000 (12:42 +0000)]
Auto merge of #75670 - lzutao:suppress-mir-fndef-ty, r=oli-obk

Suppress MIR comments of FnDef and unit types

An expansion of #75566.
Comments of FnDef MIR constant already contain `ty::Contains` comments.

3 years agoLiballoc bench rename push_all extend_from_slice
Ivan Tham [Thu, 20 Aug 2020 11:04:52 +0000 (19:04 +0800)]
Liballoc bench rename push_all extend_from_slice

3 years agoSuppress MIR comments of Unit type
Lzu Tao [Thu, 20 Aug 2020 09:25:06 +0000 (09:25 +0000)]
Suppress MIR comments of Unit type

3 years agoAdd missing tick for doc
Lzu Tao [Thu, 20 Aug 2020 09:15:23 +0000 (09:15 +0000)]
Add missing tick for doc

3 years agoSuppress MIR comments for FnDef in ty::Const
Lzu Tao [Tue, 18 Aug 2020 15:49:51 +0000 (15:49 +0000)]
Suppress MIR comments for FnDef in ty::Const

3 years agoSet RUST_BACKTRACE env variable
ThibsG [Thu, 20 Aug 2020 07:20:57 +0000 (09:20 +0200)]
Set RUST_BACKTRACE env variable

3 years agoRemove duplicated alloc vec bench push_all_move
Ivan Tham [Thu, 20 Aug 2020 07:20:46 +0000 (15:20 +0800)]
Remove duplicated alloc vec bench push_all_move

push_all_move is the same as extend

3 years agoCapture tokens for Pat used in macro_rules! argument
Aaron Hill [Mon, 27 Jul 2020 22:02:29 +0000 (18:02 -0400)]
Capture tokens for Pat used in macro_rules! argument

This extends PR #73293 to handle patterns (Pat). Unlike expressions,
patterns do not support custom attributes, so we only need to capture
tokens during macro_rules! argument parsing.

3 years agoAuto merge of #75595 - davidtwco:polymorphization-predicate-simplification-correction...
bors [Thu, 20 Aug 2020 05:06:55 +0000 (05:06 +0000)]
Auto merge of #75595 - davidtwco:polymorphization-predicate-simplification-correction, r=eddyb

polymorphize: if any param in a predicate is used, then all are used

Addresses [review](https://github.com/rust-lang/rust/pull/75518#discussion_r470907646) [comments](https://github.com/rust-lang/rust/pull/75518#discussion_r470907865) [from](https://github.com/rust-lang/rust/pull/75518#discussion_r470908188) @eddyb in #75518 that I didn't get to resolve before bors merged.

This PR modifies polymorphization's handling of predicates so that if any generic parameter is used in a predicate then all parameters in that predicate are used.

r? @eddyb

3 years agoAuto merge of #75720 - ehuss:update-books, r=ehuss
bors [Thu, 20 Aug 2020 03:09:19 +0000 (03:09 +0000)]
Auto merge of #75720 - ehuss:update-books, r=ehuss

Update books

## nomicon

2 commits in bfe1ab96d717d1dda50e499b360f2e2f57e1750a..25854752549d44d76fbd7650e17cb4f167a0b8fb
2020-06-05 13:19:42 -0400 to 2020-08-19 16:41:48 -0400
- Follow-up of rust-lang/rust#75152 (rust-lang-nursery/nomicon#235)
- Follow-up for rust-lang/rust#74850 (rust-lang-nursery/nomicon#233)

## reference

7 commits in c9b2736a059469043177e1e4ed41a55d7c63ac28..1b6c4b0afab97c0230433466c97167bbbe8445f6
2020-08-03 03:34:03 -0700 to 2020-08-18 17:04:28 -0700
- Some constant/static updates. (rust-lang-nursery/reference#867)
- Add casting rules from function items to other types (rust-lang-nursery/reference#878)
- Apply joshtriplett's suggestion
- Add note clarifying 16-bit support.
- Document min pointer width.
- Update to `dyn Trait` syntax in a couple places (rust-lang-nursery/reference#875)
- mention that `#[track_caller]` on `fn main` is forbidden (rust-lang-nursery/reference#872)

## book

2 commits in 363293c1c5ce9e84ea3935a5e29ce8624801208a..c0a6a61b8205da14ac955425f74258ffd8ee065d
2020-08-03 15:56:30 -0500 to 2020-08-14 14:21:49 -0500
- Correct listing 11-10: Take tests module out of main function. (rust-lang/book#2427)
- Update link to russian translation (rust-lang/book#2423)

## rust-by-example

5 commits in 2e9271981adc32613365810f3428334c07095215..80a10e22140e28392b99d24ed02f4c6d8cb770a0
2020-07-27 13:39:16 -0500 to 2020-08-08 09:56:46 -0300
- Add tuple `..` operator example (rust-lang/rust-by-example#1368)
- Clarify wording (rust-lang/rust-by-example#1366)
- Include arc (rust-lang/rust-by-example#1365)
- Modify supertraits sample code (rust-lang/rust-by-example#1361)
- Remove mention of `try!` in `Display` example (rust-lang/rust-by-example#1357)

## embedded-book

3 commits in b5256448a2a4c1bec68b93c0847066f92f2ff5a9..0cd2ca116274b915924c3a7e07c1e046b6f19b77
2020-07-24 23:09:29 +0000 to 2020-08-19 10:33:15 +0000
- Ignore unused argument in closure  (rust-embedded/book#261)
- Fix broken sentence  (rust-embedded/book#260)
- Add additional command to try when verifying installation.  (rust-embedded/book#259)

3 years agoRevert to old link since intra-doc link is broken
Camelid [Thu, 20 Aug 2020 01:17:55 +0000 (18:17 -0700)]
Revert to old link since intra-doc link is broken

Can't link from `core` to `std` yet.

3 years agoAuto merge of #75723 - ehuss:update-cargo, r=ehuss
bors [Thu, 20 Aug 2020 01:08:08 +0000 (01:08 +0000)]
Auto merge of #75723 - ehuss:update-cargo, r=ehuss

Update cargo

5 commits in ab32ee88dade1b50c77347599e82ca2de3fb8a51..51b66125ba97d2906f461b3f4e0408f206299bb6
2020-08-10 17:44:43 +0000 to 2020-08-19 20:22:52 +0000
- Add chapters on dependency resolution and SemVer compatibility. (rust-lang/cargo#8609)
- Renames SourceId::into_url -&gt; SourceId::as_url (rust-lang/cargo#8611)
- Fix bug with PathAndArg config values (rust-lang/cargo#8629)
- Show full error context on `cargo run` error. (rust-lang/cargo#8627)
- Fix typo in SIGQUIT description (rust-lang/cargo#8615)

3 years agoAuto merge of #75563 - richkadel:llvm-coverage-map-gen-5.4, r=wesleywiser
bors [Wed, 19 Aug 2020 22:48:40 +0000 (22:48 +0000)]
Auto merge of #75563 - richkadel:llvm-coverage-map-gen-5.4, r=wesleywiser

Moved coverage counter injection from BasicBlock to Statement.

As discussed on Zulip: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Implement.20LLVM-compatible.20source-based.20cod.20compiler-team.23278

3 years agoUpdate cargo
Eric Huss [Wed, 19 Aug 2020 22:11:58 +0000 (15:11 -0700)]
Update cargo

3 years agoUpdate books
Eric Huss [Wed, 19 Aug 2020 21:07:46 +0000 (14:07 -0700)]
Update books