about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2022-12-19Auto merge of #103600 - compiler-errors:early-binder-nits, r=spastorinobors-45/+27
Address some `EarlyBinder` nits
2022-12-19Auto merge of #105698 - joboet:unsupported_threads_once, r=thomccbors-18/+103
Use a more efficient `Once` on platforms without threads The current implementation uses an atomic queue and spins rather than panicking when calling `call_once` recursively. Since concurrency is not supported on platforms like WASM, `Once` can be implemented much more efficiently using just a single non-atomic state variable.
2022-12-19Auto merge of #105892 - Dylan-DPC:rollup-eozolx4, r=Dylan-DPCbors-102/+181
Rollup of 5 pull requests Successful merges: - #105682 (Use `expose_addr()` in `fmt::Pointer`) - #105839 (Suggest a `T: Send` bound for `&mut T` upvars in `Send` generators) - #105864 (clippy::complexity fixes) - #105882 (Don't ICE in closure arg borrow suggestion) - #105889 (Fix `uninlined_format_args` in libtest) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-19Rollup merge of #105889 - Nilstrieb:fmt-libtest, r=thomccDylan DPC-24/+15
Fix `uninlined_format_args` in libtest Done using clippy with a quick manual review.
2022-12-19Rollup merge of #105882 - compiler-errors:issue-105832, r=jackh726Dylan DPC-5/+35
Don't ICE in closure arg borrow suggestion Fixes #105832
2022-12-19Rollup merge of #105864 - matthiaskrgr:compl, r=NilstriebDylan DPC-54/+26
clippy::complexity fixes filter_next needless_question_mark bind_instead_of_map manual_find derivable_impls map_identity redundant_slicing skip_while_next unnecessary_unwrap needless_bool r? `@compiler-errors`
2022-12-19Rollup merge of #105839 - LegionMammal978:mut-upvar-not-send, r=lcnrDylan DPC-17/+103
Suggest a `T: Send` bound for `&mut T` upvars in `Send` generators Right now, we suggest a `T: Sync` bound for both `&T` and `&mut T` upvars. A user on URLO [found this confusing](https://users.rust-lang.org/t/error-complains-about-missing-sync-but-send-is-whats-missing/86021), so I wrote this quick fix to look at the mutability before making the suggestion.
2022-12-19Rollup merge of #105682 - thomcc:expose-ptr-fmt, r=RalfJungDylan DPC-2/+2
Use `expose_addr()` in `fmt::Pointer` Discussion in https://rust-lang.zulipchat.com/#narrow/stream/136281-t-lang.2Fwg-unsafe-code-guidelines/topic/Should.20.60fmt.3A.3APointer.60.20expose.20the.20argument.3F on whether or not we should do this (still undecided). CC `@RalfJung`
2022-12-19Fix `uninlined_format_args` in libtestnils-24/+15
2022-12-19Auto merge of #105845 - lqd:revert-thinlto-revert, r=Mark-Simulacrumbors-2/+2
Re-enable ThinLTO for rustc on `x86_64-apple-darwin` ThinLTO was disabled on x64 mac in https://github.com/rust-lang/rust/pull/105646 because of the https://github.com/rust-lang/rust/issues/105637 regression. It was later discovered that the issue was present on other targets as well, as the mac revert was already landing. The linux/win reverts, however, did not land before the root cause was identified. https://github.com/rust-lang/rust/pull/105800 fixed the underlying issue in `-Zdylib-lto` handling, and the x64 msvc and linux targets are now fixed, ICEs are using the correct `rustc_driver` panic hook. This PR re-enables ThinLTO on mac for improved perf now that the issue should be fixed everywhere.
2022-12-19Auto merge of #105884 - weihanglo:update-cargo, r=weihanglobors-2/+2
Update cargo 11 commits in cc0a320879c17207bbfb96b5d778e28a2c62030d..c994a4a638370bc7e0ffcbb0e2865afdfa7d4415 2022-12-14 14:46:57 +0000 to 2022-12-18 21:50:58 +0000 - Fix examples of proc-macro crates being scraped for examples (rust-lang/cargo#11497) - Enable triagebot's relabel functionality (rust-lang/cargo#11498) - Revert "temporarily disable test `lto::test_profile`" (rust-lang/cargo#11495) - Bump to 0.69.0, update changelog (rust-lang/cargo#11493) - Fix typo (rust-lang/cargo#11491) - Display CPU info in CI (rust-lang/cargo#11488) - Fix collision_doc_profile test error (rust-lang/cargo#11489) - fix: Make auto-fix note work with `clippy` (rust-lang/cargo#11399) - fix(add): use the possessive in error message (rust-lang/cargo#11483) - Document home crate in contrib docs (rust-lang/cargo#11481) - Split up registry documentation into multiple sections (rust-lang/cargo#11480) r? `@ghost`
2022-12-19Auto merge of #105883 - matthiaskrgr:rollup-v5n53t1, r=matthiaskrgrbors-162/+236
Rollup of 8 pull requests Successful merges: - #105419 (Add tests for #41731) - #105447 (Add a test for #103095) - #105842 (print argument name in arg mismatch if possible) - #105863 (Update browser-ui-test version to reduce GUI tests flakyness) - #105867 (remove redundant fn params that were only "used" in recursion) - #105869 (don't clone Copy types) - #105873 (use &str / String literals instead of format!()) - #105879 (Revert "Introduce lowering_arena to avoid creating AST nodes on the fly") Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-18Update cargoWeihang Lo-2/+2
11 commits in cc0a320879c17207bbfb96b5d778e28a2c62030d..c994a4a638370bc7e0ffcbb0e2865afdfa7d4415 2022-12-14 14:46:57 +0000 to 2022-12-18 21:50:58 +0000 - Fix examples of proc-macro crates being scraped for examples (rust-lang/cargo#11497) - Enable triagebot's relabel functionality (rust-lang/cargo#11498) - Revert "temporarily disable test `lto::test_profile`" (rust-lang/cargo#11495) - Bump to 0.69.0, update changelog (rust-lang/cargo#11493) - Fix typo (rust-lang/cargo#11491) - Display CPU info in CI (rust-lang/cargo#11488) - Fix collision_doc_profile test error (rust-lang/cargo#11489) - fix: Make auto-fix note work with `clippy` (rust-lang/cargo#11399) - fix(add): use the possessive in error message (rust-lang/cargo#11483) - Document home crate in contrib docs (rust-lang/cargo#11481) - Split up registry documentation into multiple sections (rust-lang/cargo#11480)
2022-12-19clippy::complexity fixesMatthias Krüger-54/+26
filter_next needless_question_mark bind_instead_of_map manual_find derivable_impls map_identity redundant_slicing skip_while_next unnecessary_unwrap needless_bool
2022-12-18Rollup merge of #105879 - Nilstrieb:revert-hir-arena, r=oli-obkMatthias Krüger-38/+21
Revert "Introduce lowering_arena to avoid creating AST nodes on the fly" This reverts commit d9a1faaa9cff6eab069ea8e5cd7862d0ae48e231 (#101499). This was originally part of #101345 which has now been closed as a different approach is taken now. r? `@oli-obk` cc `@spastorino`
2022-12-18Rollup merge of #105873 - matthiaskrgr:clippy_fmt, r=NilstriebMatthias Krüger-55/+37
use &str / String literals instead of format!()
2022-12-18Rollup merge of #105869 - matthiaskrgr:clone_on_copy, r=compiler-errorsMatthias Krüger-16/+16
don't clone Copy types
2022-12-18Rollup merge of #105867 - matthiaskrgr:rec_param, r=compiler-errorsMatthias Krüger-44/+10
remove redundant fn params that were only "used" in recursion
2022-12-18Rollup merge of #105863 - GuillaumeGomez:update-browser-ui-test, r=notriddleMatthias Krüger-1/+1
Update browser-ui-test version to reduce GUI tests flakyness Part of https://github.com/rust-lang/rust/issues/93784. r? `@notriddle`
2022-12-18Rollup merge of #105842 - compiler-errors:arg-name-sugg, r=petrochenkovMatthias Krüger-8/+15
print argument name in arg mismatch if possible A bit more contextual than just `/* value */`, at least when the argument is named something related to its context. The UI test cases are... not super convincing, but also they're minimized tests.
2022-12-18Rollup merge of #105447 - TaKO8Ki:add-test-for-103095, r=petrochenkovMatthias Krüger-0/+30
Add a test for #103095 closes #103095
2022-12-18Rollup merge of #105419 - YC:issue-41731, r=petrochenkovMatthias Krüger-0/+106
Add tests for #41731 Closes #41731
2022-12-18Auto merge of #105446 - erikdesjardins:vt-size, r=nikicbors-4/+76
Add 0..=isize::MAX range metadata to size loads from vtables This is the (much belated) size counterpart to #91569. Inspired by https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/Range.20metadata.20for.20.60size_of_val.60.20and.20other.20isize.3A.3AMAX.20limits. This could help optimize layout computations based on the size of a dyn trait. Though, admittedly, adding this to vtables wouldn't be as beneficial as adding it to slice len, which is used much more often. Miri detects this UB already: https://github.com/rust-lang/rust/blob/b7cc99142ad0cfe47e2fe9f7a82eaf5b672c0573/compiler/rustc_const_eval/src/interpret/traits.rs#L119-L121 (In fact Miri goes further, [assuming a 48-bit address space on 64-bit platforms](https://github.com/rust-lang/rust/blob/9db224fc908059986c179fc6ec433944e9cfce50/compiler/rustc_abi/src/lib.rs#L312-L331), but I don't think we can assume that in an optimization.)
2022-12-18Don't ICE in closure arg borrow suggestionMichael Goulet-5/+35
2022-12-18Revert "Introduce lowering_arena to avoid creating AST nodes on the fly"Nilstrieb-38/+21
This reverts commit d9a1faaa9cff6eab069ea8e5cd7862d0ae48e231. This was originally part of a larger PR that has now been closed as a different approach is taken now.
2022-12-18Auto merge of #105876 - matthiaskrgr:rollup-a9dgzjt, r=matthiaskrgrbors-131/+287
Rollup of 7 pull requests Successful merges: - #96584 (Fix `x setup -h -v` should work) - #105420 (Remove dead code after destination propagation) - #105844 (Make the x tool use the x and x.ps1 scripts) - #105854 (remove redundant clone) - #105858 (Another `as_chunks` example) - #105870 (avoid .into() conversion to identical types) - #105875 (don't destuct references just to reborrow) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-18Rollup merge of #105875 - matthiaskrgr:needless_borrowed_reference, r=oli-obkMatthias Krüger-42/+41
don't destuct references just to reborrow
2022-12-18Rollup merge of #105870 - matthiaskrgr:useless_conv, r=oli-obkMatthias Krüger-27/+17
avoid .into() conversion to identical types
2022-12-18Rollup merge of #105858 - scottmcm:extra-as-chunks-example, r=the8472Matthias Krüger-0/+11
Another `as_chunks` example I really liked this structure that dtolney brought up in #105316, so wanted to put it in the docs to help others use it.
2022-12-18Rollup merge of #105854 - matthiaskrgr:rmclone, r=compiler-errorsMatthias Krüger-1/+1
remove redundant clone
2022-12-18Rollup merge of #105844 - albertlarsan68:x-rewrite, r=jyn514Matthias Krüger-40/+32
Make the x tool use the x and x.ps1 scripts This removes another python search from bootstrap. r? `@jyn514`
2022-12-18Rollup merge of #105420 - tmiasko:dest-prop-dead-code, r=JakobDegenMatthias Krüger-0/+111
Remove dead code after destination propagation Fixes #105428. cc `@JakobDegen`
2022-12-18Rollup merge of #96584 - bentongxyz:x-setup-h-v-should-work, r=jyn514Matthias Krüger-21/+74
Fix `x setup -h -v` should work r? `@jyn514` I have to convert profile to path and back in order to remove special-casing in bootstrap. I also check for `dry_run` so that `config.toml` and/ or `.git/hooks/pre-push` will not be created if `--dry-run` is specified. Please help me see if this is ok, thanks alot!
2022-12-18Update browser-ui-test version to reduce GUI tests flakynessGuillaume Gomez-1/+1
2022-12-18Make x use the x and x.ps1 scriptsAlbert Larsan-40/+32
This removes another python search from bootstrap.
2022-12-18don't restuct references just to reborrowMatthias Krüger-42/+41
2022-12-18Auto merge of #105714 - jyn514:tidy-first, r=Mark-Simulacrumbors-8/+20
Run `x test tidy` sooner in mingw-check It takes less time to run than the other tests and is more likely to fail. `expand-yaml-anchors` is still run first to make sure the CI files are internally consistent. Note that changing to `--stage 0` doesn't actually do anything since bootstrap tools are always built with the bootstrap compiler, this just makes it less confusing. cc https://github.com/rust-lang/rust/pull/105058/commits/83bab41b5b2d4752d187dd91b05c88ac74cf3783
2022-12-18avoid .into() conversion to identical typesMatthias Krüger-27/+17
2022-12-18use &str / String literals instead of format!()Matthias Krüger-55/+37
2022-12-18remove redundant fn params that were only "used" in recursionMatthias Krüger-44/+10
2022-12-18don't clone Copy typesMatthias Krüger-16/+16
2022-12-18Auto merge of #104417 - mejrs:mir_build, r=davidtwcobors-302/+1203
Migrate rustc_mir_build diagnostics Rebases https://github.com/rust-lang/rust/pull/100854 ~~The remaining issue is how to better resolve https://github.com/rust-lang/rust/commit/72bea68af4ee2a41c44998916f6a789163f12e7d~~ ~~The diagnostic macros seems to generate a broken diagnostic, and I couldn't figure out how to manually format the fluent message, so I hardcoded the format string for now. I'd like pointers to a better fix for this.~~ Also, I'm not 100% sure I didn't mess up a rebase somewhere 🙂 r? `@davidtwco`
2022-12-18Auto merge of #105638 - tavianator:fix-50619-again, r=Mark-Simulacrumbors-38/+47
fs: Fix #50619 (again) and add a regression test Bug #50619 was fixed by adding an end_of_stream flag in #50630. Unfortunately, that fix only applied to the readdir_r() path. When I switched Linux to use readdir() in #92778, I inadvertently reintroduced the bug on that platform. Other platforms that had always used readdir() were presumably never fixed. This patch enables end_of_stream for all platforms, and adds a Linux-specific regression test that should hopefully prevent the bug from being reintroduced again.
2022-12-17Another `as_chunks` exampleScott McMurray-0/+11
I really liked this structure that dtolney brought up in #105316, so wanted to put it in the docs to help others use it.
2022-12-18Auto merge of #105617 - bjorn3:update_crossbeam, r=Mark-Simulacrumbors-11/+10
Update crossbeam This fixes builds for Gentoo This should fix https://github.com/rust-lang/rust/issues/104866 (cc `@stefson)`
2022-12-18remove redundant cloneMatthias Krüger-1/+1
2022-12-17Auto merge of #105849 - matthiaskrgr:rollup-ya4s1n2, r=matthiaskrgrbors-55/+476
Rollup of 8 pull requests Successful merges: - #104854 (Symlink `build/host` -> `build/$HOST_TRIPLE`) - #105458 (Allow blocking `Command::output`) - #105559 (bootstrap: Allow installing `llvm-tools`) - #105789 (rustdoc: clean up margin CSS for scraped examples) - #105792 (docs: add long error explanation for error E0320) - #105814 (Support call and drop terminators in custom mir) - #105829 (Speed up tidy) - #105836 (std::fmt: Use args directly in example code) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-17Remove special cases for setup subcommandBenjamin Tong-21/+74
- Remove setup special-casing in Flags::parse
2022-12-17Rollup merge of #105836 - evanj:fmt-doc-use-variables, r=Mark-SimulacrumMatthias Krüger-2/+2
std::fmt: Use args directly in example code The lint "clippy::uninlined_format_args" recommends inline variables in format strings. Fix two places in the docs that do not do this. I noticed this because I copy/pasted one example in to my project, then noticed this lint error. This fixes: ``` error: variables can be used directly in the `format!` string --> src/main.rs:30:22 | 30 | let string = format!("{:.*}", decimals, magnitude); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: variables can be used directly in the `format!` string --> src/main.rs:39:2 | 39 | write!(&mut io::stdout(), "{}", args).unwrap(); ```
2022-12-17Rollup merge of #105829 - the8472:tidy-style, r=jyn514Matthias Krüger-34/+70
Speed up tidy This can be reviewed commit by commit since they contain separate optimizations. ``` # master $ taskset -c 0-5 hyperfine './x test tidy' Benchmark #1: ./x test tidy Time (mean ± σ): 4.857 s ± 0.064 s [User: 12.967 s, System: 2.014 s] Range (min … max): 4.779 s … 4.997 s 10 runs # PR $ taskset -c 0-5 hyperfine './x test tidy' Benchmark #1: ./x test tidy Time (mean ± σ): 3.672 s ± 0.035 s [User: 10.524 s, System: 2.029 s] Range (min … max): 3.610 s … 3.725 s 10 runs ```