about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-08-25Auto merge of #129540 - tgross35:rollup-y6iaujw, r=tgross35bors-303/+687
Rollup of 10 pull requests Successful merges: - #128467 (Detect `*` operator on `!Sized` expression) - #128524 (Don't suggest turning crate-level attributes into outer style) - #128735 (Add a special case for `CStr`/`CString` in the `improper_ctypes` lint) - #129429 (Print the generic parameter along with the variance in dumps.) - #129430 (rustdoc: show exact case-sensitive matches first) - #129449 (Put Pin::as_deref_mut in impl Pin<Ptr> / rearrange Pin methods) - #129481 (Update `compiler_builtins` to `0.1.121`) - #129482 (Add myself to the review rotation for libs) - #129492 (Make wasm32 platform support docs easier to read) - #129512 (update the doc comment on lintchecker b/c it parses html now) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-24Rollup merge of #129512 - lolbinarycat:linkchecker-impl-docs, r=ehussTrevor Gross-2/+4
update the doc comment on lintchecker b/c it parses html now
2024-08-24Rollup merge of #129492 - tshepang:patch-2, r=chenyukangTrevor Gross-4/+3
Make wasm32 platform support docs easier to read
2024-08-24Rollup merge of #129482 - thomcc:add-to-review-rotation, r=jieyouxuTrevor Gross-0/+1
Add myself to the review rotation for libs I am feeling better, and my new job gives me some time to do this.
2024-08-24Rollup merge of #129481 - scottmcm:update-cb, r=tgross35Trevor Gross-4/+4
Update `compiler_builtins` to `0.1.121` To pick up https://github.com/rust-lang/compiler-builtins/pull/673 and unblock https://github.com/rust-lang/rust/pull/129403 r? tgross35
2024-08-24Rollup merge of #129449 - coolreader18:pin-as_deref_mut-signature, r=dtolnayTrevor Gross-70/+73
Put Pin::as_deref_mut in impl Pin<Ptr> / rearrange Pin methods Tracking issue: #86918 Based on the suggestion in https://github.com/rust-lang/rust/issues/86918#issuecomment-2189367582 > Some advantages: > > * Synergy with the existing `as_ref` and `as_mut` signatures (stable since Rust 1.33) > > * Lifetime elision reduces noise in the signature > > * Turbofish less verbose: `Pin::<&mut T>::as_deref_mut` vs `Pin::<&mut Pin<&mut T>>::as_deref_mut` The comment seemed to imply that `Pin::as_ref` and `Pin::as_mut` already share an impl block, which they don't. So, I rearranged it so that they do, and we can see which looks better in the docs. <details><summary><b>Docs screenshots</b></summary> Current nightly: ![image](https://github.com/user-attachments/assets/b432cb82-8f4b-48ae-bafc-2fe49d0ad48c) `Pin::as_deref_mut` moved into the same block as `as_mut`: ![image](https://github.com/user-attachments/assets/f9b35722-6a88-4465-ad1c-28d8e91902ac) `Pin::as_ref`, `as_mut`, and `as_deref_mut` all in the same block: ![image](https://github.com/user-attachments/assets/9a1b2bf0-70a6-4751-b13f-390f1d575244) </details> I think I like the last one the most; obviously I'm biased since I'm the one who rearranged it, but it doesn't make sense to me to have `as_ref` methods split up by an `into_inner` method. r? dtolnay
2024-08-24Rollup merge of #129430 - lolbinarycat:rustdoc-search-exact-case, r=notriddleTrevor Gross-0/+15
rustdoc: show exact case-sensitive matches first fixes #119480
2024-08-24Rollup merge of #129429 - cjgillot:named-variance, r=compiler-errorsTrevor Gross-140/+158
Print the generic parameter along with the variance in dumps. This allows to make sure we are testing what we think we are testing. While the tests are correct, I discovered that opaque duplicated args are in the reverse declaration order.
2024-08-24Rollup merge of #128735 - jieyouxu:pr-120176-revive, r=cjgillotTrevor Gross-21/+172
Add a special case for `CStr`/`CString` in the `improper_ctypes` lint Revives #120176. Just needed to bless a test and fix an argument, but seemed reasonable to me otherwise. Instead of saying to "consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct", we now tell users to "Use `*const ffi::c_char` instead, and pass the value from `CStr::as_ptr()`" when the type involved is a `CStr` or a `CString`. The suggestion is not made for `&mut CString` or `*mut CString`. r? ``````@cjgillot`````` (since you were the reviewer of the original PR #120176, but feel free to reroll)
2024-08-24Rollup merge of #128524 - ↵Trevor Gross-53/+70
chenyukang:yukang-fix-127930-invalid-outer-style-sugg, r=cjgillot Don't suggest turning crate-level attributes into outer style Fixes #127930
2024-08-24Rollup merge of #128467 - estebank:unsized-args, r=cjgillotTrevor Gross-9/+187
Detect `*` operator on `!Sized` expression The suggestion is new: ``` error[E0277]: the size for values of type `str` cannot be known at compilation time --> $DIR/unsized-str-in-return-expr-arg-and-local.rs:15:9 | LL | let x = *""; | ^ doesn't have a size known at compile-time | = help: the trait `Sized` is not implemented for `str` = note: all local variables must have a statically known size = help: unsized locals are gated as an unstable feature help: references to `!Sized` types like `&str` are `Sized`; consider not dereferencing the expression | LL - let x = *""; LL + let x = ""; | ``` Fix #128199.
2024-08-24update the doc comment on lintchecker b/c it parses html nowbinarycat-2/+4
2024-08-24Auto merge of #128349 - tgross35:x86-f16, r=Noratriebbors-21/+21
Enable `f16` tests on x86 and x86-64 Since the `compiler_builtins` update [1], ABI bugs on x86 should be resolved. Enable tests for f16 on these platforms now. `f16` math functions (`reliable_f16_math`) are still excluded because there is an LLVM crash for powi [2]. [1]: https://github.com/rust-lang/rust/pull/125016 [2]: https://github.com/llvm/llvm-project/issues/105747 try-job: dist-i586-gnu-i586-i686-musl try-job: x86_64-apple-1
2024-08-24Auto merge of #129303 - nikic:llvm19rc3, r=cuviperbors-0/+0
Update to LLVM 19 rc 3 I don't think that this fixes any specific issues we've encountered.
2024-08-24remove extraneous textTshepang Mbambo-2/+1
2024-08-24make text more easy to readTshepang Mbambo-3/+3
2024-08-23Print the generic parameter along with the variance in dumps.Camille GILLOT-140/+158
2024-08-23Auto merge of #129278 - ↵bors-26/+8
GuillaumeGomez:rm-duplicated-usage-of-unstable-options, r=Kobzol Remove duplicated usage of `-Zunstable-options` in bootstrap Surprisingly, sometimes it is in the same function. r? `@Kobzol`
2024-08-23Change `f16` doctests in core to run on x86-64 linuxTrevor Gross-13/+13
Since `f16` now works on x86 and x86-64, change doctests to use this instead of aarch64. This is to make sure any changes get run in PR CI.
2024-08-23Add myself to the review rotation for libsThom Chiovoloni-0/+1
2024-08-23Update `compiler_builtins` to `0.1.121`Scott McMurray-4/+4
2024-08-23Enable `f16` tests on x86 and x86-64Trevor Gross-8/+8
Since the `compiler_builtins` update [1], ABI bugs on x86 should be resolved. Enable tests for f16 on these platforms now. `f16` math functions (`reliable_f16_math`) are still excluded because there is an LLVM crash for powi [2]. [1]: https://github.com/rust-lang/rust/pull/125016 [2]: https://github.com/llvm/llvm-project/issues/105747
2024-08-23Auto merge of #128507 - Oneirical:testart-from-scratch, r=jieyouxubors-9/+73
Migrate `libtest-thread-limit` `run-make` test to rmake Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). Please try, but **only if normal CI is green**: // try-job: armhf-gnu // <- failed on this try-job: aarch64-gnu
2024-08-23Move into_inner_unchecked back to the bottom of the impl blockNoa-25/+25
2024-08-23Put Pin::as_deref_mut in impl Pin<Ptr>Noa-59/+62
2024-08-23rustdoc: show exact case-sensitive matches firstbinarycat-0/+15
fixes #119480
2024-08-23rewrite libtest-thread-limit to rmakeOneirical-9/+73
2024-08-23Auto merge of #129464 - GuillaumeGomez:rollup-ckfqd7h, r=GuillaumeGomezbors-45/+375
Rollup of 9 pull requests Successful merges: - #128511 (Document WebAssembly target feature expectations) - #129243 (do not build `cargo-miri` by default on stable channel) - #129263 (Add a missing compatibility note in the 1.80.0 release notes) - #129276 (Stabilize feature `char_indices_offset`) - #129350 (adapt integer comparison tests for LLVM 20 IR changes) - #129408 (Fix handling of macro arguments within the `dropping_copy_types` lint) - #129426 (rustdoc-search: use tighter json for names and parents) - #129437 (Fix typo in a help diagnostic) - #129457 (kobzol vacation) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-23Rollup merge of #129457 - Kobzol:kobzol-vacation, r=KobzolGuillaume Gomez-1/+1
kobzol vacation r? ``@ghost``
2024-08-23Rollup merge of #129437 - gurry:fix-diagnostic-typo, r=jieyouxuGuillaume Gomez-2/+2
Fix typo in a help diagnostic Replaced "**the your** dependency graph" with "**in the** dependency graph".
2024-08-23Rollup merge of #129426 - notriddle:smaller-index-2024-08-22, r=GuillaumeGomezGuillaume Gomez-13/+40
rustdoc-search: use tighter json for names and parents File size --------- ```console $ du -hs doc.old/search-index1.82.0.js doc/search-index1.82.0.js 3.2M doc.old/search-index1.82.0.js 2.8M doc/search-index1.82.0.js $ gzip doc/search-index1.82.0.js $ gzip doc.old/search-index1.82.0.js $ du -hs doc.old/search-index1.82.0.js.gz doc/search-index1.82.0.js.gz 464K doc.old/search-index1.82.0.js.gz 456K doc/search-index1.82.0.js.gz $ du -hs compiler-doc.old/search-index.js compiler-doc/search-index.js 8.5M compiler-doc.old/search-index.js 6.5M compiler-doc/search-index.js $ gzip compiler-doc/search-index1.82.0.js $ gzip compiler-doc.old/search-index1.82.0.js $ du -hs compiler-doc.old/search-index.js.gz compiler-doc/search-index.js.gz 1.4M compiler-doc.old/search-index.js.gz 1.4M compiler-doc/search-index.js.gz ``` Performance ----------- Firefox profile: [before](https://profiler.firefox.com/public/jf1741wycma0n38asdf7kdtw8egs0pqakbr03jg/calltree/?globalTrackOrder=0w3&implementation=js&thread=3&v=10), [after](https://profiler.firefox.com/public/p4fptad7vncsfgrgk9a18yx7m6w8kdpgfy15f8r/calltree/?globalTrackOrder=0w3&implementation=js&thread=3&v=10) CLI profiler scripts comparison: https://notriddle.com/rustdoc-html-demo-9/smaller-index-2024-08-22/index.html | Benchmark | Before | After | % Diff | --------- | ----------:| ----------:| ------: | arti | 225692 KiB | 218744 KiB | 3% | cortex-m | 58276 KiB | 57852 KiB | 0% | sqlx | 123132 KiB | 125448 KiB | -2% | stm32f4 | 556828 KiB | 548996 KiB | 1% | ripgrep | 86964 KiB | 86180 KiB | 1%
2024-08-23Rollup merge of #129408 - Urgau:macro-arg-drop_copy, r=compiler-errorsGuillaume Gomez-2/+48
Fix handling of macro arguments within the `dropping_copy_types` lint This PR fixes the handling of spans with different context (aka macro arguments) than the primary expression within the different `{drop,forget}ing_copy_types` and `{drop,forget}ing_references` lints. <details> <summary>Before</summary> ``` warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing --> drop_writeln.rs:5:5 | 5 | drop(writeln!(&mut msg, "test")); | ^^^^^--------------------------^ | | | argument has type `Result<(), std::fmt::Error>` | = note: `#[warn(dropping_copy_types)]` on by default help: use `let _ = ...` to ignore the expression or result --> /home/[..]/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:688:9 | 68| let _ = | ~~~~~~~ ``` </details> <details> <summary>With this PR</summary> ``` warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing --> drop_writeln.rs:5:5 | 5 | drop(writeln!(&mut msg, "test")); | ^^^^^--------------------------^ | | | argument has type `Result<(), std::fmt::Error>` | = note: `#[warn(dropping_copy_types)]` on by default help: use `let _ = ...` to ignore the expression or result | 5 - drop(writeln!(&mut msg, "test")); 5 + let _ = writeln!(&mut msg, "test"); | ``` </details> ``````@rustbot`````` label +L-dropping_copy_types
2024-08-23Rollup merge of #129350 - krasimirgg:llvm20, r=nikicGuillaume Gomez-22/+41
adapt integer comparison tests for LLVM 20 IR changes The LLVM commit https://github.com/llvm/llvm-project/commit/abf69a167bbc99054871e3f9cc8810bbebcb6747 changed the IR in a few comparison tests: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/30500#01917017-26fe-4a4d-956b-725a2903e5a8 Adapted accordingly. ````@rustbot```` label: +llvm-main r? ````@nikic````
2024-08-23Rollup merge of #129276 - eduardosm:stabilize-char_indices_offset, r=AmanieuGuillaume Gomez-3/+13
Stabilize feature `char_indices_offset` Stabilized API: ```rust impl CharIndices<'_> { pub fn offset(&self) -> usize; } ``` Tracking issue: https://github.com/rust-lang/rust/issues/83871 Closes https://github.com/rust-lang/rust/issues/83871 I also attempted to improved the documentation to make it more clear that it returns the offset of the character that will be returned by the next call to `next()`.
2024-08-23Rollup merge of #129263 - apiraino:add-missing-compat-note, r=cuviperGuillaume Gomez-0/+2
Add a missing compatibility note in the 1.80.0 release notes #99969 missed being included in the release notes. As discussed [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/241545-t-release/topic/.2399969.20missed.20the.20release.20notes/near/463002451). (the discussion about the _a posteriori_ breakage the ecosystem is experiencing is another topic) Thanks r? ``````@rust-lang/release``````
2024-08-23Rollup merge of #129243 - onur-ozkan:stuff, r=KobzolGuillaume Gomez-1/+2
do not build `cargo-miri` by default on stable channel Skips `cargo-miri` build on `stable` channel just like `miri`. Closes #129171 cc ``@RalfJung``
2024-08-23Rollup merge of #128511 - alexcrichton:doc-wasm-features, r=jieyouxuGuillaume Gomez-1/+226
Document WebAssembly target feature expectations This commit is a result of the discussion on #128475 and incorporates parts of #109807 as well. This is all done as a new page of documentation for the `wasm32-unknown-unknown` target which previously did not exist. This new page goes into details about the preexisting target and additionally documents the expectations for WebAssembly features and code generation. The tl;dr is that LLVM will enable features over time after most engines have had support for awhile. Compiling without features requires `-Ctarget-cpu=mvp` to rustc plus `-Zbuild-std` to Cargo. Closes #109807 Closes #119811 Closes #128475
2024-08-23Auto merge of #129443 - matthiaskrgr:rollup-tbgdj0p, r=matthiaskrgrbors-225/+406
Rollup of 8 pull requests Successful merges: - #127623 (fix: fs::remove_dir_all: treat internal ENOENT as success) - #128876 (Ship MinGW-w64 runtime DLLs along with `rust-lld.exe` for `-pc-windows-gnu` targets) - #129055 (Migrate `x86_64-fortanix-unknown-sgx-lvi` `run-make` test to rmake) - #129386 (Use a LocalDefId in ResolvedArg.) - #129400 (Update `compiler_builtins` to `0.1.120`) - #129414 (Fix extern crates not being hidden with `doc(hidden)`) - #129417 (Don't trigger refinement lint if predicates reference errors) - #129433 (Fix a missing import in a doc in run-make-support) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-23kobzol vacationJakub Beránek-1/+1
2024-08-23Rollup merge of #129433 - GrigorenkoPV:run-make-support-path-rustdoc, r=jieyouxuMatthias Krüger-0/+1
Fix a missing import in a doc in run-make-support
2024-08-23Rollup merge of #129417 - compiler-errors:refine-err, r=lqdMatthias Krüger-20/+30
Don't trigger refinement lint if predicates reference errors Fixes #129404
2024-08-23Rollup merge of #129414 - GuillaumeGomez:fix-doc-hidden-crates, r=notriddleMatthias Krüger-3/+31
Fix extern crates not being hidden with `doc(hidden)` Fixes #126796. Only the current crate should never be stripped, any other crate should be strippable. r? ``@notriddle``
2024-08-23Rollup merge of #129400 - Amjad50:update-compiler-builtins, r=tgross35Matthias Krüger-4/+4
Update `compiler_builtins` to `0.1.120` Includes https://github.com/rust-lang/compiler-builtins/pull/672 which fixes regression issue with Apple and Windows compilers. try-job: aarch64-apple try-job: x86_64-apple-1 try-job: x86_64-msvc
2024-08-23Rollup merge of #129386 - cjgillot:local-resolved-arg, r=compiler-errorsMatthias Krüger-55/+58
Use a LocalDefId in ResolvedArg.
2024-08-23Rollup merge of #129055 - Oneirical:fortanix-fortification, r=jieyouxuMatthias Krüger-94/+105
Migrate `x86_64-fortanix-unknown-sgx-lvi` `run-make` test to rmake Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). The final Makefile! Every Makefile test is now claimed. This is difficult to test due to the uncommon architecture it is specific to. I don't think it is in the CI (I didn't find it in `jobs.yml`, but if there is a way to test it, please do. Locally, on Linux, it compiles and panics at the `llvm_filecheck` part (if I replace the `x86_64-fortanix-unknown-sgx` with `x86_64-unknown-linux-gnu`, of course), which is expected. For this reason, the Makefile and associated script have been kept, but with a leading underscore.
2024-08-23Rollup merge of #128876 - ColinFinck:rust-lld-with-runtime-dlls, ↵Matthias Krüger-13/+24
r=Kobzol,petrochenkov,jieyouxu Ship MinGW-w64 runtime DLLs along with `rust-lld.exe` for `-pc-windows-gnu` targets `rust-lld.exe` built for `x86_64-pc-windows-gnu` depends on `libgcc_s_seh-1.dll` and `libwinpthread-1.dll` from MinGW-w64. Until now, they were not shipped alongside `rust-lld.exe`, and you could not run `rust-lld.exe` on most systems. This problem didn't surface until now because: * Most targets don't use `rust-lld` by default. * Some people had these DLLs in their `PATH` from some other MinGW binary. * `rustup` used to add `bin` to the `PATH`, which contains these DLLs for `rustc.exe`. But it no longer does that: https://github.com/rust-lang/rustup/commit/ce3c09a0cb126e2c65a3bb2a3bbf3f098b4c23a2 Fixes #125809 try-job: dist-x86_64-mingw
2024-08-23Rollup merge of #127623 - lolbinarycat:fix_remove_dir_all, r=AmanieuMatthias Krüger-36/+153
fix: fs::remove_dir_all: treat internal ENOENT as success fixes #127576 try-job: test-various
2024-08-23Fix typo in help diagnosticGurinder Singh-2/+2
2024-08-23Fix a missing import in a doc in run-make-supportPavel Grigorenko-0/+1
2024-08-22Auto merge of #129413 - jieyouxu:revert-remove-dir-all, r=compiler-errorsbors-17/+103
Revert #129187 and #129302 The two PRs naively switched to `std::fs::remove_dir_all`, but failed to gracefully handle the failure case where the top-level directory entry does not exist, causing https://github.com/rust-lang/rust/pull/129187#issuecomment-2304849757 `./x clean` to fail locally when `tmp` does not exist. I plan to reland the two PRs with fixed top-level dir entry handling and more testing, but let's quickly revert to unblock people. Reverts #129187. Reverts #129302. r? bootstrap