]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoRollup merge of #78114 - jyn514:private, r=oli-obk
Dylan DPC [Mon, 9 Nov 2020 00:13:31 +0000 (01:13 +0100)]
Rollup merge of #78114 - jyn514:private, r=oli-obk

Recognize `private_intra_doc_links` as a lint

Previously, trying to allow this would give another error!

```
warning: unknown lint: `private_intra_doc_links`
 --> private.rs:1:10
  |
1 | #![allow(private_intra_doc_links)]
  |          ^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `broken_intra_doc_links`
  |
  = note: `#[warn(unknown_lints)]` on by default

warning: public documentation for `DocMe` links to private item `DontDocMe`
 --> private.rs:2:11
  |
2 | /// docs [DontDocMe]
  |           ^^^^^^^^^ this item is private
  |
  = note: `#[warn(private_intra_doc_links)]` on by default
  = note: this link will resolve properly if you pass `--document-private-items`
```

Fixes the issue found in https://github.com/rust-lang/rust/pull/77249#issuecomment-712339227.

r? ````````@Manishearth````````

Does anyone know why this additional step is necessary? It seems weird this has to be declared in 3 different places.

3 years agoRollup merge of #78026 - sunfishcode:symlink-hard-link, r=dtolnay
Dylan DPC [Mon, 9 Nov 2020 00:13:28 +0000 (01:13 +0100)]
Rollup merge of #78026 - sunfishcode:symlink-hard-link, r=dtolnay

Define `fs::hard_link` to not follow symlinks.

POSIX leaves it [implementation-defined] whether `link` follows symlinks.
In practice, for example, on Linux it does not and on FreeBSD it does.
So, switch to `linkat`, so that we can pick a behavior rather than
depending on OS defaults.

Pick the option to not follow symlinks. This is somewhat arbitrary, but
seems the less surprising choice because hard linking is a very
low-level feature which requires the source and destination to be on
the same mounted filesystem, and following a symbolic link could end
up in a different mounted filesystem.

[implementation-defined]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html

3 years agoRollup merge of #77640 - ethanboxx:int_error_matching_attempt_2, r=KodrAus
Dylan DPC [Mon, 9 Nov 2020 00:13:25 +0000 (01:13 +0100)]
Rollup merge of #77640 - ethanboxx:int_error_matching_attempt_2, r=KodrAus

Refactor IntErrorKind to avoid "underflow" terminology

This PR is a continuation of #76455

# Changes

- `Overflow` renamed to `PosOverflow` and `Underflow` renamed to `NegOverflow` after discussion in #76455
- Changed some of the parsing code to return `InvalidDigit` rather than `Empty` for strings "+" and "-". https://users.rust-lang.org/t/misleading-error-in-str-parse-for-int-types/49178
- Carry the problem `char` with the `InvalidDigit` variant.
- Necessary changes were made to the compiler as it depends on `int_error_matching`.
- Redid tests to match on specific errors.

r? ```@KodrAus```

3 years agoAuto merge of #78712 - petrochenkov:visitok, r=Aaron1011
bors [Sun, 8 Nov 2020 20:00:51 +0000 (20:00 +0000)]
Auto merge of #78712 - petrochenkov:visitok, r=Aaron1011

rustc_ast: Visit tokens stored in AST nodes in mutable visitor

After #77271 token visiting is enabled only for one visitor in `rustc_expand\src\mbe\transcribe.rs` which applies hygiene marks to tokens produced by declarative macros (`macro_rules` or `macro`), so this change doesn't affect anything else.

When a macro has some interpolated token from an outer macro in its output
```rust
macro inner() {
    $interpolated
}
```
we can use the usual interpretation of interpolated tokens in token-based model - a None-delimited group - to write this macro in an equivalent form
```rust
macro inner() {
    ⟪ a b c d ⟫
}
```

When we are expanding the macro `inner` we need to apply hygiene marks to all tokens produced by it, including the tokens inside the group.

Before this PR we did this by visiting the AST piece inside the interpolated token and applying marks to all spans in it.
I'm not sure this is 100% correct (ideally we should apply the marks to tokens and then re-parse the AST from tokens), but it's a very good approximation at least.
We didn't however apply the marks to actual tokens stored in the nonterminal, so if we used the nonterminal as a token rather than as an AST piece (e.g. passed it to a proc macro), then we got hygiene bugs.
This PR applies the marks to tokens in addition to the AST pieces thus fixing the issue.

r? `@Aaron1011`

3 years agoAuto merge of #78874 - m-ou-se:rollup-3jp1ijj, r=m-ou-se
bors [Sun, 8 Nov 2020 13:49:17 +0000 (13:49 +0000)]
Auto merge of #78874 - m-ou-se:rollup-3jp1ijj, r=m-ou-se

Rollup of 19 pull requests

Successful merges:

 - #76097 (Stabilize hint::spin_loop)
 - #76227 (Stabilize `Poll::is_ready` and `is_pending` as const)
 - #78065 (make concurrency helper more pleasant to read)
 - #78570 (Remove FIXME comment in print_type_sizes ui test suite)
 - #78572 (Use SOCK_CLOEXEC and accept4() on more platforms.)
 - #78658 (Add a tool to run `x.py` from any subdirectory)
 - #78706 (Fix run-make tests running when LLVM is disabled)
 - #78728 (Constantify `UnsafeCell::into_inner` and related)
 - #78775 (Bump Rustfmt and RLS)
 - #78788 (Correct unsigned equivalent of isize to be usize)
 - #78811 (Make some std::io functions `const`)
 - #78828 (use single char patterns for split() (clippy::single_char_pattern))
 - #78841 (Small cleanup in `TypeFoldable` derive macro)
 - #78842 (Honor the rustfmt setting in config.toml)
 - #78843 (Less verbose debug logging from inlining integrator)
 - #78852 (Convert a bunch of intra-doc links)
 - #78860 (rustc_resolve: Use `#![feature(format_args_capture)]`)
 - #78861 (typo and formatting)
 - #78865 (Don't fire `CONST_ITEM_MUTATION` lint when borrowing a deref)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoRollup merge of #78865 - Aaron1011:fix/const-item-mut-reborrow, r=varkor
Mara Bos [Sun, 8 Nov 2020 12:36:33 +0000 (13:36 +0100)]
Rollup merge of #78865 - Aaron1011:fix/const-item-mut-reborrow, r=varkor

Don't fire `CONST_ITEM_MUTATION` lint when borrowing a deref

