about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2025-05-10is a questionTshepang Mbambo-1/+1
2025-05-10sembrTshepang Mbambo-3/+5
2025-05-10make more readableTshepang Mbambo-1/+1
2025-05-10make more clear what is meantTshepang Mbambo-1/+1
2025-05-10use the right caseTshepang Mbambo-3/+3
2025-05-10link to chapter referred toTshepang Mbambo-1/+2
This made it look the the topic was covered in the chapter just before the current one.
2025-05-10Merge pull request #2369 from rust-lang/tshepang-patch-1Tshepang Mbambo-0/+10
add rdg push git config entry for git protocol pushers
2025-05-09Split duration_constructors to get non-controversial bits out faster.Dietrich Daroch-1/+13
2025-05-09Rollup merge of #140852 - est31:edition_guide_let_chains, r=ehussMatthias Krüger-0/+0
Update the edition guide for let chains Pull https://github.com/rust-lang/edition-guide/pull/337 into the rustc tree.
2025-05-09Update the edition guide for let chainsest31-0/+0
2025-05-09Merge pull request #2376 from smanilov/patch-5Tshepang Mbambo-2/+2
Fix minor typo in rustdoc-internals.md
2025-05-09Fix minor typo in rustdoc-internals.mdStan Manilov-2/+2
2025-05-09Remove mono item collection strategy override from -Zprint-mono-itemsTomasz Miąsko-6/+2
Previously `-Zprint-mono-items` would override the mono item collection strategy. When debugging one doesn't want to change the behaviour, so this was counter productive. Additionally, the produced behaviour was artificial and might never arise without using the option in the first place (`-Zprint-mono-items=eager` without `-Clink-dead-code`). Finally, the option was incorrectly marked as `UNTRACKED`. Resolve those issues, by turning `-Zprint-mono-items` into a boolean flag that prints results of mono item collection without changing the behaviour of mono item collection. For codegen-units test incorporate `-Zprint-mono-items` flag directly into compiletest tool. Test changes are mechanical. `-Zprint-mono-items=lazy` was removed without additional changes, and `-Zprint-mono-items=eager` was turned into `-Clink-dead-code`. Linking dead code disables internalization, so tests have been updated accordingly.
2025-05-08Auto merge of #140786 - Kobzol:try-builds-no-deny-warnings, r=jieyouxubors-6/+10
Do not deny warnings in "fast" try builds When we do the classic ``@bors` try` build without specifying `try-job` in the PR description, we want to get a compiler toolchain for perf./crater/local experimentation as fast as possible. We don't run any tests in that case, so it seems reasonable to also ignore warnings. Fixes: https://github.com/rust-lang/rust/issues/140753 r? `@jieyouxu` try-job: dist-x86_64-linux
2025-05-08Mention fast try builds in the rustc-dev-guideJakub Beránek-6/+10
2025-05-08Fix minor typo in installation.mdStan Manilov-1/+1
2025-05-08Remark test naming exceptionStan Manilov-0/+6
2025-05-08Fix minor typo in serialization.mdStan Manilov-1/+1
2025-05-08Merge from rustcThe rustc-dev-guide Cronjob Bot-30/+101
2025-05-08Preparing for merge from rustcThe rustc-dev-guide Cronjob Bot-1/+1
2025-05-08Rollup merge of #140764 - joshtriplett:style-nullary-functions, r=traviscrossMatthias Krüger-0/+13
style: Never break within a nullary function call `func()` or a unit literal `()` Implements https://github.com/rust-lang/style-team/issues/210
2025-05-08Auto merge of #140106 - dianne:deref-pat-usefulness, r=Nadrierilbors-2/+1
allow deref patterns to participate in exhaustiveness analysis Per [this proposal](https://hackmd.io/4qDDMcvyQ-GDB089IPcHGg#Exhaustiveness), this PR allows deref patterns to participate in exhaustiveness analysis. Currently all deref patterns enforce `DerefPure` bounds on their scrutinees, so this assumes all patterns it's analyzing are well-behaved. This also doesn't support [mixed exhaustiveness](https://hackmd.io/4qDDMcvyQ-GDB089IPcHGg#Mixed-exhaustiveness), and instead emits an error if deref patterns are used together with normal constructors. I think mixed exhaustiveness would be nice to have (especially if we eventually want to support arbitrary `Deref` impls[^1]), but it'd require more work to get reasonable diagnostics[^2]. Tracking issue for deref patterns: #87121 r? `@Nadrieril` [^1]: Regardless of whether we support limited exhaustiveness checking for untrusted `Deref` or always require other arms to be exhaustive, I think it'd be useful to allow mixed matching for user-defined smart pointers. And it'd be strange if it worked there but not for `Cow`. [^2]: I think listing out witnesses of non-exhaustiveness can be confusing when they're not necessarily disjoint, and when you only need to cover some of them, so we'd probably want special formatting and/or explanatory subdiagnostics. And if it's implemented similarly to unions, we'd probably also want some way of merging witnesses; the way witnesses for unions can appear duplicated is pretty unfortunate. I'm not sure yet how the diagnostics should look, especially for deeply nested patterns.
2025-05-07style: Never break within a nullary function call `func()` or a unit literal ↵Josh Triplett-0/+13
`()`
2025-05-07Rollup merge of #140741 - husqvarnagroup:af/armv5te-target-maintainer, ↵Guillaume Gomez-1/+31
r=jieyouxu add armv5te-unknown-linux-gnueabi target maintainer My employer is interested in having this target maintained and we already have some tests in our CI running for it. armv5te-unknown-linux-gnueabi can be ticket off in #113739.
2025-05-07Rollup merge of #140234 - nnethercote:separate-Analysis-and-Results, r=davidtwcoGuillaume Gomez-2/+1
Separate dataflow analysis and results `Analysis` gets put into `Results` with `EntryStates`, by `iterate_to_fixpoint`. This has two problems: - `Results` is passed various places where only `Analysis` is needed. - `EntryStates` is passed around mutably everywhere even though it is immutable. This commit mostly separates `Analysis` from `Results` and fixes these two problems. r? `@davidtwco`
2025-05-07add armv5te-unknown-linux-gnueabi target maintainerAdrian Friedli-1/+31
2025-05-07Rollup merge of #139518 - xizheyin:issue-138527, r=traviscrossGuillaume Gomez-12/+12
Stabilize precise capture syntax in style guide Closes #138527 r? `@jieyouxu`
2025-05-06let deref patterns participate in usefulness/exhaustivenessdianne-2/+1
This does not yet handle the case of mixed deref patterns with normal constructors; it'll ICE in `Constructor::is_covered_by`. That'll be fixed in a later commit.
2025-05-06avoid duplicating commandsTshepang Mbambo-4/+5
The 2 commands do the same thing. Also, follow style used elsewhere in the guide.
2025-05-06Rollup merge of #140658 - dianne:lit-deref-pats-p2, r=oli-obkGuillaume Gomez-7/+24
`deref_patterns`: let string and byte string literal patterns peel references and smart pointers before matching This follows up on #140028. Together, they allow using string and byte string literal patterns to match on smart pointers when `deref_patterns` is enabled. In particular, string literals can now match on `String`, subsuming the functionality of the `string_deref_patterns` feature. More generally, this works by letting literals peel references (and smart pointers) before matching, similar to most other patterns, providing an answer to #44849. Though it's only partially implemented at this point: this doesn't yet let named const patterns peel before matching. The peeling logic is general enough to support named consts, but the typing rules for named const patterns would need adjustments to feel consistent (e.g. arrays would need rules to be usable as slices, and `const STR: &'static str` wouldn't be able to match on a `String` unless a rule was added to let it be used where a `str` is expected, similar to what #140028 did for literals). This also allows string and byte string patterns to match on mutable references, following up on https://github.com/rust-lang/rust/pull/140028#discussion_r2053927512. Rather than forward the mutability of the scrutinee to literal patterns, I've opted to peel `&mut`s from the scrutinee. From a design point of view, this makes the behavior consistent with what would be expected from deref coercions using the methodology in the next paragraph. From a diagnostics point of view, this avoids labeling string and byte string patterns as "mutable references", which I think could be confusing. See [`byte-string-type-errors.rs`](https://github.com/rust-lang/rust/compare/master...dianne:rust:lit-deref-pats-p2?expand=1#diff-4a0dd9b164b67c706751f3c0b5762ddab08bcef05a91972beb0190c6c1cd3706) for how the diagnostics look. At a high level, the peeling logic implemented here tries to mimic how deref coercions work for expressions: we peel references (and smart pointers) from the scrutinee until the pattern can match against it, and no more. This is primarily tested by [`const-pats-do-not-mislead-inference.rs`](https://github.com/rust-lang/rust/compare/master...dianne:rust:lit-deref-pats-p2?expand=1#diff-19afc05b8aae9a30fe4a3a8c0bc2ab2c56b58755a45cdf5c12be0d5e83c4739d). To illustrate the connection, I wasn't sure if this made sense to include in the test file, but I've translated those tests to make sure they give the same inference results as deref coercions: [(playground)](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=1869744cb9cdfed71a686990aadf9fe1). In each case, a reference to the scrutinee is coerced to have the type of the pattern (under a reference). Tracking issue for deref patterns: #87121 r? `@oli-obk` cc `@Nadrieril`
2025-05-06Rollup merge of #140035 - fee1-dead-contrib:push-oszwkkvmpkks, ↵Stuart Cook-3/+28
r=jieyouxu,wesleywiser Implement RFC 3503: frontmatters Tracking issue: #136889 Supercedes #137193. This implements [RFC 3503](https://github.com/rust-lang/rfcs/blob/master/text/3503-frontmatter.md). This might break rust-analyzer. Will look into how to fix that. Suggestions welcome for how to improve diagnostics.
2025-05-05Update booksrustbot-0/+0
2025-05-05Implement RFC 3503: frontmattersDeadbeef-3/+28
Supercedes #137193
2025-05-05update unstable bookdianne-7/+24
2025-05-04compiletest: Support matching on non-json lines in compiler outputVadim Petrochenkov-2/+4
and migrate most of remaining `error-pattern`s to it.
2025-05-02zkvm: remove schmerik from maintainers listErik Kaneda-1/+0
2025-05-01add rdg push git config entry for git protocol pushersTshepang Mbambo-0/+10
2025-05-01Merge pull request #2367 from rust-lang/rustc-pullTshepang Mbambo-10/+25
Rustc pull update
2025-05-01adds commasMartin Ombura Jr.-2/+2
2025-05-01Merge from rustcThe rustc-dev-guide Cronjob Bot-9/+24
2025-05-01Preparing for merge from rustcThe rustc-dev-guide Cronjob Bot-1/+1
2025-05-01adds 'with' to help clarify how to build a new compilerMartin Ombura Jr.-2/+2
2025-04-30Rollup merge of #140506 - tshepang:patch-1, r=jieyouxuMatthias Krüger-1/+1
unstable-book: fix capitalization
2025-04-30Merge pull request #2352 from xizheyin/enable-behind-upstream许杰友 Jieyou Xu (Joe)-0/+3
2025-04-30Merge pull request #2359 from rust-lang/tshepang-repo-name许杰友 Jieyou Xu (Joe)-1/+1
2025-04-30unstable-book: fix capitalizationTshepang Mbambo-1/+1
2025-04-30compiletest: Make diagnostic kind mandatory on line annotationsVadim Petrochenkov-3/+3
2025-04-29for a more friendly outputTshepang Mbambo-2/+6
Also, these are normal Rust things (crates/packages), so remove the word *normal*.
2025-04-29Merge pull request #2363 from smanilov/patch-1Tshepang Mbambo-13/+12
Update compiler-src.md
2025-04-29Merge PR #2360: Add docs about stabilizing an editionTravis Cross-0/+54