Skip to content

Commit 1fd6a5c

Browse files
authored
Merge pull request #31 from MabezDev/master-update-28-05-2020
Master update 28 05 2020
2 parents 25ae59a + 37eb4b5 commit 1fd6a5c

File tree

4,701 files changed

+194624
-37473
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,701 files changed

+194624
-37473
lines changed

.github/ISSUE_TEMPLATE/tracking_issue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Tracking Issue
3-
about: A tracking issue for a feature in Rust.
3+
about: A tracking issue for an accepted feature or RFC in Rust.
44
title: Tracking Issue for XXX
55
labels: C-tracking-issue
66
---

.github/workflows/ci.yml

Lines changed: 13 additions & 131 deletions
Large diffs are not rendered by default.

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
[submodule "src/tools/rls"]
1717
path = src/tools/rls
1818
url = https://github.com/rust-lang/rls.git
19-
[submodule "src/tools/clippy"]
20-
path = src/tools/clippy
21-
url = https://github.com/rust-lang/rust-clippy.git
2219
[submodule "src/tools/rustfmt"]
2320
path = src/tools/rustfmt
2421
url = https://github.com/rust-lang/rustfmt.git

.mailmap

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Carol (Nichols || Goulding) <[email protected]> <193874+carols10cents@user
4949
Carol (Nichols || Goulding) <[email protected]> <[email protected]>
5050
Carol (Nichols || Goulding) <[email protected]> <[email protected]>
5151
Carol Willing <[email protected]>
52+
Charles Lew <[email protected]> CrLF0710 <[email protected]>
5253
Chris C Cerami <[email protected]> Chris C Cerami <[email protected]>
5354
Chris Pressey <[email protected]>
5455
Chris Thorn <[email protected]> Chris Thorn <[email protected]>
@@ -133,7 +134,7 @@ João Oliveira <[email protected]> joaoxsouls <[email protected]>
133134
Johann Hofmann <[email protected]> Johann <[email protected]>
134135
135136
John Hodge <[email protected]> John Hodge <[email protected]>
136-
John Kåre Alsaker <[email protected]>
137+
John Kåre Alsaker <[email protected]>
137138
John Talling <[email protected]>
138139
139140
Jonathan S <[email protected]> Jonathan S <[email protected]>
@@ -153,7 +154,7 @@ Laurențiu Nicola <[email protected]>
153154
Lee Jeffery <[email protected]> Lee Jeffery <[email protected]>
154155
Lee Wondong <[email protected]>
155156
Lennart Kudling <[email protected]>
156-
Léo Testard <[email protected]>
157+
Léo Testard <[email protected]>
157158
158159
159160
Luke Metz <[email protected]>

CONTRIBUTING.md

Lines changed: 77 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,73 @@ with one another are rolled up.
188188
Speaking of tests, Rust has a comprehensive test suite. More information about
189189
it can be found [here][rctd].
190190