Fixes #78819

This extends the check for dereferences added in PR #77324
to cover mutable borrows, as well as direct writes. If we're operating
on a dereference of a `const` item, we shouldn't be firing the lint.

3 years agoRollup merge of #78861 - o752d:patch-1, r=jonas-schievink
Mara Bos [Sun, 8 Nov 2020 12:36:32 +0000 (13:36 +0100)]
Rollup merge of #78861 - o752d:patch-1, r=jonas-schievink

typo and formatting

fixed a typo and modified some line formatting justification while I'm here :)

3 years agoRollup merge of #78860 - petrochenkov:resolvefmt, r=Mark-Simulacrum
Mara Bos [Sun, 8 Nov 2020 12:36:30 +0000 (13:36 +0100)]
Rollup merge of #78860 - petrochenkov:resolvefmt, r=Mark-Simulacrum

rustc_resolve: Use `#![feature(format_args_capture)]`

This is the best new sugar for quite some time.

(I only changed places that already used named arguments.)

3 years agoRollup merge of #78852 - camelid:intra-doc-bonanza, r=jyn514
Mara Bos [Sun, 8 Nov 2020 12:36:28 +0000 (13:36 +0100)]
Rollup merge of #78852 - camelid:intra-doc-bonanza, r=jyn514

Convert a bunch of intra-doc links

An intra-doc link bonanza!

This was accomplished using a bunch of trial-and-error with sed.

3 years agoRollup merge of #78843 - tmiasko:inline-trace, r=wesleywiser
Mara Bos [Sun, 8 Nov 2020 12:36:26 +0000 (13:36 +0100)]
Rollup merge of #78843 - tmiasko:inline-trace, r=wesleywiser

Less verbose debug logging from inlining integrator

The inlining integrator produces relatively verbose and uninteresting
logs.  Move them from a debug log level to a trace level, so that they
can be easily isolated from others.

3 years agoRollup merge of #78842 - shepmaster:bootstrap-rustfmt, r=Mark-Simulacrum
Mara Bos [Sun, 8 Nov 2020 12:36:25 +0000 (13:36 +0100)]
Rollup merge of #78842 - shepmaster:bootstrap-rustfmt, r=Mark-Simulacrum

Honor the rustfmt setting in config.toml

Prior to this, setting the rustfmt configuration was ignored:

```
% mkdir example

% cd example

% ../configure --set build.rustfmt=/usr/bin/true

% ../x.py fmt
./x.py fmt is not supported on this channel
failed to run: /Users/shep/Projects/rust/example/build/bootstrap/debug/bootstrap fmt
Build completed unsuccessfully in 0:00:01
```

And after:

```
% ../x.py fmt
Build completed successfully in 0:00:11
```

r? `@Mark-Simulacrum`

3 years agoRollup merge of #78841 - LeSeulArtichaut:foldable-derive, r=lcnr
Mara Bos [Sun, 8 Nov 2020 12:36:23 +0000 (13:36 +0100)]
Rollup merge of #78841 - LeSeulArtichaut:foldable-derive, r=lcnr

Small cleanup in `TypeFoldable` derive macro

r? ```@lcnr```

3 years agoRollup merge of #78828 - matthiaskrgr:sing_chr, r=lcnr
Mara Bos [Sun, 8 Nov 2020 12:36:21 +0000 (13:36 +0100)]
Rollup merge of #78828 - matthiaskrgr:sing_chr, r=lcnr

use single char patterns for split() (clippy::single_char_pattern)

3 years agoRollup merge of #78811 - a1phyr:const_io_structs, r=dtolnay
Mara Bos [Sun, 8 Nov 2020 12:36:19 +0000 (13:36 +0100)]
Rollup merge of #78811 - a1phyr:const_io_structs, r=dtolnay

Make some std::io functions `const`

Tracking issue: #78812

Make the following functions `const`:
- `io::Cursor::new`
- `io::Cursor::get_ref`
- `io::Cursor::position`
- `io::empty`
- `io::repeat`
- `io::sink`

r? `````@dtolnay`````

3 years agoRollup merge of #78788 - jhpratt:isize-impl-fix, r=m-ou-se
Mara Bos [Sun, 8 Nov 2020 12:36:18 +0000 (13:36 +0100)]
Rollup merge of #78788 - jhpratt:isize-impl-fix, r=m-ou-se

Correct unsigned equivalent of isize to be usize

