about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-11-19Rollup merge of #133192 - aDotInTheVoid:changelog-cleanup, r=fmeaseLeón Orell Valerian Liehr-7/+0
RELEASES.md: Don't document unstable `--test-build-wrapper` #114651 added this as an unstable flag, so it doesn't make sense to go in the release notes. Discovered while working on #133191.
2024-11-19Rollup merge of #133191 - ↵León Orell Valerian Liehr-29/+33
aDotInTheVoid:whoops-thats-not-stable-and-might-never-be, r=fmease rustdoc book: Move `--test-builder(--wrapper)?` docs to unstable section. Tracking issue: https://github.com/rust-lang/rust/issues/102981 These have always been unstable, but were documented in the stable section in #114651
2024-11-19Rollup merge of #133187 - ehuss:reference-diagnostic, r=jieyouxuLeón Orell Valerian Liehr-147/+170
Add reference annotations for diagnostic attributes This adds reference annotations for `diagnostic::on_unimplmented` and the `diagnostic` namespace in general. There's also a rename for a test that looks like it was put in the wrong location.
2024-11-19Rollup merge of #133186 - uweigand:s390x-maintainer, r=wesleywiserLeón Orell Valerian Liehr-2/+200
Document s390x-unknown-linux targets This adds documentation for the following existing targets: s390x-unknown-linux-gnu (Tier 2 with host tools) s390x-unknown-linux-musl (Tier 3) I volunteer as maintainer for these targets going forward.
2024-11-19Rollup merge of #133185 - notriddle:notriddle/roaringbitmap, r=notriddleLeón Orell Valerian Liehr-10/+55
rustdoc-search: use smart binary search in bitmaps Addresses a comment from [jsha's benchmarking], where the `contains` function showed up in the profiler. This commit pulls it from about 5% of the runtime to about 0.5%. Before: https://share.firefox.dev/3ANVjon After: https://share.firefox.dev/3OeM3gk [jsha's benchmarking]: https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/search.20profiling/near/481868761
2024-11-19Rollup merge of #133182 - RalfJung:const-panic-inline, r=tgross35León Orell Valerian Liehr-1/+1
const_panic: inline in bootstrap builds to avoid f16/f128 crashes This should fix https://github.com/rust-lang/rust/issues/133177. ``@uweigand`` could you test that?
2024-11-19Rollup merge of #133181 - rustbot:docs-update, r=ehussLeón Orell Valerian Liehr-0/+0
Update books ## rust-lang/edition-guide 2 commits in 2d482e203eb6d6e353814cf1415c5f94e590b9e0..915f9b319c2823f310430ecdecd86264a7870d7e 2024-11-06 07:23:07 UTC to 2024-11-05 09:03:41 UTC - 2021: Update for raw lifetimes (rust-lang/edition-guide#330) - CI: Switch to merge queue (rust-lang/edition-guide#333) ## rust-lang/nomicon 1 commits in 456b904f791751892b01282fd2757904993c4c26..eac89a3cbe6c4714e5029ae8b5a1c556fd4e8c42 2024-11-16 14:05:28 UTC to 2024-11-16 14:05:28 UTC - Fix typo in what-unsafe-does (rust-lang/nomicon#469) ## rust-lang/reference 10 commits in da0f6dad767670da0e8cd5af8a7090db3272f626..41ccb0e6478305401dad92e8fd3d04a4304edb4c 2024-11-15 21:45:16 UTC to 2024-11-05 21:46:30 UTC - Add identifiers to attributes.md and its subchapters (rust-lang/reference#1560) - Fix 2 typos (rust-lang/reference#1674) - Add examples to clarify the casting rules (rust-lang/reference#686) - Explaining how to link mixed C/Rust binaries. (rust-lang/reference#838) - Add Arm64EC to inline-assembly documentation (rust-lang/reference#1653) - Add three more WebAssembly features to the list of accepted ones (rust-lang/reference#1638) - Add s390x to inline-assembly documentation (rust-lang/reference#1643) - trait object constraint correction (rust-lang/reference#1670) - Update some "default" representation references (rust-lang/reference#1667) - Update lifetimes for pre-expansion validation (rust-lang/reference#1668) ## rust-lang/rustc-dev-guide 12 commits in 6a5accdaf10255882b1e6c59dfe5f1c79ac95484..b679e71c2d66c6fe13e06b99ac61773b866213f0 2024-11-18 08:18:15 UTC to 2024-11-05 07:22:17 UTC - Mention `RUSTC_BOOTSTRAP` for misc testing (rust-lang/rustc-dev-guide#2136) - Document how to acquire `cdb.exe` (rust-lang/rustc-dev-guide#2137) - Document `max-llvm-major-version` directive (rust-lang/rustc-dev-guide#2129) - Document `exact-llvm-major-version` directive (rust-lang/rustc-dev-guide#2135) - Note Rustfmt for separate rust-analyzer directory (rust-lang/rustc-dev-guide#2134) - still accurate (rust-lang/rustc-dev-guide#2133) - typo (rust-lang/rustc-dev-guide#2132) - add valid date-check marker (rust-lang/rustc-dev-guide#2131) - Update parallel-rustc.md (rust-lang/rustc-dev-guide#1926) - Rename `{ignore,only}-debug` -> `{ignore,needs}-{rustc,std}-debug-assertions` (rust-lang/rustc-dev-guide#2101) - update const stability docs (rust-lang/rustc-dev-guide#2111) - Ask folks to use the Oxford comma in diagnostics (rust-lang/rustc-dev-guide#2093)
2024-11-19Rollup merge of #133180 - GuillaumeGomez:jump-to-def-links-generics, r=notriddleLeón Orell Valerian Liehr-4/+33
[rustdoc] Fix items with generics not having their jump to def link generated Because the span originally included the generics, during the highlighting, it was not retrieved and therefore its jump to def link was not generated. r? ``@notriddle``
2024-11-19Rollup merge of #132758 - nnethercote:improve-get_key_value-docs, r=cuviperLeón Orell Valerian Liehr-8/+78
Improve `{BTreeMap,HashMap}::get_key_value` docs. They are unusual methods. The docs don't really describe the cases when they might be useful (as opposed to just `get`), and the examples don't demonstrate the interesting cases at all. This commit improves the docs and the examples.
2024-11-18RELEASES.md: Don't document unstable `--test-build-wrapper`Alona Enraght-Moony-7/+0
2024-11-18rustdoc book: Move `--test-builder(--wrapper)?` docs to unstable section.Alona Enraght-Moony-29/+33
2024-11-18Auto merge of #132460 - lcnr:questionable-uwu, r=compiler-errorsbors-1341/+1745
Use `TypingMode` throughout the compiler instead of `ParamEnv` Hopefully the biggest single PR as part of https://github.com/rust-lang/types-team/issues/128. ## `infcx.typing_env` while defining opaque types I don't know how'll be able to correctly handle opaque types when using something taking a `TypingEnv` while defining opaque types. To correctly handle the opaques we need to be able to pass in the current `opaque_type_storage` and return constraints, i.e. we need to use a proper canonical query. We should migrate all the queries used during HIR typeck and borrowck where this matters to proper canonical queries. This is ## `layout_of` and `Reveal::All` We convert the `ParamEnv` to `Reveal::All` right at the start of the `layout_of` query, so I've changed callers of `layout_of` to already use a post analysis `TypingEnv` when encountering it. https://github.com/rust-lang/rust/blob/ca87b535a05097df6abbe2a031b057de2cefac5b/compiler/rustc_ty_utils/src/layout.rs#L51 ## `Ty::is_[unpin|sized|whatever]` I haven't migrated `fn is_item_raw` to use `TypingEnv`, will do so in a followup PR, this should significantly reduce the amount of `typing_env.param_env`. At some point there will probably be zero such uses as using the type system while ignoring the `typing_mode` is incorrect. ## `MirPhase` and phase-transitions When inside of a MIR-body, we can mostly use its `MirPhase` to figure out the right `typing_mode`. This does not work during phase transitions, most notably when transitioning from `Analysis` to `Runtime`: https://github.com/rust-lang/rust/blob/dae7ac133b9eda152784c075facb31a6688c92b1/compiler/rustc_mir_transform/src/lib.rs#L606-L625 All these passes still run with `MirPhase::Analysis`, but we should only use `Reveal::All` once we're run the `RevealAll` pass. This required me to manually construct the right `TypingEnv` in all these passes. Given that it feels somewhat easy to accidentally miss this going forward, I would maybe like to change `Body::phase` to an `Option` and replace it at the start of phase transitions. This then makes it clear that the MIR is currently in a weird state. r? `@ghost`
2024-11-18rustdoc-search: add descriptive comments to bitmap classMichael Howell-0/+23
2024-11-18Update src/doc/rustc/src/platform-support/s390x-unknown-linux-gnu.mdUlrich Weigand-0/+1
Co-authored-by: Josh Stone <cuviper@gmail.com>
2024-11-18Update booksrustbot-0/+0
2024-11-18Add reference annotations for diagnostic attributesEric Huss-147/+170
This adds reference annotations for `diagnostic::on_unimplmented` and the `diagnostic` namespace in general.
2024-11-18Document s390x-unknown-linux targetsUlrich Weigand-2/+199
This adds documentation for the following existing targets: s390x-unknown-linux-gnu (Tier 2 with host tools) s390x-unknown-linux-musl (Tier 3) I volunteer as maintainer for these targets going forward. Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
2024-11-18rustdoc-search: use smart binary search in bitmapsMichael Howell-10/+32
Addresses a comment from [jsha's benchmarking], where the `contains` function showed up in the profiler. This commit pulls it from about 5% of the runtime to about 0.5%. [jsha's benchmarking]: https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/search.20profiling/near/481868761
2024-11-18Auto merge of #133179 - GuillaumeGomez:rollup-ro5rtts, r=GuillaumeGomezbors-45/+31
Rollup of 5 pull requests Successful merges: - #133156 (typo in config.example.toml) - #133157 (stability: remove skip_stability_check_due_to_privacy) - #133163 (remove pointless cold_path impl in interpreter) - #133169 (Update autolabels for T-compiler and T-bootstrap) - #133171 (Add the missing quotation mark in comment) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-18const_panic: inline in bootstrap builds to avoid f16/f128 crashesRalf Jung-1/+1
2024-11-18Add regression test for jump to def links on items with genericsGuillaume Gomez-0/+14
2024-11-18Fix items with generics not having their jump to def link generatedGuillaume Gomez-3/+18
2024-11-18Rollup merge of #133171 - binchengqu:master, r=jieyouxuGuillaume Gomez-1/+1
Add the missing quotation mark in comment
2024-11-18Rollup merge of #133169 - jieyouxu:update-triagebot-labels, r=WaffleLapkinGuillaume Gomez-6/+21
Update autolabels for T-compiler and T-bootstrap - Tag more test suite changes with `T-compiler`. - Tag `src/build_helper` with `T-bootstrap`.
2024-11-18Rollup merge of #133163 - RalfJung:cold, r=saethlinGuillaume Gomez-3/+1
remove pointless cold_path impl in interpreter This has a fallback impl so the interpreter impl is not needed. r? ``@saethlin``
2024-11-18Rollup merge of #133157 - RalfJung:skip_stability_check_due_to_privacy, ↵Guillaume Gomez-34/+7
r=compiler-errors stability: remove skip_stability_check_due_to_privacy This was added in https://github.com/rust-lang/rust/pull/38689 to deal with https://github.com/rust-lang/rust/issues/38412. However, even after removing the check, the relevant tests still pass. Let's see if CI finds any other tests that rely on this. If not, it seems like logic elsewhere in the compiler changed so this is not required any more.
2024-11-18Rollup merge of #133156 - tshepang:patch-5, r=jieyouxuGuillaume Gomez-1/+1
typo in config.example.toml
2024-11-18Fix typoGuillaume Gomez-1/+1
2024-11-18Auto merge of #133160 - jhpratt:rollup-wzj9q15, r=jhprattbors-217/+378
Rollup of 4 pull requests Successful merges: - #132934 (Overhaul the `-l` option parser (for linking to native libs)) - #133142 (rename rustc_const_stable_intrinsic -> rustc_intrinsic_const_stable_indirect) - #133145 (Document alternatives to `static mut`) - #133158 (Subtree update of `rust-analyzer`) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-18Add the missing quotation mark in commentbinchengqu-1/+1
Signed-off-by: binchengqu <bincheng@before.tech>
2024-11-18Tag `src/build_helper` with `T-bootstrap`Jieyou Xu-6/+7
2024-11-18Tag more test suite changes with `T-compiler`Jieyou Xu-0/+14
2024-11-18reviewlcnr-6/+11
2024-11-18use `TypingEnv` when no `infcx` is availablelcnr-1340/+1739
the behavior of the type system not only depends on the current assumptions, but also the currentnphase of the compiler. This is mostly necessary as we need to decide whether and how to reveal opaque types. We track this via the `TypingMode`.
2024-11-18remove pointless cold_path impl in interpreterRalf Jung-3/+1
2024-11-18Rollup merge of #133158 - lnicola:sync-from-ra, r=lnicolaJacob Pratt-15/+32
Subtree update of `rust-analyzer` r? `@ghost`
2024-11-18Rollup merge of #133145 - kornelski:static-mutex, r=traviscrossJacob Pratt-0/+6
Document alternatives to `static mut` In #133143 I've noticed alternatives to `static mut` aren't documented anywhere.
2024-11-18Rollup merge of #133142 - RalfJung:naming-is-hard, r=compiler-errorsJacob Pratt-54/+54
rename rustc_const_stable_intrinsic -> rustc_intrinsic_const_stable_indirect In https://github.com/rust-lang/rust/pull/120370 this name caused confusion as the author thought the intrinsic was stable. So let's try a different name... If we can land this before the beta cutoff we can avoid needing `cfg(bootstrap)` for this. ;) Cc `@compiler-errors` `@saethlin`
2024-11-18Rollup merge of #132934 - Zalathar:native-libs, r=jieyouxuJacob Pratt-148/+286
Overhaul the `-l` option parser (for linking to native libs) The current parser for `-l` options has accumulated over time, making it hard to follow. This PR tries to clean it up in several ways. Key changes: - This code now gets its own submodule, to slightly reduce clutter in `rustc_session::config`. - Cleaner division between iterating over multiple `-l` options, and processing each individual one. - Separate “split” step that breaks up the value string into `[KIND[:MODIFIERS]=]NAME[:NEW_NAME]`, but leaves parsing/validating those parts to later steps. - This step also gets its own (disposable) unit test, to make sure it works as expected. - A context struct reduces the burden of parameter passing, and makes it easier to write error messages that adapt to nightly/stable compilers. - Fewer calls to `nightly_options` helper functions, because at this point we can get the same information from `UnstableOptions` and `UnstableFeatures` (which are downstream of earlier calls to those helper functions). There should be no overall change in compiler behaviour.
2024-11-18Auto merge of #128219 - connortsui20:rwlock-downgrade, r=tgross35bors-261/+662
Rwlock downgrade Tracking Issue: #128203 This PR adds a `downgrade` method for `RwLock` / `RwLockWriteGuard` on all currently supported platforms. Outstanding questions: - [x] ~~Does the `futex.rs` change affect performance at all? It doesn't seem like it will but we can't be certain until we bench it...~~ - [x] ~~Should the SOLID platform implementation [be ported over](https://github.com/rust-lang/rust/pull/128219#discussion_r1693470090) to the `queue.rs` implementation to allow it to support downgrades?~~
2024-11-18stability: remove skip_stability_check_due_to_privacyRalf Jung-34/+7
2024-11-18rename rustc_const_stable_intrinsic -> rustc_intrinsic_const_stable_indirectRalf Jung-54/+54
2024-11-18Improve `{BTreeMap,HashMap}::get_key_value` docs.Nicholas Nethercote-8/+78
They are unusual methods. The docs don't really describe the cases when they might be useful (as opposed to just `get`), and the examples don't demonstrate the interesting cases at all. This commit improves the docs and the examples.
2024-11-18typo in config.example.tomlTshepang Mbambo-1/+1
2024-11-18Overhaul the `-l` option parser (for linking to native libs)Zalathar-122/+225
2024-11-18Move `-l` option parsing into its own submoduleZalathar-140/+144
No functional change (yet).
2024-11-18Add some UI tests for `-l` modifier parsingZalathar-0/+19
2024-11-18Auto merge of #133152 - jhpratt:rollup-wkqs5ud, r=jhprattbors-52/+507
Rollup of 7 pull requests Successful merges: - #132795 (Check `use<..>` in RPITIT for refinement) - #132944 (add parentheses when unboxing suggestion needed) - #132993 (Make rustc consider itself a stable compiler when `RUSTC_BOOTSTRAP=-1`) - #133130 (`suggest_borrow_generic_arg`: instantiate clauses properly) - #133133 (rustdoc-search: add standalone trailing `::` test) - #133143 (Diagnostics for let mut in item context) - #133147 (Fixup some test directives) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-17Rollup merge of #133147 - ChrisDenton:fixup, r=compiler-errorsJacob Pratt-4/+4
Fixup some test directives - A random comment had somehow been turned into an `//`@`` directive. - More dubiously I also removed leading spaces from directives in 3 UI tests for consistency. These are the only rustc tests that use that formatting. r? `@jieyouxu`
2024-11-17Rollup merge of #133143 - kornelski:let-mut-global, r=compiler-errorsJacob Pratt-9/+47
Diagnostics for let mut in item context The diagnostics for `let` at the top level did not account for `let mut`, which [made the error unclear](https://users.rust-lang.org/t/create-a-vector-of-constants-outside-main/121251/1). I've made the diagnostic always display a link to valid items. I've added dedicated help for `let mut` case that suggests using a `Mutex` (to steer novice users away from the `static mut` trap). Unfortunately, neither the Rust book, nor libstd docs have dedicated section listing all other types for interior-mutable `static`s.