From 9781411ff8805888f1dff61b611ec015ac0fb9f4 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Mon, 10 Nov 2025 23:06:50 +0200 Subject: [PATCH 1/4] sembr src/getting-started.md --- src/getting-started.md | 85 ++++++++++++++++++++++++------------------ 1 file changed, 49 insertions(+), 36 deletions(-) diff --git a/src/getting-started.md b/src/getting-started.md index 857e8ff51..e270f5c75 100644 --- a/src/getting-started.md +++ b/src/getting-started.md @@ -1,13 +1,14 @@ # Getting Started -Thank you for your interest in contributing to Rust! There are many ways to -contribute, and we appreciate all of them. +Thank you for your interest in contributing to Rust! +There are many ways to contribute, and we appreciate all of them. If this is your first time contributing, the [walkthrough] chapter can give you a good example of how a typical contribution would go. -This documentation is _not_ intended to be comprehensive; it is meant to be a -quick guide for the most useful things. For more information, [see this +This documentation is _not_ intended to be comprehensive; +it is meant to be a quick guide for the most useful things. +For more information, [see this chapter on how to build and run the compiler](./building/how-to-build-and-run.md). [internals]: https://internals.rust-lang.org @@ -36,26 +37,31 @@ questions about how the compiler works can go in [#t-compiler/help][z-help]. [z-help]: https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp **Please ask questions!** A lot of people report feeling that they are "wasting -expert's time", but nobody on `t-compiler` feels this way. Contributors are -important to us. +expert's time", but nobody on `t-compiler` feels this way. +Contributors are important to us. Also, if you feel comfortable, prefer public topics, as this means others can -see the questions and answers, and perhaps even integrate them back into this -guide :) +see the questions and answers, and perhaps even integrate them back into this guide :) -**Tip**: If you're not a native English speaker and feel unsure about writing, try using a translator to help. But avoid using LLM tools that generate long, complex words. In daily teamwork, **simple and clear words** are best for easy understanding. Even small typos or grammar mistakes can make you seem more human, and people connect better with humans. +**Tip**: If you're not a native English speaker and feel unsure about writing, try using a translator to help. +But avoid using LLM tools that generate long, complex words. +In daily teamwork, **simple and clear words** are best for easy understanding. +Even small typos or grammar mistakes can make you seem more human, and people connect better with humans. ### Experts -Not all `t-compiler` members are experts on all parts of `rustc`; it's a -pretty large project. To find out who could have some expertise on +Not all `t-compiler` members are experts on all parts of `rustc`; +it's a pretty large project. +To find out who could have some expertise on different parts of the compiler, [consult triagebot assign groups][map]. -The sections that start with `[assign*` in `triagebot.toml` file. +The sections that start with `[assign*` in `triagebot.toml` file. But also, feel free to ask questions even if you can't figure out who to ping. Another way to find experts for a given part of the compiler is to see who has made recent commits. For example, to find people who have recently worked on name resolution since the 1.68.2 release, -you could run `git shortlog -n 1.68.2.. compiler/rustc_resolve/`. Ignore any commits starting with +you could run `git shortlog -n 1.68.2.. +compiler/rustc_resolve/`. +Ignore any commits starting with "Rollup merge" or commits by `@bors` (see [CI contribution procedures](./contributing.md#ci) for more information about these commits). @@ -64,8 +70,7 @@ more information about these commits). ### Etiquette We do ask that you be mindful to include as much useful information as you can -in your question, but we recognize this can be hard if you are unfamiliar with -contributing to Rust. +in your question, but we recognize this can be hard if you are unfamiliar with contributing to Rust. Just pinging someone without providing any context can be a bit annoying and just create noise, so we ask that you be mindful of the fact that the @@ -74,13 +79,16 @@ just create noise, so we ask that you be mindful of the fact that the ## What should I work on? The Rust project is quite large and it can be difficult to know which parts of the project need -help, or are a good starting place for beginners. Here are some suggested starting places. +help, or are a good starting place for beginners. +Here are some suggested starting places. ### Easy or mentored issues If you're looking for somewhere to start, check out the following [issue -search][help-wanted-search]. See the [Triage] for an explanation of these labels. You can also try -filtering the search to areas you're interested in. For example: +search][help-wanted-search]. +See the [Triage] for an explanation of these labels. +You can also try filtering the search to areas you're interested in. +For example: - `repo:rust-lang/rust-clippy` will only show clippy issues - `label:T-compiler` will only show issues related to the compiler @@ -94,8 +102,9 @@ See below for how to find work that isn't labelled. ### Recurring work -Some work is too large to be done by a single person. In this case, it's common to have "Tracking -issues" to co-ordinate the work between contributors. Here are some example tracking issues where +Some work is too large to be done by a single person. +In this case, it's common to have "Tracking issues" to co-ordinate the work between contributors. +Here are some example tracking issues where it's easy to pick up work without a large time commitment: - *Add recurring work items here.* @@ -105,8 +114,8 @@ If you find more recurring work, please feel free to add it here! ### Clippy issues The [Clippy] project has spent a long time making its contribution process as friendly to newcomers -as possible. Consider working on it first to get familiar with the process and the compiler -internals. +as possible. +Consider working on it first to get familiar with the process and the compiler internals. See [the Clippy contribution guide][clippy-contributing] for instructions on getting started. @@ -116,19 +125,22 @@ See [the Clippy contribution guide][clippy-contributing] for instructions on get ### Diagnostic issues Many diagnostic issues are self-contained and don't need detailed background knowledge of the -compiler. You can see a list of diagnostic issues [here][diagnostic-issues]. +compiler. +You can see a list of diagnostic issues [here][diagnostic-issues]. [diagnostic-issues]: https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Aopen+label%3AA-diagnostics+no%3Aassignee ### Picking up abandoned pull requests Sometimes, contributors send a pull request, but later find out that they don't have enough -time to work on it, or they simply are not interested in it anymore. Such PRs are often -eventually closed and they receive the `S-inactive` label. You could try to examine some of -these PRs and pick up the work. You can find the list of such PRs [here][abandoned-prs]. +time to work on it, or they simply are not interested in it anymore. +Such PRs are often eventually closed and they receive the `S-inactive` label. +You could try to examine some of these PRs and pick up the work. +You can find the list of such PRs [here][abandoned-prs]. If the PR has been implemented in some other way in the meantime, the `S-inactive` label -should be removed from it. If not, and it seems that there is still interest in the change, +should be removed from it. +If not, and it seems that there is still interest in the change, you can try to rebase the pull request on top of the latest `master` branch and send a new pull request, continuing the work on the feature. @@ -136,7 +148,8 @@ pull request, continuing the work on the feature. ### Writing tests -Issues that have been resolved but do not have a regression test are marked with the `E-needs-test` label. Writing unit tests is a low-risk, lower-priority task that offers new contributors a great opportunity to familiarize themselves with the testing infrastructure and contribution workflow. +Issues that have been resolved but do not have a regression test are marked with the `E-needs-test` label. +Writing unit tests is a low-risk, lower-priority task that offers new contributors a great opportunity to familiarize themselves with the testing infrastructure and contribution workflow. ### Contributing to std (standard library) @@ -147,28 +160,28 @@ See [std-dev-guide](https://std-dev-guide.rust-lang.org/). There are a bunch of other projects that you can contribute to outside of the `rust-lang/rust` repo, including `cargo`, `miri`, `rustup`, and many others. -These repos might have their own contributing guidelines and procedures. Many -of them are owned by working groups. For more info, see the documentation in those repos' READMEs. +These repos might have their own contributing guidelines and procedures. +Many of them are owned by working groups. +For more info, see the documentation in those repos' READMEs. ### Other ways to contribute There are a bunch of other ways you can contribute, especially if you don't feel comfortable jumping straight into the large `rust-lang/rust` codebase. -The following tasks are doable without much background knowledge but are -incredibly helpful: +The following tasks are doable without much background knowledge but are incredibly helpful: - [Writing documentation][wd]: if you are feeling a bit more intrepid, you could try - to read a part of the code and write doc comments for it. This will help you - to learn some part of the compiler while also producing a useful artifact! + to read a part of the code and write doc comments for it. + This will help you to learn some part of the compiler while also producing a useful artifact! - [Triaging issues][triage]: categorizing, replicating, and minimizing issues is very helpful to the Rust maintainers. - [Working groups][wg]: there are a bunch of working groups on a wide variety of rust-related things. - Answer questions on [users.rust-lang.org][users], or on [Stack Overflow][so]. - Participate in the [RFC process](https://github.com/rust-lang/rfcs). - Find a [requested community library][community-library], build it, and publish - it to [Crates.io](http://crates.io). Easier said than done, but very, very - valuable! + it to [Crates.io](http://crates.io). + Easier said than done, but very, very valuable! [users]: https://users.rust-lang.org/ [so]: http://stackoverflow.com/questions/tagged/rust From ce22ba964891f864271d9a5fb927563c46fd3884 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Mon, 10 Nov 2025 23:24:32 +0200 Subject: [PATCH 2/4] use chapter name instead of text that does not fit well --- src/getting-started.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/getting-started.md b/src/getting-started.md index e270f5c75..9f24f5fa4 100644 --- a/src/getting-started.md +++ b/src/getting-started.md @@ -8,8 +8,8 @@ how a typical contribution would go. This documentation is _not_ intended to be comprehensive; it is meant to be a quick guide for the most useful things. -For more information, [see this -chapter on how to build and run the compiler](./building/how-to-build-and-run.md). +For more information, +see [How to build and run the compiler](building/how-to-build-and-run.md). [internals]: https://internals.rust-lang.org [rust-zulip]: https://rust-lang.zulipchat.com From 3ddd590dd5c3cf75393ee4e5c7c875e0a5a369c5 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Mon, 10 Nov 2025 23:25:41 +0200 Subject: [PATCH 3/4] overlong --- src/getting-started.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/getting-started.md b/src/getting-started.md index 9f24f5fa4..cae003060 100644 --- a/src/getting-started.md +++ b/src/getting-started.md @@ -149,7 +149,9 @@ pull request, continuing the work on the feature. ### Writing tests Issues that have been resolved but do not have a regression test are marked with the `E-needs-test` label. -Writing unit tests is a low-risk, lower-priority task that offers new contributors a great opportunity to familiarize themselves with the testing infrastructure and contribution workflow. +Writing unit tests is a low-risk, +lower-priority task that offers new contributors a great opportunity to familiarize themselves +with the testing infrastructure and contribution workflow. ### Contributing to std (standard library) From c24d7b27445d2fce09ac1eed58ff9fa617f06252 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Mon, 10 Nov 2025 23:26:33 +0200 Subject: [PATCH 4/4] a double dot is not end of sentence --- ci/sembr/src/main.rs | 5 ++++- src/getting-started.md | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ci/sembr/src/main.rs b/ci/sembr/src/main.rs index c056f68c3..99e90e908 100644 --- a/ci/sembr/src/main.rs +++ b/ci/sembr/src/main.rs @@ -27,7 +27,8 @@ static REGEX_IGNORE: LazyLock = static REGEX_IGNORE_END: LazyLock = LazyLock::new(|| Regex::new(r"(\.|\?|;|!)$").unwrap()); static REGEX_IGNORE_LINK_TARGETS: LazyLock = LazyLock::new(|| Regex::new(r"^\[.+\]: ").unwrap()); -static REGEX_SPLIT: LazyLock = LazyLock::new(|| Regex::new(r"(\.|[^r]\?|;|!)\s+").unwrap()); +static REGEX_SPLIT: LazyLock = + LazyLock::new(|| Regex::new(r"([^\.]\.|[^r]\?|;|!)\s+").unwrap()); fn main() -> Result<()> { let cli = Cli::parse(); @@ -183,6 +184,7 @@ ignore E.g. too some code. block ``` sentence with *italics* should not be ignored. truly. +git log main.. compiler "; let expected = "\ # some. heading @@ -203,6 +205,7 @@ some code. block ``` sentence with *italics* should not be ignored. truly. +git log main.. compiler "; assert_eq!(expected, comply(original)); } diff --git a/src/getting-started.md b/src/getting-started.md index cae003060..64abd94c6 100644 --- a/src/getting-started.md +++ b/src/getting-started.md @@ -59,8 +59,7 @@ But also, feel free to ask questions even if you can't figure out who to ping. Another way to find experts for a given part of the compiler is to see who has made recent commits. For example, to find people who have recently worked on name resolution since the 1.68.2 release, -you could run `git shortlog -n 1.68.2.. -compiler/rustc_resolve/`. +you could run `git shortlog -n 1.68.2.. compiler/rustc_resolve/`. Ignore any commits starting with "Rollup merge" or commits by `@bors` (see [CI contribution procedures](./contributing.md#ci) for more information about these commits).