about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-08-26Rollup merge of #129518 - GrigorenkoPV:gitignore-library-ice, r=tgross35Matthias Krüger-1/+3
gitignore: ignore ICE reports regardless of directory Quite often when working on compiler I end up running into ICEs during the standard library compilation. These ICEs generate reports in `/library/` and not at the root of the repo, so they aren't `gitignore`d. I finally ended up committing one today, by accident: https://github.com/rust-lang/rust/pull/129487#event-14002067843
2024-08-26Rollup merge of #129405 - surechen:fix_span_x, r=cjgillotMatthias Krüger-32/+20
Fixing span manipulation and indentation of the suggestion introduced by #126187 According to comments: https://github.com/rust-lang/rust/pull/128084#issuecomment-2295254576 https://github.com/rust-lang/rust/pull/126187/files#r1634897691
2024-08-26Rollup merge of #129288 - compiler-errors:unsafe-fn-coercion, r=lcnrMatthias Krüger-2/+16
Use subtyping for `UnsafeFnPointer` coercion, too I overlooked this in #129059, which changed MIR typechecking to use subtyping for other fn pointer coercions. Fixes #129285
2024-08-25Auto merge of #129563 - matthiaskrgr:rollup-t6bai2d, r=matthiaskrgrbors-33/+291
Rollup of 7 pull requests Successful merges: - #129091 (add Box::as_ptr and Box::as_mut_ptr methods) - #129134 (bootstrap: improve error recovery flags to curl) - #129416 (library: Move unstable API of new_uninit to new features) - #129459 (handle stage0 `cargo` and `rustc` separately) - #129487 (repr_transparent_external_private_fields: special-case some std types) - #129511 (Update minifier to 0.3.1) - #129523 (Make `rustc_type_ir` build on stable) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-25Rollup merge of #129523 - lqd:stable-type-ir, r=compiler-errorsMatthias Krüger-2/+8
Make `rustc_type_ir` build on stable This PR fixes a handful of issues that appear in `rustc_type_ir` when trying to build the new solver on stable. r? ```@compiler-errors``` ```@bors``` rollup
2024-08-25Rollup merge of #129511 - GuillaumeGomez:update-minifier, r=notriddleMatthias Krüger-3/+6
Update minifier to 0.3.1 It adds support for escaped characters. PR is https://github.com/GuillaumeGomez/minifier-rs/pull/111. r? ````@notriddle````
2024-08-25Rollup merge of #129487 - ↵Matthias Krüger-1/+113
GrigorenkoPV:repr_transparent_external_private_fields, r=compiler-errors repr_transparent_external_private_fields: special-case some std types Fixes #129470 ```@rustbot``` label +A-lint +L-repr_transparent_external_private_fields
2024-08-25Rollup merge of #129459 - onur-ozkan:separate-stage0-bins, r=KobzolMatthias Krüger-9/+17
handle stage0 `cargo` and `rustc` separately This change allows setting either `build.cargo` or `build.rustc` without requiring both to be set simultaneously, which was not possible previously. To try it, set `build.rustc` without setting `build.cargo`, and try to bootstrap on clean build. Blocker for https://github.com/rust-lang/rust/pull/129152
2024-08-25Rollup merge of #129416 - workingjubilee:partial-move-from-stabilization, ↵Matthias Krüger-11/+20
r=dtolnay library: Move unstable API of new_uninit to new features - `new_zeroed` variants move to `new_zeroed_alloc` - the `write` fn moves to `box_uninit_write` The remainder will be stabilized in upcoming patches, as it was decided to only stabilize `uninit*` and `assume_init`.
2024-08-25Rollup merge of #129134 - lolbinarycat:continue-at, r=KobzolMatthias Krüger-1/+34
bootstrap: improve error recovery flags to curl alternative to #128459 fixes #110178 r? ````@Kobzol````
2024-08-25Rollup merge of #129091 - RalfJung:box_as_ptr, r=AmanieuMatthias Krüger-6/+93
add Box::as_ptr and Box::as_mut_ptr methods Unstably implements https://github.com/rust-lang/libs-team/issues/355. Tracking issue: https://github.com/rust-lang/rust/issues/129090. r? libs-api
2024-08-25Auto merge of #129295 - Zalathar:profiler-builtins, r=Kobzolbors-16/+49
Build `library/profiler_builtins` from `ci-llvm` if appropriate Running all of `tests/coverage` requires the LLVM profiler runtime, which requires setting `build.profiler = true`. Historically, doing that has required checking out the entire `src/llvm-project` submodule. For compiler contributors who otherwise don't need that submodule (thanks to `download-ci-vm`), that's quite inconvenient. However, thanks to #129116, the downloaded CI LLVM tarball now contains a copy of LLVM's `compiler-rt` directory, which includes all the files needed to build the profiler runtime. So with a little bit of extra logic in bootstrap, we can have `library/profiler_builtins` look for the `compiler-rt` files in `ci-llvm` instead of the `src/llvm-project` submodule.
2024-08-25Fixing span manipulation and indentation of the suggestion introduced by #126187surechen-32/+20
According to comments: https://github.com/rust-lang/rust/pull/128084#issuecomment-2295254576 https://github.com/rust-lang/rust/pull/126187/files#r1634897691
2024-08-25Auto merge of #129531 - Jarcho:clippyup, r=Manishearthbors-2970/+3046
Clippy subtree update r? `@Manishearth`
2024-08-25gitignore: ignore ICE reports regardless of directoryPavel Grigorenko-1/+3
2024-08-25Auto merge of #129521 - matthiaskrgr:rollup-uigv77m, r=matthiaskrgrbors-630/+651
Rollup of 9 pull requests Successful merges: - #128596 (stabilize const_fn_floating_point_arithmetic) - #129199 (make writes_through_immutable_pointer a hard error) - #129246 (Retroactively feature gate `ConstArgKind::Path`) - #129290 (Pin `cc` to 1.0.105) - #129323 (Implement `ptr::fn_addr_eq`) - #129500 (remove invalid `TyCompat` relation for effects) - #129501 (panicking: improve hint for Miri's RUST_BACKTRACE behavior) - #129505 (interpret: ImmTy: tighten sanity checks in offset logic) - #129510 (Fix `elided_named_lifetimes` in code) r? `@ghost` `@rustbot` modify labels: rollup
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-24Merge commit '0f8eabd6231366bfc1bb1464601297c2d48f8f68' into clippyupJason Newcomb-2970/+3046
2024-08-24rewrite extract_curl_version againbinarycat-14/+11
2024-08-24Auto merge of #13302 - Jarcho:rustup, r=Jarchobors-25/+31
Rustup r? ghost changelog: none
2024-08-24allow cfg(bootstrap) to avoid check-cfg warning on stableRémy Rakic-0/+3
2024-08-24this needs the type for some reasonRémy Rakic-1/+1
2024-08-24add missing associated itemRémy Rakic-0/+3
2024-08-24only use rustc attr on nightlyRémy Rakic-1/+1
2024-08-24Bump nightly version -> 2024-08-23Jason Newcomb-1/+1
2024-08-24Merge branch 'master' into rustupJason Newcomb-2993/+3098
2024-08-24Rollup merge of #129510 - GrigorenkoPV:fix-elided-named-lifetimes, r=cjgillotMatthias Krüger-15/+18
Fix `elided_named_lifetimes` in code https://github.com/rust-lang/rust/pull/129207#issuecomment-2308428671 r? cjgillot
2024-08-24Rollup merge of #129505 - RalfJung:imm-ty-offset, r=davidtwcoMatthias Krüger-6/+15
interpret: ImmTy: tighten sanity checks in offset logic Also make some debug assertions into assertions. (Will need to be perf'd.)
2024-08-24Rollup merge of #129501 - RalfJung:miri-rust-backtrace, r=NoratriebMatthias Krüger-34/+34
panicking: improve hint for Miri's RUST_BACKTRACE behavior Should help with https://github.com/rust-lang/miri/issues/3838
2024-08-24Rollup merge of #129500 - fee1-dead-contrib:fxrel, r=compiler-errorsMatthias Krüger-3/+13
remove invalid `TyCompat` relation for effects if the current impl uses `Maybe` (`impl const`), the parent impl must use `Maybe` (`impl const`) as well. I'd like to rename `TyCompat` to `Sub` which is probably clearer. But it would conflict with my other PR. r? ``@rust-lang/project-const-traits``
2024-08-24Rollup merge of #129323 - Urgau:ptr_fn_addr_eq, r=Mark-SimulacrumMatthias Krüger-0/+27
Implement `ptr::fn_addr_eq` This PR implements https://github.com/rust-lang/libs-team/issues/323: `ptr::fn_addr_eq`. r? libs
2024-08-24Rollup merge of #129290 - tgross35:pin-cc, r=Mark-SimulacrumMatthias Krüger-7/+4
Pin `cc` to 1.0.105 `cc` 1.0.106 removes support for Visual Studio 12. Pin to 1.0.105 so we don't drop support yet. Fixes: https://github.com/rust-lang/rust/pull/128722#issuecomment-2297605573
2024-08-24Rollup merge of #129246 - BoxyUwU:feature_gate_const_arg_path, r=cjgillotMatthias Krüger-206/+425
Retroactively feature gate `ConstArgKind::Path` This puts the lowering introduced by #125915 under a feature gate until we fix the regressions introduced by it. Alternative to whole sale reverting the PR since it didn't seem like a very clean revert and I think this is generally a step in the right direction and don't want to get stuck landing and reverting the PR over and over :) cc #129137 ``@camelid,`` tests taken from there. beta is branching soon so I think it makes sense to not try and rush that fix through since it wont have much time to bake and if it has issues we can't simply revert it on beta. Fixes #128016
2024-08-24Rollup merge of #129199 - RalfJung:writes_through_immutable_pointer, ↵Matthias Krüger-102/+23
r=compiler-errors make writes_through_immutable_pointer a hard error This turns the lint added in https://github.com/rust-lang/rust/pull/118324 into a hard error. This has been reported in cargo's future-compat reports since Rust 1.76 (released in February). Given that const_mut_refs is still unstable, it should be impossible to even hit this error on stable: we did accidentally stabilize some functions that can cause this error, but that got reverted in https://github.com/rust-lang/rust/pull/117905. Still, let's do a crater run just to be sure. Given that this should only affect unstable code, I don't think it needs an FCP, but let's Cc ``@rust-lang/lang`` anyway -- any objection to making this unambiguous UB into a hard error during const-eval? This can be viewed as part of https://github.com/rust-lang/rust/pull/129195 which is already nominated for discussion.
2024-08-24Rollup merge of #128596 - RalfJung:const_fn_floating_point_arithmetic, ↵Matthias Krüger-257/+92
r=nnethercote stabilize const_fn_floating_point_arithmetic Part of https://github.com/rust-lang/rust/issues/128288 Fixes https://github.com/rust-lang/rust/issues/57241 The existing test `tests/ui/consts/const_let_eq_float.rs` ([link](https://github.com/RalfJung/rust/blob/const_fn_floating_point_arithmetic/tests/ui/consts/const_let_eq_float.rs)) covers the basics, and also Miri has extensive tests covering the interpreter's float machinery. Also, that machinery can already be used on stable inside `const`/`static` initializers, just not inside `const fn`. This was explicitly called out in https://github.com/rust-lang/rfcs/pull/3514 so in a sense t-lang just recently already FCP'd this, but let's hear from them whether they want another FCP for the stabilization here or whether that was covered by the FCP for the RFC. Cc ``@rust-lang/lang`` ### Open items - [x] Update the Reference: https://github.com/rust-lang/reference/pull/1566
2024-08-24repr_transparent_external_private_fields: treat `rustc_pub_transparent` ↵Pavel Grigorenko-1/+27
types as local
2024-08-24New `#[rustc_pub_transparent]` attributePavel Grigorenko-0/+86
2024-08-24update the doc comment on lintchecker b/c it parses html nowbinarycat-2/+4
2024-08-24Update minifier to 0.3.1Guillaume Gomez-3/+6
2024-08-24Fix `elided_named_lifetimes` in codePavel Grigorenko-15/+18