Rollup of 8 pull requests
Successful merges:
- #62644 (simplify std::io::Write::write rustdoc)
- #62971 (Add keywords item into the sidebar)
- #63122 (Account for `maybe_whole_expr` in range patterns)
- #63158 (Add test for issue-58951)
- #63170 (cleanup StringReader fields)
- #63179 (update test cases for vxWorks)
- #63188 (Fix typos in release notes.)
- #63191 (ci: fix toolstate not pushing data for Linux)
Failed merges:
r? @ghost
ci: fix toolstate not pushing data for Linux
A recent commit modified toolstate to only push updated data when the `TOOLSTATE_PUBLISH` environment variable is present. This worked fine on Windows but failed on Linux, since Linux jobs run inside Docker containers and the variable wasn't forwarded inside it.
This changes the Docker startup code to set the `TOOLSTATE_PUBLISH` enviornment variable inside the container if it's present outside.
r? @alexcrichton
fixes https://github.com/rust-lang/rust/issues/63190
update test cases for vxWorks
issue-2214.rs: lgamma is lgamma on vxWorks
ignore process-envs.rs and process-remove-from-env.rs as there is no 'env' on vxWorks
cleanup StringReader fields
reduce visibility and replace `Lrc<SourceFile>` with `start_pos`: the single bit we actually *need* from the file.
r? @petrochenkov
simplify std::io::Write::write rustdoc
The std::io::Write::write method currensly suggests consumers guaranteed
that `0 <= n <= buf.len()`, for `Ok(n)`, however `n` is of type `usize`
causing the compiler to emit a warning:
```
warning: comparison is useless due to type limits
--> lib.rs:6:18
|
6 | Ok(n) => 0 <= n && n <= output.len(),
| ^^^^^^
|
= note: #[warn(unused_comparisons)] on by default
```
This PR removes the suggestion to check `0 <= n` since it is moot.
r? @steveklabnik
A recent commit modified toolstate to only push updated data when the
TOOLSTATE_PUBLISH environment variable is present. This worked fine on
Windows but failed on Linux, since Linux jobs run inside Docker
containers and the variable wasn't forwarded inside it.
This changes the Docker startup code to set the TOOLSTATE_PUBLISH
enviornment variable inside the container if it's present outside.
Remove derives `Encodable`/`Decodable` and unstabilize attribute `#[bench]`
`Encodable` and `Decodable` were deprecated before 1.0 and emitted an unsuppressable warning all this time.
`#[bench]` is a part of the custom test framework feature and cannot be used meaningfully on stable, only as `cfg(false)`.
Crater results can be found in https://github.com/rust-lang/rust/pull/62507#issuecomment-513850732 and below.
This PR also reroutes the tracking issue for `feature(test)` from #27812 (compiler internals) to #50297 (custom test frameworks).
Closes https://github.com/rust-lang/rust/issues/62048
Attempt to fix backtrace tests on i686-msvc
Some fixes for i686-msvc and Windows have landed on the `backtrace`
crate but hadn't made their way here yet. Let's update that and see if
it passes CI.
Some fixes for i686-msvc and Windows have landed on the `backtrace`
crate but hadn't made their way here yet. Let's update that and see if
it passes CI.
rustc: Compile the `fmt_macros` crate as an rlib
I think this was left out by accident from the "convert everything to
rlibs" commit, there's no need for this to be a dylib just as everything
else doesn't need to be a dylib!
submodules: update clippy from dc69a5c0 to c3e91365
Changes:
````
Fix breakage due to rust-lang/rust#61856
Fix dogfood test
Hash discriminant of lifetime.name
Hash discriminant of Lifetime::Name
Updated tests.
Respond to review comments
Updated test stderr
Added doc comment fixed type printout
Respond to comments and improve printout
Responded to comments and fixed compile bug
Fixed more compile errors
Fix some of the compile errors
Changed Ty to ty, added lifetime 'tcx
Lint for type repetition in trait bounds.
````
r? @Manishearth
`const fn`-ify `std::any::type_name` as laid out in #63084
A test, based on the one I added when I implemented support for the underlying `core::intrinsics::type_name` being allowed in `const fn` contexts, is included.
Turn `INCOMPLETE_FEATURES` into lint
We do this because it is annoying to see the warning when building rustc and because this is better from a "separation of concerns" POV.
The drawback to this change is that this will respect `--cap-lints`.
Also note that this is not a buffered lint so if there are fatal parser errors then the lint will not trigger.
r? @varkor
Unsupport the `await!(future)` macro
Unsupport the `await!(future)` "macro" and recognize it in error recovery instead.
The `future.await` syntax has been on nightly since 2019-05-08.
This was 55 days ago which is 1.31 releases ago.
Closes https://github.com/rust-lang/rust/issues/60610.
r? @cramertj
Last two commits bumped rustc-ap-* crates which also transitively
updated rustc_data_structures. That crate enables the "nightly"
whereas Cargo's dep does not hence why we need to unify the features
to deduplicate the artifacts.
Changes:
````
Fix breakage due to rust-lang/rust#61856
Fix dogfood test
Hash discriminant of lifetime.name
Hash discriminant of Lifetime::Name
Updated tests.
Respond to review comments
Updated test stderr
Added doc comment fixed type printout
Respond to comments and improve printout
Responded to comments and fixed compile bug
Fixed more compile errors
Fix some of the compile errors
Changed Ty to ty, added lifetime 'tcx
Lint for type repetition in trait bounds.
````
rustc: Stabilize options for pipelined compilation
This commit stabilizes options in the compiler necessary for Cargo to
enable "pipelined compilation" by default. The concept of pipelined
compilation, how it's implemented, and what it means for rustc are
documented in #60988. This PR is coupled with a PR against Cargo
(rust-lang/cargo#7143) which updates Cargo's support for pipelined
compliation to rustc, and also enables support by default in Cargo.
(note that the Cargo PR cannot land until this one against rustc lands).
The technical changes performed here were to stabilize the functionality
proposed in #60419 and #60987, the underlying pieces to enable pipelined
compilation support in Cargo. The issues have had some discussion during
stabilization, but the newly stabilized surface area here is:
* A new `--json` flag was added to the compiler.
* The `--json` flag can be passed multiple times.
* The value of the `--json` flag is a comma-separated list of
directives.
* The `--json` flag cannot be combined with `--color`
* The `--json` flag must be combined with `--error-format=json`
* The acceptable list of directives to `--json` are:
* `diagnostic-short` - the `rendered` field of diagnostics will have a
"short" rendering matching `--error-format=short`
* `diagnostic-rendered-ansi` - the `rendered` field of diagnostics
will be colorized with ansi color codes embedded in the string field
* `artifacts` - JSON blobs will be emitted for artifacts being emitted
by the compiler
The unstable `-Z emit-artifact-notifications` and `--json-rendered`
flags have also been removed during this commit as well.
Closes#60419Closes#60987Closes#60988