about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-05-26data_race: vector indices can be reused immediately when the thread is goneRalf Jung-82/+37
2024-05-26completely refactor how we manage blocking and unblocking threadsRalf Jung-895/+832
2024-05-26make release_clock always work on the current threadRalf Jung-106/+115
2024-05-25Auto merge of #3630 - rust-lang:rustup-2024-05-25, r=saethlinbors-585/+810
Automatic Rustup
2024-05-25Merge from rustcThe Miri Cronjob Bot-584/+809
2024-05-25Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-05-25Auto merge of #124187 - compiler-errors:self-ctor, r=petrochenkovbors-176/+244
Warn (or error) when `Self` ctor from outer item is referenced in inner nested item This implements a warning `SELF_CONSTRUCTOR_FROM_OUTER_ITEM` when a self constructor from an outer impl is referenced in an inner nested item. This is a proper fix mentioned https://github.com/rust-lang/rust/pull/117246#discussion_r1374648388. This warning is additionally bumped to a hard error when the self type references generic parameters, since it's almost always going to ICE, and is basically *never* correct to do. This also reverts part of https://github.com/rust-lang/rust/pull/117246, since I believe this is the proper fix and we shouldn't need the helper functions (`opt_param_at`/`opt_type_param`) any longer, since they shouldn't really ever be used in cases where we don't have this problem.
2024-05-24Auto merge of #125521 - matthiaskrgr:rollup-ph2bz3h, r=matthiaskrgrbors-121/+171
Rollup of 7 pull requests Successful merges: - #125467 (Only suppress binop error in favor of semicolon suggestion if we're in an assignment statement) - #125483 (compiler: validate.rs belongs next to what it validates) - #125485 (Migrate `run-make/rustdoc-with-output-dir-option` to `rmake.rs`) - #125497 (Fix some SIMD intrinsics documentation) - #125501 (Resolve anon const's parent predicates to direct parent instead of opaque's parent) - #125503 (rustdoc-json: Add test for keywords with `--document-private-items`) - #125519 (tag more stuff with `WG-trait-system-refactor`) r? `@ghost` `@rustbot` modify labels: rollup
2024-05-24Rollup merge of #125519 - lcnr:tag-next-solver, r=compiler-errorsMatthias Krüger-1/+4
tag more stuff with `WG-trait-system-refactor` r? `@compiler-errors`
2024-05-24Rollup merge of #125503 - aDotInTheVoid:rdj-keyword-attr, r=GuillaumeGomezMatthias Krüger-0/+20
rustdoc-json: Add test for keywords with `--document-private-items` Turns out this does work as-expected. I was worried that the rustdoc's clean would produce a `ItemKind::KeywordItem` for the module, and loose the module itself. But turns out we get this right. Prompted by [this discussion on zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Where.20to.20find.20keyword.20entries.20in.20JSON.20rustdoc) r? `@GuillaumeGomez`
2024-05-24Rollup merge of #125501 - compiler-errors:opaque-opaque-anon-ct, r=BoxyUwUMatthias Krüger-97/+71
Resolve anon const's parent predicates to direct parent instead of opaque's parent When an anon const is inside of an opaque, #99801 added a hack to resolve the anon const's parent predicates *not* to the opaque's predicates, but to the opaque's *parent's* predicates. This is insufficient when considering nested opaques. This means that the `predicates_of` an anon const might reference duplicated lifetimes (installed by `compute_bidirectional_outlives_predicates`) when computing known outlives in MIR borrowck, leading to these ICEs: Fixes #121574 Fixes #118403 ~~Instead, we should be using the `OpaqueTypeOrigin` to acquire the owner item (fn/type alias/etc) of the opaque, whose predicates we're fine to mention.~~ ~~I think it's a bit sketchy that we're doing this at all, tbh; I think it *should* be fine for the anon const to inherit the predicates of the opaque it's located inside. However, that would also mean that we need to make sure the `generics_of` that anon const line up in the same way.~~ ~~None of this is important to solve right now; I just want to fix these ICEs so we can land #125468, which accidentally fixes these issues in a different and unrelated way.~~ edit: We don't need this special case anyways because we install the right parent item in `generics_of` anyways: https://github.com/rust-lang/rust/blob/213ad10c8f0fc275648552366275dc4e07f97462/compiler/rustc_hir_analysis/src/collect/generics_of.rs#L150 r? `@BoxyUwU`
2024-05-24Rollup merge of #125497 - meesfrensel:patch-1, r=calebzulawskiMatthias Krüger-4/+4
Fix some SIMD intrinsics documentation Spotted some mistakes in the docs of some SIMD intrinsics.
2024-05-24Rollup merge of #125485 - GuillaumeGomez:migrate-rmake-rustdoc, r=jieyouxuMatthias Krüger-9/+16
Migrate `run-make/rustdoc-with-output-dir-option` to `rmake.rs` Part of https://github.com/rust-lang/rust/issues/121876. r? `@jieyouxu`
2024-05-24Rollup merge of #125483 - ↵Matthias Krüger-9/+9
workingjubilee:move-transform-validate-to-mir-transform, r=oli-obk compiler: validate.rs belongs next to what it validates It's hard to find code that is deeply nested and far away from its callsites, so let's move `rustc_const_eval::transform::validate` into `rustc_mir_transform`, where all of its callers are. As `rustc_mir_transform` already depends on `rustc_const_eval`, the added visible dependency edge doesn't mean the dependency tree got any worse. This also lets us unnest the `check_consts` module. I did look into moving everything inside `rustc_const_eval::transform` into `rustc_mir_transform`. It turned out to be a much more complex operation, with more concerns and real edges into the `const_eval` crate, whereas this was both faster and more obvious.
2024-05-24Rollup merge of #125467 - compiler-errors:binop-in-bool-expectation, r=estebankMatthias Krüger-1/+47
Only suppress binop error in favor of semicolon suggestion if we're in an assignment statement Similar to #123722, we are currently too aggressive when delaying a binop error with the expectation that we'll emit another error elsewhere. This adjusts that heuristic to be more accurate, at the cost of some possibly poorer suggestions. Fixes #125458
2024-05-24tag more stuff with `WG-trait-system-refactor`lcnr-1/+4
2024-05-24Auto merge of #125499 - matthiaskrgr:rollup-84i5z5w, r=matthiaskrgrbors-56/+185
Rollup of 5 pull requests Successful merges: - #125455 (Make `clamp` inline) - #125477 (Run rustfmt on files that need it.) - #125481 (Fix the dead link in the bootstrap README) - #125482 (Notify kobzol after changes to `opt-dist`) - #125489 (Revert problematic opaque type change) r? `@ghost` `@rustbot` modify labels: rollup
2024-05-24Actually just remove the special case altogetherMichael Goulet-97/+71
2024-05-24miri: receive the blessings of validate.rsJubilee Young-1/+1
2024-05-24clippy: unnest check_constsJubilee Young-1/+1
2024-05-24compiler: unnest rustc_const_eval::check_constsJubilee Young-4/+3
2024-05-24compiler: const_eval/transform/validate.rs -> mir_transform/validate.rsJubilee Young-3/+4
2024-05-24rustdoc-json: Add test for keywords with `--document-private-items`Alona Enraght-Moony-0/+20
2024-05-24Rollup merge of #125489 - oli-obk:revert_stuff_2, r=compiler-errorsMatthias Krüger-37/+138
Revert problematic opaque type change fixes https://github.com/rust-lang/rust/issues/124891 fixes https://github.com/rust-lang/rust/issues/125192 reverts https://github.com/rust-lang/rust/pull/123979
2024-05-24Rollup merge of #125482 - Kobzol:triagebot-opt-dist, r=lqdMatthias Krüger-0/+4
Notify kobzol after changes to `opt-dist` r? ``@Mark-Simulacrum``
2024-05-24Rollup merge of #125481 - iawia002:fix-dead-link, r=lqdMatthias Krüger-1/+1
Fix the dead link in the bootstrap README This link has been changed since https://github.com/rust-lang/rustc-dev-guide/pull/1939
2024-05-24Rollup merge of #125477 - nnethercote:missed-rustfmt, r=compiler-errorsMatthias Krüger-18/+41
Run rustfmt on files that need it. Somehow these files aren't properly formatted. By default `x fmt` and `x tidy` only check files that have changed against master, so if an ill-formatted file somehow slips in it can stay that way as long as it doesn't get modified(?) I found these when I ran `x fmt` explicitly on every `.rs` file in the repo, while working on https://github.com/rust-lang/compiler-team/issues/750.
2024-05-24Rollup merge of #125455 - blyxyas:opt-clamp, r=joboetMatthias Krüger-0/+1
Make `clamp` inline Context: rust-lang/rust-clippy#12826 This results in slightly more optimized assembly. (And most important, it's now less than lines than just manually clamping a value)
2024-05-24Fix some SIMD intrinsics documentationMees Frensel-4/+4
2024-05-24Auto merge of #122494 - joboet:simplify_key_tls, r=m-ou-sebors-189/+63
Simplify key-based thread locals This PR simplifies key-based thread-locals by: * unifying the macro expansion of `const` and non-`const` initializers * reducing the amount of code in the expansion * simply reallocating on recursive initialization instead of going through `LazyKeyInner` * replacing `catch_unwind` with the shared `abort_on_dtor_unwind` It does not change the initialization behaviour described in #110897.
2024-05-24Add regression testsOli Scherer-22/+136
2024-05-24Revert "Rollup merge of #123979 - oli-obk:define_opaque_types7, ↵Oli Scherer-15/+2
r=compiler-errors" This reverts commit f939d1ff4820844595d0f50f94038869f1445d08, reversing changes made to 183c706305d8c4e0ccb0967932381baf7e0c3611.
2024-05-24Auto merge of #121150 - Swatinem:debug-ascii-str, r=joboetbors-20/+43
Add a fast-path to `Debug` ASCII `&str` Instead of going through the `EscapeDebug` machinery, we can just skip over ASCII chars that don’t need any escaping. --- This is an alternative / a companion to https://github.com/rust-lang/rust/pull/121138. The other PR is adding the fast path deep within `EscapeDebug`, whereas this skips as early as possible.
2024-05-24std: clean up the TLS implementationjoboet-5/+4
2024-05-24std: simplify key-based thread localsjoboet-185/+60
2024-05-24Migrate `run-make/rustdoc-with-output-dir-option` to `rmake.rs`Guillaume Gomez-9/+16
2024-05-24Auto merge of #3626 - devnexen:pthread_name_illumos, r=oli-obkbors-5/+34
solaris add support for threadname. from std::unix::thread::set_name, pthread_setname_np is a weak symbol (not always had been available). Other than that, similar to linux only having twice of its buffer limit.
2024-05-24Auto merge of #125479 - scottmcm:validate-vtable-projections, r=Nilstriebbors-8/+28
Validate the special layout restriction on `DynMetadata` If you look at <https://stdrs.dev/nightly/x86_64-unknown-linux-gnu/std/ptr/struct.DynMetadata.html>, you'd think that `DynMetadata` is a struct with fields. But it's actually not, because the lang item is special-cased in rustc_middle layout: https://github.com/rust-lang/rust/blob/7601adcc764d42c9f2984082b49948af652df986/compiler/rustc_middle/src/ty/layout.rs#L861-L864 That explains the very confusing codegen ICEs I was getting in https://github.com/rust-lang/rust/pull/124251#issuecomment-2128543265 > Tried to extract_field 0 from primitive OperandRef(Immediate((ptr: %5 = load ptr, ptr %4, align 8, !nonnull !3, !align !5, !noundef !3)) @ TyAndLayout { ty: DynMetadata<dyn Callsite>, layout: Layout { size: Size(8 bytes), align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, abi: Scalar(Initialized { value: Pointer(AddressSpace(0)), valid_range: 1..=18446744073709551615 }), fields: Primitive, largest_niche: Some(Niche { offset: Size(0 bytes), value: Pointer(AddressSpace(0)), valid_range: 1..=18446744073709551615 }), variants: Single { index: 0 }, max_repr_align: None, unadjusted_abi_align: Align(8 bytes) } }) because there was a `Field` projection despite the layout clearly saying it's [`Primitive`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_target/abi/enum.FieldsShape.html#variant.Primitive). Thus this PR updates the MIR validator to check for such a projection, and changes `libcore` to not ever emit any projections into `DynMetadata`, just to transmute the whole thing when it wants a pointer.
2024-05-24Notify kobzol after changes to `opt-dist`Jakub Beránek-0/+4
2024-05-24Auto merge of #3625 - Strophox:miri-allocation-fix, r=RalfJungbors-23/+24
Bugfix `MiriAllocBytes` to guarantee different addresses Fix in `alloc_bytes.rs` following https://github.com/rust-lang/miri/pull/3526 Currently when an allocation of `size == 0` is requested we return a `std::ptr::without_provenance_mut(align)`, but this means returned `ptr`s may overlap, which breaks things.
2024-05-24extend commentsRalf Jung-2/+3
2024-05-24Fix the dead link in the bootstrap READMEXinzhao Xu-1/+1
2024-05-24Auto merge of #125457 - fmease:gacs-diag-infer-plac-missing-ty, ↵bors-14/+79
r=compiler-errors Properly deal with missing/placeholder types inside GACs Fixes #124833. r? oli-obk (#123130)
2024-05-23Validate the special layout restriction on DynMetadataScott McMurray-8/+28
2024-05-24Auto merge of #3628 - RalfJung:tokio, r=RalfJungbors-1/+13
add back some tokio features Turns out I went a bit too fer when I removed features, so `socketpair` was no longer used.
2024-05-24add back some tokio featuresRalf Jung-1/+13
2024-05-24Auto merge of #3627 - rust-lang:rustup-2024-05-24, r=RalfJungbors-1408/+2836
Automatic Rustup
2024-05-24Run rustfmt on files that need it.Nicholas Nethercote-18/+41
Somehow these files aren't properly formatted. By default `x fmt` and `x tidy` only check files that have changed against master, so if an ill-formatted file somehow slips in it can stay that way as long as it doesn't get modified(?) I found these when I ran `x fmt` explicitly on every `.rs` file in the repo, while working on https://github.com/rust-lang/compiler-team/issues/750.
2024-05-24fmtThe Miri Cronjob Bot-2/+7
2024-05-24Merge from rustcThe Miri Cronjob Bot-1407/+2830