Remove redundant method with const variable resolution
I've also removed a `bug!()` in const value relation code and replaced it with a `FIXME`. Now `ConstValue::Slice` and `ConstValue::ByRef` will simply fail to unify rather than ICEing, which seems more user-friendly for testers.
More questionmarks in doctests
This removes the other `unwrap`s in the macro doctests, replacing them with `?`. For now, we need to specify the main function including the return type, we can get rid of that once the return type suggestion for `fn main() { .. }` works correctly.
r? @QuietMisdreavus
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