191-
### External Dependencies
191+
### External Dependencies (subtree)
192+
193+
As a developer to this repository, you don't have to treat the following external projects
194+
differently from other crates that are directly in this repo:
195+
196+
* Clippy
197+
198+
They are just regular files and directories. This is in contrast to `submodule` dependencies
199+
(see below for those). Only tool authors will actually use any operations here.
200+
201+
#### Synchronizing a subtree
202+
203+
There are two synchronization directions: `subtree push` and `subtree pull`.
204+
205+
```
206+
git subtree push -P src/tools/clippy [email protected]:your-github-name/rust-clippy sync-from-rust
207+
```
208+
209+
takes all the changes that
210+
happened to the copy in this repo and creates commits on the remote repo that match the local
211+
changes. Every local commit that touched the subtree causes a commit on the remote repo, but is
212+
modified to move the files from the specified directory to the tool repo root.
213+
214+
Make sure to not pick the `master` branch on the tool repo, so you can open a normal PR to the tool
215+
to merge that subrepo push.
216+
217+
```
218+
git subtree pull -P src/tools/clippy https://github.com/rust-lang/rust-clippy master
219+
```
220+
221+
takes all changes since the last `subtree pull` from the tool repo
222+
repo and adds these commits to the rustc repo + a merge commit that moves the tool changes into
223+
the specified directory in the rust repository.
224+
225+
It is recommended that you always do a push first and get that merged to the tool master branch.
226+
Then, when you do a pull, the merge works without conflicts.
227+
While it's definitely possible to resolve conflicts during a pull, you may have to redo the conflict
228+
resolution if your PR doesn't get merged fast enough and there are new conflicts. Do not try to
229+
rebase the result of a `git subtree pull`, rebasing merge commits is a bad idea in general.
230+
231+
You always need to specify the `-P` prefix to the subtree directory and the corresponding remote
232+
repository. If you specify the wrong directory or repository
233+
you'll get very fun merges that try to push the wrong directory to the wrong remote repository.
234+
Luckily you can just abort this without any consequences by throwing away either the pulled commits
235+
in rustc or the pushed branch on the remote and try again. It is usually fairly obvious
236+
that this is happening because you suddenly get thousands of commits that want to be synchronized.
237+
238+
#### Creating a new subtree dependency
239+
240+
If you want to create a new subtree dependency from an existing repository, call (from this
241+
repository's root directory!)
242+
243+
```
244+
git subtree add -P src/tools/clippy https://github.com/rust-lang/rust-clippy.git master
245+
```
246+
247+
This will create a new commit, which you may not rebase under any circumstances! Delete the commit
248+
and redo the operation if you need to rebase.
249+
250+
Now you're done, the `src/tools/clippy` directory behaves as if Clippy were part of the rustc
251+
monorepo, so no one but you (or others that synchronize subtrees) actually needs to use `git subtree`.
252+
253+
254+
### External Dependencies (submodules)
192255

193256
Currently building Rust will also build the following external projects:
194257

195-
* [clippy](https://github.com/rust-lang/rust-clippy)
196258
* [miri](https://github.com/rust-lang/miri)
197259
* [rustfmt](https://github.com/rust-lang/rustfmt)
198260
* [rls](https://github.com/rust-lang/rls/)
@@ -221,7 +283,6 @@ before the PR is merged.
221283

222284
Rust's build system builds a number of tools that make use of the
223285
internals of the compiler. This includes
224-
[Clippy](https://github.com/rust-lang/rust-clippy),
225286
[RLS](https://github.com/rust-lang/rls) and
226287
[rustfmt](https://github.com/rust-lang/rustfmt). If these tools
227288
break because of your changes, you may run into a sort of "chicken and egg"
@@ -331,10 +392,18 @@ You can find documentation style guidelines in [RFC 1574][rfc1574].
331392

332393
[rfc1574]: https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text
333394

334-
In many cases, you don't need a full `./x.py doc`. You can use `rustdoc` directly
335-
to check small fixes. For example, `rustdoc src/doc/reference.md` will render
336-
reference to `doc/reference.html`. The CSS might be messed up, but you can
337-
verify that the HTML is right.
395+
In many cases, you don't need a full `./x.py doc`, which will build the entire
396+
stage 2 compiler and compile the various books published on
397+
[doc.rust-lang.org]. When updating documentation for the standard library,
398+
first try `./x.py doc --stage 0 src/libstd`. If that fails, or if you need to
399+
see the output from the latest version of `rustdoc`, use `--stage 1` instead of
400+
`--stage 0`. Results should appear in `build/$TARGET/crate-docs`.
401+
402+
[doc.rust-lang.org]: htts://doc.rust-lang.org
403+
404+
You can also use `rustdoc` directly to check small fixes. For example,
405+
`rustdoc src/doc/reference.md` will render reference to `doc/reference.html`.
406+
The CSS might be messed up, but you can verify that the HTML is right.
338407

339408
Additionally, contributions to the [rustc-dev-guide] are always welcome. Contributions
340409
can be made directly at [the
@@ -449,7 +518,7 @@ are:
449518
* Don't be afraid to ask! The Rust community is friendly and helpful.
450519

451520
[rustc dev guide]: https://rustc-dev-guide.rust-lang.org/about-this-guide.html
452-
[gdfrustc]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/
521+
[gdfrustc]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/
453522
[gsearchdocs]: https://www.google.com/search?q=site:doc.rust-lang.org+your+query+here
454523
[rif]: http://internals.rust-lang.org
455524
[rr]: https://doc.rust-lang.org/book/README.html

0 commit comments

Comments
 (0)