See [#74913 (comment)](https://github.com/rust-lang/rust/issues/74913#issuecomment-722334456) for why this matters. Apparently it hasn't been used anywhere else, though CI will tell for sure.

3 years agoRollup merge of #78775 - ghedo:bump-rustfmt-rls, r=Mark-Simulacrum
Mara Bos [Sun, 8 Nov 2020 12:36:16 +0000 (13:36 +0100)]
Rollup merge of #78775 - ghedo:bump-rustfmt-rls, r=Mark-Simulacrum

Bump Rustfmt and RLS

Should hopefully fix #78341 and fix #78340.

3 years agoRollup merge of #78728 - a1phyr:const_cell_into_inner, r=dtolnay
Mara Bos [Sun, 8 Nov 2020 12:36:14 +0000 (13:36 +0100)]
Rollup merge of #78728 - a1phyr:const_cell_into_inner, r=dtolnay

Constantify `UnsafeCell::into_inner` and related

Tracking issue: #78729

This PR constantifies:
- `UnsafeCell::into_inner`
- `Cell::into_inner`
- `RefCell::into_inner`
- `Atomic*::into_inner`

r? `````@dtolnay`````

3 years agoRollup merge of #78706 - bjorn3:fix_run_make_without_llvm, r=Mark-Simulacrum
Mara Bos [Sun, 8 Nov 2020 12:36:12 +0000 (13:36 +0100)]
Rollup merge of #78706 - bjorn3:fix_run_make_without_llvm, r=Mark-Simulacrum

Fix run-make tests running when LLVM is disabled

The `--cc`, `--cxx`, `--cflags` and `--ar` flags were only passed to compiletest when `builder.config.llvm_enabled()` returned true. This is preventing me from running the tests on cg_clif.

3 years agoRollup merge of #78658 - casey:x, r=Mark-Simulacrum
Mara Bos [Sun, 8 Nov 2020 12:36:09 +0000 (13:36 +0100)]
Rollup merge of #78658 - casey:x, r=Mark-Simulacrum

Add a tool to run `x.py` from any subdirectory

This adds a binary called `x` in `src/tools/x`. All it does is check the current directory and its ancestors for a file called `x.py`, and if it finds one, runs it.

By installing x, you can easily run `x.py` from any subdirectory, and only need to type `x`.

It can be installed with `cargo install --path src/tools/x`

This is a copy of a [binary I've been using myself when working on rust](https://github.com/casey/bootstrap), currently published to crates.io as `bootstrap`.

It could be changed to avoid indirecting through `x.py`, and instead call the bootstrap module directly. However, this seemed like the simplest thing possible, and won't break if the details of how the bootstrap module is invoked change.

3 years agoRollup merge of #78572 - de-vri-es:bsd-cloexec, r=m-ou-se
Mara Bos [Sun, 8 Nov 2020 12:36:07 +0000 (13:36 +0100)]
Rollup merge of #78572 - de-vri-es:bsd-cloexec, r=m-ou-se

Use SOCK_CLOEXEC and accept4() on more platforms.

This PR enables the use of `SOCK_CLOEXEC` and `accept4` on more platforms.

-----

Android uses the linux kernel, so it should also support it.

DragonflyBSD introduced them in 4.4 (December 2015):
https://www.dragonflybsd.org/release44/

FreeBSD introduced them in 10.0 (January 2014):
https://wiki.freebsd.org/AtomicCloseOnExec

Illumos introduced them in a commit in April 2013, not sure when it was released. It is quite possible that is has always been in Illumos:
https://github.com/illumos/illumos-gate/commit/5dbfd19ad5fcc2b779f40f80fa05c1bd28fd0b4e
https://illumos.org/man/3socket/socket
https://illumos.org/man/3socket/accept4

NetBSD introduced them in 6.0 (Oktober 2012) and 8.0 (July 2018):
https://man.netbsd.org/NetBSD-6.0/socket.2
https://man.netbsd.org/NetBSD-8.0/accept.2

OpenBSD introduced them in 5.7 (May 2015):
https://man.openbsd.org/socket https://man.openbsd.org/accept

3 years agoRollup merge of #78570 - sasurau4:test/check-pass-print-type-size, r=jyn514
Mara Bos [Sun, 8 Nov 2020 12:36:05 +0000 (13:36 +0100)]
Rollup merge of #78570 - sasurau4:test/check-pass-print-type-size, r=jyn514

Remove FIXME comment in print_type_sizes ui test suite

## Overview
Helps with #62277

> The type sizes are likely only printed when the actual layout is computed. For generic types, this only happens during codegen.

ref: https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Codegen.20process.20question/near/215836807

Some tests like `multiple_types.rs` are passed even if using `check-pass`. But tests should be agnostic to when the actual layout is computed. The `build-pass` is intentionally used for them. I remove FIXME comments.

3 years agoRollup merge of #78065 - tshepang:nits, r=dtolnay
Mara Bos [Sun, 8 Nov 2020 12:36:01 +0000 (13:36 +0100)]
Rollup merge of #78065 - tshepang:nits, r=dtolnay

make concurrency helper more pleasant to read

3 years agoRollup merge of #76227 - CDirkx:const-poll, r=KodrAus
Mara Bos [Sun, 8 Nov 2020 12:35:58 +0000 (13:35 +0100)]
Rollup merge of #76227 - CDirkx:const-poll, r=KodrAus

Stabilize `Poll::is_ready` and `is_pending` as const

Insta-stabilize the methods `is_ready` and `is_pending` of `std::task::Poll` as const, in the same way as [PR#76198](https://github.com/rust-lang/rust/pull/76198).

Possible because of the recent stabilization of const control flow.

Part of #76225.

3 years agoRollup merge of #76097 - pickfire:stabilize-spin-loop, r=KodrAus
Mara Bos [Sun, 8 Nov 2020 12:35:54 +0000 (13:35 +0100)]
Rollup merge of #76097 - pickfire:stabilize-spin-loop, r=KodrAus

Stabilize hint::spin_loop

Partially fix #55002, deprecate in another release

r? ``````@KodrAus``````

3 years agoAuto merge of #78410 - lcnr:revert75443, r=nikomatsakis
bors [Sun, 8 Nov 2020 11:27:06 +0000 (11:27 +0000)]
Auto merge of #78410 - lcnr:revert75443, r=nikomatsakis

revert #75443, update mir validator

This PR reverts rust-lang#75443 to fix rust-lang#75992 and instead uses rust-lang#75419 to fix rust-lang#75313.

Adapts rust-lang#75419 to correctly deal with unevaluated constants as otherwise some `feature(const_evaluatable_checked)` tests would ICE.

Note that rust-lang#72793 was also fixed by rust-lang#75443, but as that issue only concerns `feature(type_alias_impl_trait)` I deleted that test case for now and would reopen that issue.

rust-lang#75443 may have also allowed some other code to now successfully compile which would make this revert a breaking change after 2 stable versions, but I hope that this is a purely theoretical concern.

See https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/generator.20upvars/near/214617274 for more reasoning about this.

r? `@nikomatsakis` `@eddyb` `@RalfJung`

3 years agoAuto merge of #77729 - petrochenkov:mergetarg, r=Mark-Simulacrum
bors [Sun, 8 Nov 2020 02:21:55 +0000 (02:21 +0000)]
Auto merge of #77729 - petrochenkov:mergetarg, r=Mark-Simulacrum

rustc_target: Move some target options from `Target` to `TargetOptions`

The only reason for `Target` to `TargetOptions` to be separate structures is that options in `TargetOptions` have reasonable defaults and options in `Target` don't.
(Otherwise all the options logically belong to a single `Target` struct.)

This PR moves a number of options with reasonable defaults from `Target` to `TargetOptions`, so they no longer needs to be specified explicitly for majority of the targets.
The move also allows to inherit the options from `rustc_target/src/spec/*_base.rs` files in a nicer way.
I didn't change any specific option values here.

The moved options are `target_c_int_width` (defaults to `"32"`), `target_endian` (defaults to `"little"`), `target_os` (defaults to `"none"`), `target_env` (defaults to `""`), `target_vendor` (defaults to `"unknown"`) and `linker_flavor` (defaults to `LinkerFlavor::Gcc`).

Next steps (in later PRs):
- Find a way to merge `TargetOptions` into `Target`
- If not, always access `TargetOptions` fields through `Deref` making it a part of `Target` at least logically (`session.target.target.options.foo` -> `session.target.target.foo`)
- ~Eliminate `session::config::Config` and use `Target` instead (`session.target.target.foo` -> `session.target.foo`)~ Done in https://github.com/rust-lang/rust/pull/77943.
- Avoid tautologies in option names (`target.target_os` -> `target.os`)
- Resolve _ https://github.com/rust-lang/rust/issues/77730 (rustc_target: The differences between `target_os = "none"` and `target_os = "unknown"`, and `target_vendor = "unknown"` and `target_vendor = ""` are unclear) noticed during implementation of this PR.

3 years agoUse a semicolon instead of a dash in lint note
Aaron Hill [Sun, 8 Nov 2020 01:39:35 +0000 (20:39 -0500)]
Use a semicolon instead of a dash in lint note

3 years agoDon't fire `CONST_ITEM_MUTATION` lint when borrowing a deref
Aaron Hill [Sun, 8 Nov 2020 01:11:53 +0000 (20:11 -0500)]
Don't fire `CONST_ITEM_MUTATION` lint when borrowing a deref

Fixes #78819

This extends the check for dereferences added in PR #77324
to cover mutable borrows, as well as direct writes. If we're operating
on a dereference of a `const` item, we shouldn't be firing the lint.

3 years agotypo and formatting
o752d [Sat, 7 Nov 2020 23:25:10 +0000 (23:25 +0000)]
typo and formatting

fixed a typo and modified some line formatting justification while I'm here :)

3 years agorustc_resolve: Use `#![feature(format_args_capture)]`
Vadim Petrochenkov [Sat, 7 Nov 2020 22:38:11 +0000 (01:38 +0300)]
rustc_resolve: Use `#![feature(format_args_capture)]`

3 years agoAuto merge of #78784 - Mark-Simulacrum:revert-77421, r=petrochenkov
bors [Sat, 7 Nov 2020 21:57:02 +0000 (21:57 +0000)]
Auto merge of #78784 - Mark-Simulacrum:revert-77421, r=petrochenkov

Revert "Revert "resolve: Avoid "self-confirming" import resolutions in one more case""

Specifically, this reverts commit b20bce8ce54ea9d47c2e3eb0b17cbb6baf916ae2 from #77421 to fix #77586.

The lang team has decided that for the time being we want to avoid the breakage here (perhaps for a future edition; though almost certainly not the upcoming one), though a future PR may want to add a lint around this case (and perhaps others) which are unlikely to be readable code.

r? `@petrochenkov` to confirm this is the right way to fix #77586.

3 years agoConvert a bunch of intra-doc links
Camelid [Sat, 7 Nov 2020 20:22:24 +0000 (12:22 -0800)]
Convert a bunch of intra-doc links

3 years agoLess verbose debug logging from inlining integrator
Tomasz Miąsko [Sat, 7 Nov 2020 00:00:00 +0000 (00:00 +0000)]
Less verbose debug logging from inlining integrator

The inlining integrator produces relatively verbose and uninteresting
logs.  Move them from a debug log level to a trace level, so that they
can be easily isolated from others.

3 years agoHonor the rustfmt setting in config.toml
Jake Goulding [Sat, 7 Nov 2020 18:26:42 +0000 (13:26 -0500)]
Honor the rustfmt setting in config.toml

Prior to this, setting the rustfmt configuration was ignored:

```
% mkdir example

% cd example

% ../configure --set build.rustfmt=/usr/bin/true

% ../x.py fmt
./x.py fmt is not supported on this channel
failed to run: /Users/shep/Projects/rust/example/build/bootstrap/debug/bootstrap fmt
Build completed unsuccessfully in 0:00:01
```

And after:

```
% ../x.py fmt
Build completed successfully in 0:00:11
```

3 years agoSmall cleanup in `TypeFoldable` derive macro
LeSeulArtichaut [Sat, 7 Nov 2020 17:20:42 +0000 (18:20 +0100)]
Small cleanup in `TypeFoldable` derive macro

3 years agoAuto merge of #75199 - Mark-Simulacrum:debug-asserts, r=pietroalbini
bors [Sat, 7 Nov 2020 16:54:23 +0000 (16:54 +0000)]
Auto merge of #75199 - Mark-Simulacrum:debug-asserts, r=pietroalbini

Re-enable debug and LLVM assertions

Historically we've disabled these assertions on a number of platforms with the
goal of speeding up CI. Now, though, having migrated to GitHub actions, CI is
already pretty fast, and these debug assertions do bring us some value.

This does leave in some debug assertions that are performance-related: macOS
currently hovers at just under 2 hours.

There are also some other builders which have debug and LLVM assertions
disabled:

llvm-8, PR builder:

In one view, this builder tests our support for older LLVMs. But in reality, a
lot of our tests already disable themselves on older LLVMs, and I think our
general stance is that we really only support the in-tree LLVM. Plus, we really
want CI times on this builder to be really low, as it's run on *every* PR --
that's a lot of CI time.

test-various:

This disables debug asserts still -- as noted in the Dockerfile, we test code
size, and we need debug asserts off for that to work well.

Helps with #59637 -- but doesn't close it, macOS still has asserts off.

r? `@pietroalbini`

3 years agoremove FIXME comment of #62277 in print_type_sizez ui tests
Daiki Ihara [Sat, 7 Nov 2020 12:34:40 +0000 (21:34 +0900)]
remove FIXME comment of #62277 in print_type_sizez ui tests

3 years agoUpdate recently added targets
Vadim Petrochenkov [Sat, 7 Nov 2020 11:34:44 +0000 (14:34 +0300)]
Update recently added targets

3 years agorustc_target: Move `linker_flavor` from `Target` to `TargetOptions`
Vadim Petrochenkov [Thu, 8 Oct 2020 19:22:28 +0000 (22:22 +0300)]
rustc_target: Move `linker_flavor` from `Target` to `TargetOptions`

3 years agorustc_target: Move `target_vendor` from `Target` to `TargetOptions`
Vadim Petrochenkov [Thu, 8 Oct 2020 19:10:13 +0000 (22:10 +0300)]
rustc_target: Move `target_vendor` from `Target` to `TargetOptions`

3 years agorustc_target: Move `target_env` from `Target` to `TargetOptions`
Vadim Petrochenkov [Thu, 8 Oct 2020 18:47:22 +0000 (21:47 +0300)]
rustc_target: Move `target_env` from `Target` to `TargetOptions`

3 years agorustc_target: Move `target_os` from `Target` to `TargetOptions`
Vadim Petrochenkov [Thu, 8 Oct 2020 17:54:45 +0000 (20:54 +0300)]
rustc_target: Move `target_os` from `Target` to `TargetOptions`

3 years agorustc_target: Move `target_endian` from `Target` to `TargetOptions`
Vadim Petrochenkov [Thu, 8 Oct 2020 16:57:41 +0000 (19:57 +0300)]
rustc_target: Move `target_endian` from `Target` to `TargetOptions`

3 years agorustc_target: Move `target_c_int_width` from `Target` to `TargetOptions`
Vadim Petrochenkov [Thu, 8 Oct 2020 16:36:11 +0000 (19:36 +0300)]
rustc_target: Move `target_c_int_width` from `Target` to `TargetOptions`

3 years agoAuto merge of #78817 - RalfJung:miri, r=RalfJung
bors [Sat, 7 Nov 2020 08:40:56 +0000 (08:40 +0000)]
Auto merge of #78817 - RalfJung:miri, r=RalfJung

update Miri

Fixes https://github.com/rust-lang/rust/issues/78741
Cc `@rust-lang/miri` r? `@ghost`

3 years agouse single char patterns for split() (clippy::single_char_pattern)
Matthias Krüger [Sat, 7 Nov 2020 00:23:02 +0000 (01:23 +0100)]
use single char patterns for split() (clippy::single_char_pattern)

3 years agoimprove fixme
Bastian Kauschke [Fri, 6 Nov 2020 18:21:17 +0000 (19:21 +0100)]
improve fixme

3 years agoupdate Miri
Ralf Jung [Fri, 6 Nov 2020 20:46:07 +0000 (21:46 +0100)]
update Miri

3 years agoAdd debug asserts to PR builder
Mark Rousskov [Wed, 5 Aug 2020 21:43:59 +0000 (17:43 -0400)]
Add debug asserts to PR builder

This is helpful to catch slightly more bugs before things hit main CI, and
doesn't cost too much extra CI time.

3 years agoRe-enable debug and LLVM assertions
Mark Rousskov [Wed, 5 Aug 2020 20:17:18 +0000 (16:17 -0400)]
Re-enable debug and LLVM assertions

Historically we've disabled these assertions on a number of platforms with the
goal of speeding up CI. Now, though, having migrated to GitHub actions, CI is
already pretty fast, and these debug assertions do bring us some value.

This does leave in some debug assertions that are performance-related: macOS
currently hovers at just under 2 hours.

There are also some other builders which have debug and LLVM assertions
disabled:

llvm-8, PR builder:

In one view, this builder tests our support for older LLVMs. But in reality, a
lot of our tests already disable themselves on older LLVMs, and I think our
general stance is that we really only support the in-tree LLVM. Plus, we really
want CI times on this builder to be really low, as it's run on *every* PR --
that's a lot of CI time.

test-various:

This disables debug asserts still -- as noted in the Dockerfile, we test code
size, and we need debug asserts off for that to work well.

3 years agoAuto merge of #75778 - AndyGauge:75521-rustdoc-book-improvements, r=jyn514
bors [Fri, 6 Nov 2020 19:01:10 +0000 (19:01 +0000)]
Auto merge of #75778 - AndyGauge:75521-rustdoc-book-improvements, r=jyn514

75521 rustdoc book improvements

Added some guidelines about documenting with rustdoc
Fixes #75521

3 years agoBump Rustfmt and RLS
Alessandro Ghedini [Thu, 5 Nov 2020 15:58:23 +0000 (15:58 +0000)]
Bump Rustfmt and RLS

Should hopefully fix #78341 and #78340.

3 years agoAdd tracking issue
Benoît du Garreau [Fri, 6 Nov 2020 17:04:52 +0000 (18:04 +0100)]
Add tracking issue

3 years agoMake some std::io functions `const`
Benoît du Garreau [Fri, 6 Nov 2020 16:46:56 +0000 (17:46 +0100)]
Make some std::io functions `const`

Includes:
- io::Cursor::new
- io::Cursor::get_ref
- io::Cursor::position
- io::empty
- io::repeat
- io::sink

3 years agoRevert "Revert "resolve: Avoid "self-confirming" import resolutions in one more case""
Mark Rousskov [Thu, 5 Nov 2020 20:16:12 +0000 (15:16 -0500)]
Revert "Revert "resolve: Avoid "self-confirming" import resolutions in one more case""

This reverts commit b20bce8ce54ea9d47c2e3eb0b17cbb6baf916ae2.

It retains the test added in that commit as a check-pass test, intended to
prevent future (unintentional) regressions.

3 years agoAuto merge of #78810 - JohnTitor:rollup-8fhtvxu, r=JohnTitor
bors [Fri, 6 Nov 2020 16:12:13 +0000 (16:12 +0000)]
Auto merge of #78810 - JohnTitor:rollup-8fhtvxu, r=JohnTitor

Rollup of 15 pull requests

Successful merges:

 - #74979 (`#![deny(unsafe_op_in_unsafe_fn)]` in sys/hermit)
 - #78006 (Use Intra-doc links for std::io::buffered)
 - #78167 (Fix unreachable sub-branch detection in or-patterns)
 - #78514 (Allow using 1/2/3/4 for `x.py setup` options)
 - #78538 (BTreeMap: document a curious assumption in test cases)
 - #78559 (Add LLVM upgrades from 7 to 10 to RELEASES.md)
 - #78666 (Fix shellcheck error)
 - #78705 (Print a summary of which test suite failed)
 - #78726 (Add link to rust website)
 - #78730 (Expand explanation of reverse_bits)
 - #78760 (`deny(invalid_codeblock_attributes)` for rustc_error_codes)
 - #78771 (inliner: Copy unevaluated constants only after successful inlining)
 - #78794 (rustc_expand: use collect_bang helper instead of manual reimplementation)
 - #78795 (The renumber pass is long gone)
 - #78798 (Fixing Spelling Typos)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoRollup merge of #78798 - ankushduacodes:fixing-typo, r=jonas-schievink
Yuki Okushi [Fri, 6 Nov 2020 16:02:30 +0000 (01:02 +0900)]
Rollup merge of #78798 - ankushduacodes:fixing-typo, r=jonas-schievink

Fixing Spelling Typos

Fixing #78787

3 years agoRollup merge of #78795 - est31:node_id_assignment_doc_fix, r=oli-obk
Yuki Okushi [Fri, 6 Nov 2020 16:02:28 +0000 (01:02 +0900)]
Rollup merge of #78795 - est31:node_id_assignment_doc_fix, r=oli-obk

The renumber pass is long gone

Originally, there has been a dedicated pass for renumbering
AST NodeIds to have actual values. This pass had been added by
commit a5ad4c379466519a0bf977864a5cdc50a7ade385.

Then, later, this step was moved to where it resides now,
macro expansion. See commit c86c8d41a26b2037e80c9fd028a59313a78b3a66
or PR #36438.

The comment snippet, added by the original commit, has
survived the times without any change, becoming outdated
at removal of the dedicated pass.

Nowadays, grepping for the next_node_id function will show up
multiple places in the compiler that call it, but the main
rewriting that the comment talks about is still done in the
expansion step, inside an innocious looking visit_id function
that's called during macro invocation collection.

3 years agoRollup merge of #78794 - est31:collect_bang, r=oli-obk
Yuki Okushi [Fri, 6 Nov 2020 16:02:26 +0000 (01:02 +0900)]
Rollup merge of #78794 - est31:collect_bang, r=oli-obk

rustc_expand: use collect_bang helper instead of manual reimplementation

3 years agoRollup merge of #78771 - tmiasko:inline-consts, r=oli-obk
Yuki Okushi [Fri, 6 Nov 2020 16:02:24 +0000 (01:02 +0900)]
Rollup merge of #78771 - tmiasko:inline-consts, r=oli-obk

inliner: Copy unevaluated constants only after successful inlining

Inliner copies the unevaluated constants from the callee body to the
caller at the point where decision to inline is yet to be made. The
constants will be unnecessary if inlining were to fail.

Organize the code moving items from callee to the caller together in one
place to avoid the issue.

3 years agoRollup merge of #78760 - jyn514:deny-invalid-codeblocks, r=GuillaumeGomez
Yuki Okushi [Fri, 6 Nov 2020 16:02:22 +0000 (01:02 +0900)]
Rollup merge of #78760 - jyn514:deny-invalid-codeblocks, r=GuillaumeGomez

`deny(invalid_codeblock_attributes)` for rustc_error_codes

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

r? ``@GuillaumeGomez``

3 years agoRollup merge of #78730 - kornelski:not-inverse, r=Dylan-DPC
Yuki Okushi [Fri, 6 Nov 2020 16:02:20 +0000 (01:02 +0900)]
Rollup merge of #78730 - kornelski:not-inverse, r=Dylan-DPC

Expand explanation of reverse_bits

Original documentation only rephrased the function name

3 years agoRollup merge of #78726 - GuillaumeGomez:back-link-to-main-website, r=steveklabnik
Yuki Okushi [Fri, 6 Nov 2020 16:02:18 +0000 (01:02 +0900)]
Rollup merge of #78726 - GuillaumeGomez:back-link-to-main-website, r=steveklabnik

Add link to rust website

Fixes #30838

This doesn't fix the issue as suggested but it at least adds a link to allow to go back to the rust website.

r? `@steveklabnik`

3 years agoRollup merge of #78705 - Mark-Simulacrum:nicer-failure-compiletest, r=jyn514
Yuki Okushi [Fri, 6 Nov 2020 16:02:16 +0000 (01:02 +0900)]
Rollup merge of #78705 - Mark-Simulacrum:nicer-failure-compiletest, r=jyn514

Print a summary of which test suite failed

Especially on CI, where cross-compiling is common and single builder may end up
with multiple hosts and multiple targets, it can be annoying to scroll back to
the nearest start of test marker. This prints out a summary of the test suite
being run directly in compiletest.

For example, on a mir-opt failure, this would show something like this:

```
failures:
    [mir-opt] mir-opt/while-storage.rs

test result: FAILED. 140 passed; 1 failed; 2 ignored; 0 measured; 0 filtered out

Some tests failed in compiletest suite=mir-opt mode=mir-opt host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
```

Fixes #78517

3 years agoRollup merge of #78666 - sasurau4:fix/shellcheck-error, r=jyn514
Yuki Okushi [Fri, 6 Nov 2020 16:02:14 +0000 (01:02 +0900)]
Rollup merge of #78666 - sasurau4:fix/shellcheck-error, r=jyn514

Fix shellcheck error

## Overview

Helps with #77290

This pr fix only errors of shellcheck, the result of `git ls-files '*.sh' | xargs shellcheck --severity=error`.

Fixing error are following.

- https://github.com/koalaman/shellcheck/wiki/SC2148
- https://github.com/koalaman/shellcheck/wiki/SC1008

Disable error following.
- https://github.com/koalaman/shellcheck/wiki/SC2068

3 years agoRollup merge of #78559 - glandium:release-notes, r=Mark-Simulacrum
Yuki Okushi [Fri, 6 Nov 2020 16:02:12 +0000 (01:02 +0900)]
Rollup merge of #78559 - glandium:release-notes, r=Mark-Simulacrum

Add LLVM upgrades from 7 to 10 to RELEASES.md

Fixes #78464

3 years agoRollup merge of #78538 - ssomers:btree_testing_rng, r=Mark-Simulacrum
Yuki Okushi [Fri, 6 Nov 2020 16:02:09 +0000 (01:02 +0900)]
Rollup merge of #78538 - ssomers:btree_testing_rng, r=Mark-Simulacrum

BTreeMap: document a curious assumption in test cases

r? ```@Mark-Simulacrum```

3 years agoRollup merge of #78514 - jyn514:setup-number, r=Mark-Simulacrum
Yuki Okushi [Fri, 6 Nov 2020 16:02:07 +0000 (01:02 +0900)]
Rollup merge of #78514 - jyn514:setup-number, r=Mark-Simulacrum

Allow using 1/2/3/4 for `x.py setup` options

This undocumented feature allows you to typo 'a' as '1'.

r? ```@Mark-Simulacrum```
cc ```@Lokathor```

3 years agoRollup merge of #78167 - Nadrieril:fix-76836_, r=varkor
Yuki Okushi [Fri, 6 Nov 2020 16:02:05 +0000 (01:02 +0900)]
Rollup merge of #78167 - Nadrieril:fix-76836_, r=varkor

Fix unreachable sub-branch detection in or-patterns

The previous implementation was too eager to avoid unnecessary "unreachable pattern" warnings. I feel more confident about this implementation than I felt about the previous one.
Fixes https://github.com/rust-lang/rust/issues/76836.

``@rustbot`` modify labels: +A-exhaustiveness-checking

3 years agoRollup merge of #78006 - pitaj:master, r=jyn514
Yuki Okushi [Fri, 6 Nov 2020 16:02:03 +0000 (01:02 +0900)]
Rollup merge of #78006 - pitaj:master, r=jyn514

Use Intra-doc links for std::io::buffered

Helps with #75080. I used the implicit link style for intrinsics, as that was what `minnumf32` and others already had.

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

r? ``@jyn514``

3 years agoRollup merge of #74979 - maekawatoshiki:fix, r=Mark-Simulacrum
Yuki Okushi [Fri, 6 Nov 2020 16:01:59 +0000 (01:01 +0900)]
Rollup merge of #74979 - maekawatoshiki:fix, r=Mark-Simulacrum

`#![deny(unsafe_op_in_unsafe_fn)]` in sys/hermit

Partial fix of #73904.

This encloses ``unsafe`` operations in ``unsafe fn`` in ``sys/hermit``.
Some unsafe blocks are not well documented because some system-based functions lack documents.

3 years agoStabilize hint::spin_loop
Ivan Tham [Sun, 30 Aug 2020 02:35:50 +0000 (10:35 +0800)]
Stabilize hint::spin_loop

Partially fix #55002, deprecate in another release

Co-authored-by: Ashley Mannix <kodraus@hey.com>
Update stable version for stabilize_spin_loop

Co-authored-by: Joshua Nelson <joshua@yottadb.com>
Use better example for spinlock

As suggested by KodrAus

Remove renamed_spin_loop already available in master

Fix spin loop example

3 years agoDisable accept4 on Android.
Maarten de Vries [Sat, 31 Oct 2020 13:20:18 +0000 (14:20 +0100)]
Disable accept4 on Android.

3 years agoignore shellcheck error SC2068
Daiki Ihara [Tue, 3 Nov 2020 13:57:56 +0000 (22:57 +0900)]
ignore shellcheck error SC2068

3 years agofix shellcheck error of SC2068
Daiki Ihara [Mon, 2 Nov 2020 12:17:52 +0000 (21:17 +0900)]
fix shellcheck error of SC2068

3 years agofix shellcheck error of SC1008
Daiki Ihara [Mon, 2 Nov 2020 12:58:43 +0000 (21:58 +0900)]
fix shellcheck error of SC1008

3 years agofix shellcheck error of SC2148
Daiki Ihara [Tue, 3 Nov 2020 13:55:49 +0000 (22:55 +0900)]
fix shellcheck error of SC2148

3 years agoAuto merge of #77351 - jyn514:clippy-sysroot, r=Mark-Simulacrum
bors [Fri, 6 Nov 2020 11:31:18 +0000 (11:31 +0000)]
Auto merge of #77351 - jyn514:clippy-sysroot, r=Mark-Simulacrum

Fix `x.py clippy`

I don't think this ever worked.

Fixes https://github.com/rust-lang/rust/issues/77309. `--fix` support is a work in progress, but works for a very small subset of `libtest`.

This works by using the host `cargo-clippy` driver; it does not use `stage0.txt` at all. To mitigate confusion from this, it gives an error if you don't have `rustc +nightly` as the default rustc in `$PATH`. Additionally, it means that bootstrap can't set `RUSTC`; this makes it no longer possible for clippy to detect the sysroot itself. Instead, bootstrap passes the sysroot to cargo.

r? `@ghost`

3 years agoAuto merge of #78267 - richkadel:llvm-coverage-counters-2.0.3r1, r=tmandry
bors [Fri, 6 Nov 2020 06:59:44 +0000 (06:59 +0000)]
Auto merge of #78267 - richkadel:llvm-coverage-counters-2.0.3r1, r=tmandry

Working expression optimization, and some improvements to branch-level source coverage

This replaces PR #78040 after reorganizing the original commits (by request) into a more logical sequence of major changes.

Most of the work is in the MIR `transform/coverage/` directory (originally, `transform/instrument_coverage.rs`).

Note this PR includes some significant additional debugging capabilities, to help myself and any future developer working on coverage improvements or issues.

In particular, there's a new Graphviz (.dot file) output for the coverage graph (the `BasicCoverageBlock` control flow graph) that provides ways to get some very good insight into the relationships between the MIR, the coverage graph BCBs, coverage spans, and counters. (There are also some cool debugging options, available via environment variable, to alter how some data in the graph appears.)

And the code for this Graphviz view is actually generic... it can be used by any implementation of the Rust `Graph` traits.

Finally (for now), I also now output information from `llvm-cov` that shows the actual counters and spans it found in the coverage map, and their counts (from the `--debug` flag). I found this to be enormously helpful in debugging some coverage issues, so I kept it in the test results as well for additional context.

`@tmandry` `@wesleywiser`

r? `@tmandry`

Here's an example of the new coverage graph:

* Within each `BasicCoverageBlock` (BCB), you can see each `CoverageSpan` and its contributing statements (MIR `Statement`s and/or `Terminator`s)
* Each `CoverageSpan` has a `Counter` or and `Expression`, and `Expression`s show their Add/Subtract operation with nested operations. (This can be changed to show the Counter and Expression IDs instead, or in addition to, the BCB.)
* The terminators of all MIR `BasicBlock`s in the BCB, including one final `Terminator`
* If an "edge counter" is required (because we need to count an edge between blocks, in some cases) the edge's Counter or Expression is shown next to its label. (Not shown in the example below.) (FYI, Edge Counters are converted into a new MIR `BasicBlock` with `Goto`)

<img width="1116" alt="Screen Shot 2020-10-17 at 12 23 29 AM" src="https://user-images.githubusercontent.com/3827298/96331095-616cb480-100f-11eb-8212-60f2d433e2d8.png">

r? `@tmandry`
FYI: `@wesleywiser`

3 years agoDisable the spanview tests on MacOS for now
Rich Kadel [Fri, 6 Nov 2020 02:21:30 +0000 (18:21 -0800)]
Disable the spanview tests on MacOS for now

And even though CI should now pass for MacOS, the llvm-cov show --debug
flag does not work when developing outside of CI, so I'm disabling it
for MacOS by default.

3 years agoAuto merge of #77856 - GuillaumeGomez:automatic-links-lint, r=jyn514,ollie27
bors [Fri, 6 Nov 2020 04:17:41 +0000 (04:17 +0000)]
Auto merge of #77856 - GuillaumeGomez:automatic-links-lint, r=jyn514,ollie27

Add non_autolinks lint

Part of #77501.

r? `@jyn514`

3 years agoFixing Spelling Typos
ankushduacodes [Fri, 6 Nov 2020 03:55:58 +0000 (09:25 +0530)]
Fixing Spelling Typos

3 years agodocument HACKs
Peter Jaszkowiak [Fri, 6 Nov 2020 02:26:08 +0000 (19:26 -0700)]
document HACKs

3 years agoFix sed command for Mac
Rich Kadel [Thu, 5 Nov 2020 07:27:47 +0000 (23:27 -0800)]
Fix sed command for Mac

add -e between -i and quoted script

I had tested on my mac but forgot I had aliased sed=gsed. My bad.

3 years agorename some tests to avoid exceeding windows path limits
Rich Kadel [Wed, 4 Nov 2020 05:45:32 +0000 (21:45 -0800)]
rename some tests to avoid exceeding windows path limits

And restored missing error message from llvm-cov show

And since some CI builds disable LLVM assertions (which disables the
--debug option in llvm-cov show), I check to see if LLVM assertions are
disabled, and if so, I don't add --debug and don't check the counter
file diffs.

3 years agofix cross-platform test bugs
Rich Kadel [Mon, 2 Nov 2020 23:01:30 +0000 (15:01 -0800)]
fix cross-platform test bugs

More portable way to make python 2/3 portable.

Strip Args line (with hardcoded paths) from debug counters output.

Ignore diff failures from llvm-cov debug output files ("counters"
files), since generic function instantiations will appear in those files
with mangled names. (Sadly, the demangler is apparently not applied to
the debug output.)

3 years agoResponded to all feedback as of 2020-10-30
Rich Kadel [Fri, 30 Oct 2020 23:09:05 +0000 (16:09 -0700)]
Responded to all feedback as of 2020-10-30

3 years agoAddressed all feedback to date
Rich Kadel [Sun, 25 Oct 2020 18:13:16 +0000 (11:13 -0700)]
Addressed all feedback to date

3 years agoAdded comments on remapping expression IDs, and URL to spanviews
Rich Kadel [Sun, 25 Oct 2020 08:53:44 +0000 (01:53 -0700)]
Added comments on remapping expression IDs, and URL to spanviews

3 years agoInjecting expressions in place of counters where helpful
Rich Kadel [Thu, 22 Oct 2020 21:30:03 +0000 (14:30 -0700)]
Injecting expressions in place of counters where helpful

Implementing the Graph traits for the BasicCoverageBlock
graph.

optimized replacement of counters with expressions plus new BCB graphviz

* Avoid adding coverage to unreachable blocks.
* Special case for Goto at the end of the body. Make it non-reportable.

Improved debugging and formatting options (from env)

Don't automatically add counters to BCBs without CoverageSpans. They may
still get counters but only if there are dependencies from
other BCBs that have spans, I think.

Make CodeRegions optional for Counters too. It is
possible to inject counters (`llvm.instrprof.increment` intrinsic calls
without corresponding code regions in the coverage map. An expression
can still uses these counter values.

Refactored instrument_coverage.rs -> instrument_coverage/mod.rs, and
then broke up the mod into multiple files.

Compiling with coverage, with the expression optimization, works on
the json5format crate and its dependencies.

Refactored debug features from mod.rs to debug.rs

3 years agoAdds coverage graphviz
Rich Kadel [Fri, 23 Oct 2020 03:28:16 +0000 (20:28 -0700)]
Adds coverage graphviz

3 years agoImplemented CoverageGraph of BasicCoverageBlocks
Rich Kadel [Fri, 23 Oct 2020 06:11:38 +0000 (23:11 -0700)]
Implemented CoverageGraph of BasicCoverageBlocks

3 years agoSplitting transform/instrument_coverage.rs into transform/coverage/...
Rich Kadel [Fri, 23 Oct 2020 07:45:07 +0000 (00:45 -0700)]
Splitting transform/instrument_coverage.rs into transform/coverage/...

3 years agoRust coverage before splitting instrument_coverage.rs
Rich Kadel [Mon, 5 Oct 2020 23:36:10 +0000 (16:36 -0700)]
Rust coverage before splitting instrument_coverage.rs

3 years agoThe renumber pass is long gone
est31 [Fri, 6 Nov 2020 02:03:22 +0000 (03:03 +0100)]
The renumber pass is long gone

Originally, there has been a dedicated pass for renumbering
AST NodeIds to have actual values. This pass had been added by
commit a5ad4c379466519a0bf977864a5cdc50a7ade385.

Then, later, this step was moved to where it resides now,
macro expansion. See commit c86c8d41a26b2037e80c9fd028a59313a78b3a66
or PR #36438.

The comment snippet, added by the original commit, has
survived the times without any change, becoming outdated
at removal of the dedicated pass.

Nowadays, grepping for the next_node_id function will show up
multiple places in the compiler that call it, but the main
rewriting that the comment talks about is still done in the
expansion step, inside an innocious looking visit_id function
that's called during macro invocation collection.

3 years agorustc_expand: use collect_bang helper instead of manual reimplementation
est31 [Fri, 6 Nov 2020 01:46:03 +0000 (02:46 +0100)]
rustc_expand: use collect_bang helper instead of manual reimplementation

3 years agoIntra-doc links for std::io::buffered
Peter Jaszkowiak [Fri, 16 Oct 2020 04:48:57 +0000 (22:48 -0600)]
Intra-doc links for std::io::buffered

3 years agoGet `--fix` working for everything except rustdoc
Joshua Nelson [Tue, 27 Oct 2020 01:18:28 +0000 (21:18 -0400)]
Get `--fix` working for everything except rustdoc

Here's the error for rustdoc:

```
Checking rustdoc artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
error: no library targets found in package `rustdoc-tool`
```

3 years agoEmit lints in the order in which they occur in the file.
Nadrieril [Thu, 5 Nov 2020 22:17:26 +0000 (22:17 +0000)]
Emit lints in the order in which they occur in the file.

3 years agoFix unreachable sub-branch detection
Nadrieril [Tue, 20 Oct 2020 21:08:19 +0000 (22:08 +0100)]
Fix unreachable sub-branch detection

This fixes https://github.com/rust-lang/rust/issues/76836