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
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.
Remove gensym in format_args
This also fixes some things to allow us to export opaque macros from libcore:
* Don't consider items that are only reachable through opaque macros as public/exported (so they aren't linted as needing docs)
* Mark private items reachable from the root of libcore as unstable - they are now reachable (in principle) in other crates via macros in libcore
r? @petrochenkov
Improve `ptr_rotate` performance, tests, and benches
The corresponding issue is #61784. I am not actually sure if miri can handle the test, but I can change the commit if necessary.
Test interaction between `async { ... }` and `?`, `return`, and `break`
Per the second checkbox in https://github.com/rust-lang/rust/issues/62121#issuecomment-506884048, test that `async { .. }` blocks:
1. do not allow `break` expressions.
2. get targeted by `return` and not the parent function.
3. get targeted by `?` and not the parent function.
Works towards resolving blockers in #63209.
r? @cramertj
move of packed fields might or might not occur when they actually are sufficiently aligned
See https://github.com/taiki-e/pin-project/pull/34, where it was pointed out that we actually don't move fields of 1-aligned types when dropping a packed struct -- but e.g. in a `packed(2)` struct, we don't do something similar for 2-aligned types. The code for that is [here](db7c773a6b/src/librustc_mir/util/alignment.rs (L7)).
gitignore: add comment explaining policy
Based on https://github.com/rust-lang/rust/pull/63307#issuecomment-518539503, I added a comment what I think should be gitignored and what not. This is just a proposal, obviously. Also see https://github.com/rust-lang/rust/pull/53768 for some more discussion.
The summary is that if there are junk files that you create locally and are fine leaving around (such as `mir_dump`), git has the option for you to add them to `.git/info/exclude`. Others might prefer to keep their working dir clean of those same junk files, so we shouldn't just ignore them for everyone.
I then also cleaned up a few more things, but there were many things that I had no idea where they came from so I didn't touch them.
Don't recommend `extern crate` syntax
`extern crate` syntax is not a good recommendation any more, so I've changed it to just print a suggested crate name.
Miri tests: use xargo to build separate libstd
This uses `cargo miri setup` to prepare the libstd that is used for testing Miri, instead of adjusting the entire bootstrap process to make sure the libstd that already gets built is fit for Miri.
The issue with our current approach is that with `test-miri = true`, libstd and the test suite get built with `--cfg miri`, which e.g. means hashbrown uses no SIMD, and not all things are tested. Such global side-effects seem like footguns waiting to go off.
On the other hand, the new approach means we install xargo as a side-effect of doing `./x.py test src/tools/miri`, which might be surprising, and we also both have to build xargo and another libstd which costs some extra time. Not sure if the tools builders have enough time budget for that. Maybe there is a way to cache xargo?
We have to first first land https://github.com/rust-lang/miri/pull/870 in Miri and then update this PR to include that change (also to get CI to test Miri before bors), but I wanted to get the review started here.
Cc @oli-obk (for Miri) @alexcrichton (for CI) @Mark-Simulacrum (for bootstrap)
Fixes https://github.com/rust-lang/rust/issues/61833, fixes https://github.com/rust-lang/rust/issues/63219