Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tool to "enforce" semantic line breaks #1485

Draft
wants to merge 1,872 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1872 commits
Select commit Hold shift + click to select a range
87968b4
Describe how to trigger perf runs (#1237)
lqd Oct 21, 2021
f68aff5
Switch date-check to Rust 2021
camelid Oct 21, 2021
b060087
Update author field
camelid Oct 21, 2021
68dbb45
Add documentation for LLVM CFI support
rcvalle Oct 14, 2021
ddaebd8
Fix `rustc_mir` related links (#1228)
Lee-Janggun Oct 28, 2021
f3fb373
Edit "About this guide" for semantic line feeds
pierwill Oct 28, 2021
70966e5
Some minor adjustments to the diagnostic documentation
xFrednet Oct 28, 2021
0f69d33
Edit introduction to bootstrapping
pierwill Oct 24, 2021
292072d
enhance subtree docs, link to clippy docs
calebcartwright Nov 2, 2021
dac568c
Ensure date-check cron job is using latest stable Rust
camelid Nov 3, 2021
f146da3
Update some date-check comments
camelid Nov 3, 2021
2ad51b6
Fix date
camelid Nov 4, 2021
a034fad
tiny capitalization fix
dmitris Nov 4, 2021
8a8452c
Remove some legacy test suites.
ehuss Nov 4, 2021
ffcc629
Add note to emphasize replacing TARGET_TRIPLE (#1250)
asquared31415 Nov 6, 2021
196ef69
Fix typo: [upv.rs_mentioned] -> [upvars_mentioned]
chubei Nov 7, 2021
6b9c8ae
Fix broken link in "Bootstrapping"
camelid Nov 10, 2021
f1297f5
Fix compare-mode documentation
rukai Nov 14, 2021
0fc1fa9
Spelling fixes
rukai Nov 15, 2021
24132fa
Unify `x.py` usage (#1258)
ken-matsui Nov 15, 2021
766f9d7
Fix broken links related to `rustc_borrowck` (#1259)
JohnTitor Nov 16, 2021
5fbfe93
Fix an invalid link on Diagnostic Items (#1261)
ken-matsui Nov 16, 2021
a2fc963
Describe drop elaboration (#1240)
ecstatic-morse Nov 18, 2021
6a27fc2
make it compile with 1.56.0
simon-perriard Nov 24, 2021
1f0c4f0
make it compile with 1.56.0
simon-perriard Nov 24, 2021
94e9e67
make it compile with 1.56.0 no warning
simon-perriard Nov 24, 2021
285b3e4
Document more compiletest headers.
ehuss Nov 4, 2021
9660c15
Apply suggestions from pierwill
ehuss Nov 5, 2021
aaf6ccc
Document rustfix-only-machine-applicable
ehuss Nov 5, 2021
8a817bc
Update for review comments.
ehuss Nov 19, 2021
c4776cb
Fix some links
JohnTitor Nov 15, 2021
2cee5a9
Improve 'Running tests manually' section
rukai Nov 27, 2021
a374e7d
Update LLVM coverage mapping format version supported by rustc (#1267)
richkadel Dec 3, 2021
3df5cc9
Improve documentation on r?
rukai Dec 5, 2021
0c0e4f2
Update src/getting-started.md
rukai Dec 7, 2021
6c1f5c7
Fix some broken links
camelid Dec 5, 2021
b6cf9a7
Update HIR chapter to use `HirId` instead of `NodeId`
camelid Dec 5, 2021
f9db2f4
Update rustdoc internals
jsha Dec 5, 2021
5dd756b
Fix some broken links (#1274)
Badel2 Dec 13, 2021
35dce02
Update humor docs for special-casing ferris emoji
mheiber Dec 15, 2021
7340eb8
Move date-check comment to fix Markdown syntax
camelid Dec 15, 2021
9bf0028
remove rustfix item in test intro (#1277)
wangkirin Dec 20, 2021
a11e5f4
Streamline "Getting Started" (#1279)
nnethercote Dec 24, 2021
f6a190e
Fix link in contributing.md (#1280)
BGR360 Dec 27, 2021
8754644
Update link to moved section (#1282)
camelid Dec 29, 2021
a992723
Streamline "Getting Started" some more.
nnethercote Jan 5, 2022
acc6718
Address review comments in #1286.
nnethercote Jan 6, 2022
18b93ae
Address more review comments in #1286.
nnethercote Jan 6, 2022
a10c5be
Clean up section about FCPs (#1287)
camelid Jan 18, 2022
60bc9ab
Spelling: Rename `rust` to `Rust` (#1288)
jubnzv Jan 18, 2022
4d46bd0
Add inline assembly internals (#1266)
Amanieu Jan 18, 2022
78dd6a4
Reorganize and expand the testing chapters. (#1281)
ehuss Jan 18, 2022
341abec
Clarify that r? works in comments.
iwanders Jan 20, 2022
8763adb
git.md: Expanded a note to try to stress what you need to do if you'r…
pnkfelix Jan 26, 2022
dc47b51
mention test folders for cfg(bootstrap) (#1294)
Manishearth Feb 5, 2022
d1822b9
Triage some date references (#1293)
JohnTitor Feb 10, 2022
62f5839
Correction, building stage3 compiler (#1298)
raoulstrackx Feb 11, 2022
5e38eb6
Link to The Rust Performance Book (#1300)
pierwill Feb 17, 2022
cb3fb94
Edit "Queries" chapter (#1301)
pierwill Feb 17, 2022
2c9be18
Fix link
pierwill Feb 17, 2022
1fa751d
Fix heading levels in the query chapter (#1305)
camelid Feb 17, 2022
68c7649
Edit glossary (#1302)
pierwill Feb 17, 2022
5483b27
Fix `Ty` link (#1308)
pierwill Feb 20, 2022
eefbde5
symbol-mangling-version has been stabilized
ehuss Feb 20, 2022
d335c9c
instrument-coverage has been stabilized.
ehuss Feb 20, 2022
e798dc4
Typo (#1313)
smoelius Feb 23, 2022
9e2cdee
Fix typo (#1315)
teobouvard Feb 24, 2022
24e474c
Add known-bug header. (#1311)
ehuss Feb 25, 2022
7d8eb87
cargo timings has been stabilized (#1319)
ehuss Feb 28, 2022
32f2a5b
Add architecture suggestion for Apple silicon (#1320)
jamescoleuk Mar 1, 2022
eb90c9c
Fix incorrectly escaped backtick
ChayimFriedman2 Mar 2, 2022
4b8d939
Add missing rustdoc tests explanations
GuillaumeGomez Mar 9, 2022
0e4b961
update winget install instructions to ensure proper packages are inst…
User1785604260 Mar 12, 2022
155126b
update section for type system constants (#1329)
lcnr Mar 22, 2022
127abaa
Add example how lints can be feature gated
xFrednet Apr 1, 2022
f5f6b4f
Update miri.md: correct a minor typo (#1334)
ya0guang Apr 5, 2022
664d3c7
r-a: Use `python3 x.py` instead of `./x.py` (#1335)
camelid Apr 9, 2022
fbda644
Update examples with 1.61.0-nightly (latest version) (#1330)
ujjawal4046 Apr 11, 2022
885d329
Consolidate crates.io convention section (#1326)
iwanders Apr 11, 2022
eeb5a83
method-lookup.md improvements (#1296)
mattheww Apr 11, 2022
d9bfa37
sessiondiagnostic: translation (#1333)
davidtwco Apr 14, 2022
e58b4c0
Minor type fix (#1337)
eholk Apr 14, 2022
aa31b10
Fix typo serious->series (#1336)
steffahn Apr 14, 2022
c190ae3
Send people doing *library* stabilizations over to the std-dev-guide …
scottmcm Apr 14, 2022
a8add66
Extend debugging llvm section (#1290)
pnkfelix Apr 14, 2022
043e60f
Fix a small typo (#1343)
printfn Apr 20, 2022
e827b0a
Update some date refs
JohnTitor Apr 15, 2022
9ec0190
Edit "What the compiler does to your code" (#1306)
pierwill May 2, 2022
acb1fcb
Document ErrorGuaranteed (#1316)
mark-i-m May 3, 2022
2de8cb5
correct type of SubstsRef (#1347)
aliemjay May 7, 2022
a9d0e35
Fix format (#1349)
ohno418 May 9, 2022
e4ce969
mention `WithOptConstParam` (#1346)
lcnr May 9, 2022
425fa20
Update date references on parallel-rustc (#1348)
JohnTitor May 9, 2022
0c02acd
Update overview.md (#1351)
ihaveint May 10, 2022
687f603
Update docs for deprecated attribute (#1338)
jhpratt May 12, 2022
77f7fa2
Fix configuration names for vscode/r-a (#1352)
WaffleLapkin May 12, 2022
b24d550
Add docs for logging of queries. (#1350)
ehuss May 12, 2022
06445e6
Edit the "Compiler Source Code" chapter (#1307)
pierwill May 16, 2022
b389adc
Replace a broken YouTube link (#1295)
JohnTitor May 16, 2022
0b2c9db
Update some links and docs (#1340)
JohnTitor May 16, 2022
12a2e08
make sentence more simple (#1353)
tshepang May 20, 2022
0cd9842
Add note about patching dependencies and warnings. (#1354)
ehuss May 21, 2022
2ba653e
Exclude `tomlee.co` from link-checking (#1356)
JohnTitor May 24, 2022
5e26873
Fix some wording on the "Incremental Compilation In Detail" page
JohnTitor May 24, 2022
554c00e
Cleanup rustdoc-internals
JohnTitor May 21, 2022
6692629
Triage some date references related to traits
JohnTitor May 28, 2022
a206009
Update rustc-driver related examples
JohnTitor May 1, 2022
4d43651
Clarify cargo fallback behavior for rustup link (#1273)
couchand Jun 6, 2022
72a3895
Bump regex from 1.4.3 to 1.5.5 in /ci/date-check (#1364)
dependabot[bot] Jun 6, 2022
4383648
improve rustc_interface examples a little (#1362)
tshepang Jun 6, 2022
6e4d643
Make build scripts and proc macros work with the suggested rust-analy…
Jun 7, 2022
bc81f99
add section on user types (#1359)
lcnr Jun 8, 2022
e83cd73
Remove nll compare mode. (#1366)
ehuss Jun 8, 2022
375a9f0
Remove mention of -Zborrowck=mir with Polonius. (#1367)
ehuss Jun 8, 2022
ee64179
later -> latter
Jun 12, 2022
56ec010
diagnostics: line wrapping/heading changes
davidtwco Jun 6, 2022
c4d5a69
diagnostics: add translation documentation
davidtwco Jun 6, 2022
cddd59f
Add an "is" and rearange "We next" to "Next, we" (#1369)
EdwinRy Jun 18, 2022
bda3e0b
Fix small `src/diagnostics.md` typo (#1370)
omertuc Jun 18, 2022
12a613e
make clear that other versions can work (#1373)
tshepang Jun 21, 2022
a3d2f90
small improves (#1371)
tshepang Jun 21, 2022
048d925
not obvious what Ex is, so rather get rid (#1372)
tshepang Jun 21, 2022
4505f70
humorust: Forbid pineapple on pizza (#1374)
Alcaro Jun 26, 2022
03fafb5
Few readability fixes
EdwinRy Jun 27, 2022
11b4065
diagnostics: structs with new slug syntax (#1377)
davidtwco Jun 28, 2022
f423a3a
leave formatOnSave to the user (#1380)
RalfJung Jul 1, 2022
a05e1fd
Fix path to hir_id_validator.rs
danobi Jul 2, 2022
d955bab
Add the config needed to get rust-analyzer working on src/bootstrap (…
jyn514 Jul 3, 2022
ef73d03
Change the old filename, "src/stage0.txt" to "src/stage0.json" (#1383)
ohno418 Jul 3, 2022
eb83839
Suggest a separate build directory for rust-analyzer (#1378)
jyn514 Jul 3, 2022
07efe00
Use `x.py check` instead of `cargo check` for build scripts (#1384)
jyn514 Jul 6, 2022
f1d10fb
Revert "Add the config needed to get rust-analyzer working on src/boo…
spastorino Jul 6, 2022
0855fc9
Git-ignore `pulls.json` (#1386)
JohnTitor Jul 7, 2022
8accea6
overview.md: Link to existing Macro Expansion and Name Resolution doc…
Enselic Jul 8, 2022
f92263e
Update the build instructions for the standard library
jyn514 Jul 11, 2022
4a96ed5
small fixes to ty chapter (#1390)
tshepang Jul 15, 2022
47e0444
remove outdated info on debugging
tshepang Jul 15, 2022
7a99011
update date reference on MIR inliner
tshepang Jul 14, 2022
0eb86d9
address review comment
tshepang Jul 14, 2022
2e754ba
Rename debugging_opts to unstable_opts, use link
5225225 Jul 16, 2022
8bbee4f
typo: monomorph docs
davidrusu Jul 16, 2022
56eb8b6
fix some typos (#1398)
tshepang Jul 16, 2022
ade9352
use relative links
tshepang Jul 16, 2022
e764363
add mdbook-mermaid
nikomatsakis Feb 7, 2022
53395b0
add draft chapter
nikomatsakis Feb 7, 2022
857ee49
sync with hackmd
hackmd-deploy Feb 7, 2022
5cc90f3
obey line length limit
tshepang Jul 17, 2022
1b62c12
obey line length limit (part 2)
tshepang Jul 17, 2022
1684423
obey line length limit (part 3)
tshepang Jul 17, 2022
dca7b1b
Remove a mention to Steve on r? example
JohnTitor Jul 18, 2022
2802da7
replace misleading name (#1401)
tshepang Jul 19, 2022
0c2f5c9
sync with hackmd version
tshepang Jul 17, 2022
6e1ac9d
renamed
tshepang Jul 17, 2022
2b87b31
remove stray markup
tshepang Jul 18, 2022
5c8febd
Fix link to clippy sync docs
fasterthanlime Jul 19, 2022
bac43d0
Link to rendered book directly
fasterthanlime Jul 19, 2022
d5201cd
Debuginfo tests now also support revisions.
luqmana Jul 20, 2022
bcc1166
rust-analyzer is now a subtree
fasterthanlime Jul 25, 2022
c7637de
Add documentation about Microsoft provided debuggers and CodeView/PDB…
ridwanabdillahi Jul 25, 2022
e5e5a9b
Document how to build a cross-compiler
bstrie Jul 22, 2022
30a4d2b
Add instructions to fix build errors in std after adding a new target
Urgau Jul 29, 2022
c0b491e
Fix the link to `Lazy<T>`
JohnTitor Jul 26, 2022
18fa8fb
Fix the link to `ProcMacro` trait
JohnTitor Jul 26, 2022
bbbd60d
Fix the link to `ResolverAstLowering`
JohnTitor Jul 26, 2022
637ebaa
Fix the link to clippy docs
JohnTitor Jul 26, 2022
7955bb3
Prefer relative links
JohnTitor Jul 26, 2022
ea7e58a
minor fixes
tshepang Jul 30, 2022
67af5ca
revamp doc-build chapter
tshepang Jul 19, 2022
6f97f45
Update src/building/compiler-documenting.md
tshepang Jul 22, 2022
d9596c6
summary of chapter
tshepang Jul 30, 2022
3389074
try address review comments
tshepang Jul 30, 2022
3678b50
accept review suggestion
tshepang Jul 31, 2022
04f3cf0
address review comment
tshepang Jul 31, 2022
2557089
make date-check more lightweight (#1394)
tshepang Aug 2, 2022
5c4b673
date-check: be more strict
tshepang Aug 2, 2022
e305a42
note is now too old to be relevant
tshepang Aug 7, 2022
6964f75
date-check: rustc_codegen_ssa is still alive
tshepang Aug 7, 2022
4b2f038
Add bootstrapping diagram
camelid Aug 9, 2022
c1c84d6
Add colors to diagram
camelid Aug 9, 2022
81a4d04
Add color for downloaded nodes
camelid Aug 9, 2022
df17432
Fix legend colors in dark mode
camelid Aug 9, 2022
1dee5f8
update date-check format on github issue (#1416)
tshepang Aug 9, 2022
f979af6
move references down to avoid clutter (#1420)
tshepang Aug 9, 2022
af80d31
add gdb tips for symbol-mangling-version
chenyukang Aug 10, 2022
4c39d33
Update src/compiler-debugging.md
jyn514 Aug 10, 2022
24de0fa
fix/improve compiler-debugging
tshepang Aug 10, 2022
452b5ab
date-check: crates-io
tshepang Aug 11, 2022
d3daa1f
Improve the "Diagnostic items" chapter (#1427)
tshepang Aug 13, 2022
04e1702
Update the date reference around Git submodule bug (#1430)
tshepang Aug 17, 2022
8ee1ff5
fix lifetime name (#1431)
tshepang Aug 17, 2022
47c8189
remove incorrect info (#1435)
tshepang Aug 17, 2022
2512667
Update slug style to use _ instead of - (#1426)
est31 Aug 17, 2022
9334d59
fix incorrect #[note] syntax
CleanCut Aug 18, 2022
0a80e53
more syntax fixes
CleanCut Aug 18, 2022
f3fe248
Add missing lifetime (#1439)
CleanCut Aug 19, 2022
0a61352
diagnostics: fix outdated use of string slugs (#1436)
davidtwco Aug 19, 2022
c2371da
Document changes introduced by kind-less SessionDiagnostics
Xiretza Aug 19, 2022
e81b583
fix quick-edit link (#1441)
tshepang Aug 22, 2022
18fc34b
do not offer option to run code (#1442)
tshepang Aug 22, 2022
1e7fe14
update thir output (#1445)
tshepang Aug 24, 2022
bedc610
make date-check more easy to use
tshepang Aug 14, 2022
b0a0a4f
address review comment
tshepang Aug 19, 2022
9c9882c
update parallel-rustc.md
SparrowLii Aug 15, 2022
a240e52
Correct some statements in parallel-rustc.md
SparrowLii Aug 16, 2022
1be023c
correct typo in parallel-rustc.md
SparrowLii Aug 16, 2022
d7832db
Update some statements
SparrowLii Aug 25, 2022
8ba0403
A few corrections
SparrowLii Aug 26, 2022
94a29d4
we got 3 (#1447)
tshepang Aug 26, 2022
20e571f
Updates LLVM prereqs since upgrade to C++17.
red1bluelost Aug 27, 2022
2bf1b9a
Updates text to refer to LLVM documentation.
red1bluelost Aug 27, 2022
daca468
typo
tshepang Aug 27, 2022
b5a632f
Refine the lintstore section (#1429)
tshepang Aug 27, 2022
2a9f8fb
Update the stabilization guide to refer to the new placeholder system
est31 Aug 23, 2022
c0c957c
Remove a dangling link on "The `#[test]` attribute"
JohnTitor Aug 29, 2022
04892c1
Fix the link to `Parser` struct
JohnTitor Aug 29, 2022
6b0a155
Update for removal of RLS (#1450)
ehuss Sep 2, 2022
8593238
Add reference for updating Windows PATH and fix typo
Samyak2 Aug 30, 2022
5be5475
Document multipart_suggestion derive on SessionSubdiagnostic
Xiretza Aug 24, 2022
a5363fb
Fix typo (#1459)
eholk Sep 9, 2022
5d8825e
Add symbol-addition to the how-to for new features (#1457)
ssbr Sep 11, 2022
f29e38c
"symbol names" => ABI
jyn514 Sep 10, 2022
c3232c4
Remove the diagram of all outputs generated by x.py
jyn514 Sep 10, 2022
6b3a5fb
Rewrite the section on passing flags to subcommands
jyn514 Sep 10, 2022
a605591
Say "bootstrap" instead of "rustbuild"; the latter is not explained a…
jyn514 Sep 10, 2022
290ecb9
fix typos and formatting
jyn514 Sep 12, 2022
f1609a3
Explain the new valtree system for type level constants. (#1097)
oli-obk Sep 13, 2022
b21b0bb
remove stray **
tshepang Sep 14, 2022
39612f9
Link from "implementing to new features" to mcp.md (#1465)
pnkfelix Sep 15, 2022
1f8cda6
Add a note about building `rust-analyzer-proc-macro-srv` (#1467)
WaffleLapkin Sep 19, 2022
f587d6e
Update stability guide to use CURRENT_RUSTC_VERSION (#1468)
SUPERCILEX Sep 19, 2022
f349ee1
Fix some typos
JohnTitor Sep 19, 2022
b8b984f
Update some actions versions
JohnTitor Sep 19, 2022
03752ab
Remove unmaintained action
JohnTitor Sep 19, 2022
27c2aa6
Update mdbook and its extensions versions
JohnTitor Sep 20, 2022
1c79085
UPDATE - Diagnostic docs to reflect renamed traits and macros in rust…
JhonnyBillM Sep 9, 2022
7743f0f
don't refer to the compile-time interpreter as "Miri" (#1471)
RalfJung Sep 26, 2022
ed11720
Update r-a config suggestions
Veykril Oct 1, 2022
1370793
Link to the correct page in "about this guide"
jyn514 Sep 3, 2022
de71812
Update about-this-guide.md
jyn514 Oct 2, 2022
882921a
fix typo and make paragraph consistent (#1474)
Joshument Oct 3, 2022
b8228e9
Rename typeck to hir_analysis (#1475)
mejrs Oct 4, 2022
d3ce60f
Update running tests with the new flags (#1476)
pietroalbini Oct 5, 2022
57a38ad
diagnostic structs: derive on enum (#1477)
davidtwco Oct 5, 2022
0932ad6
fix very minor punctuation typo
Joshument Oct 5, 2022
9a86c04
.gitattributes: Mark minified javascript as binary to filter greps
joshtriplett Oct 7, 2022
509ee50
Use llvm subdomain for compiler-explorer link
dkm Oct 8, 2022
7518c34
Update debugging.md
dkm Oct 8, 2022
e68dfb8
Add missing prerequisite for some Linux distros (#1481)
scarvalhojr Oct 11, 2022
77bfaff
add tool to "enforce" semantic line breaks
tshepang Oct 18, 2022
19d2632
do not overwrite unconditionally
tshepang Oct 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[src/*]
end_of_line = lf
insert_final_newline = true

[ci/*.sh]
indent_style = space
indent_size = 2
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto eol=lf

# git grep shouldn't match entries in huge minified javascript
*.min.js binary

# Older git versions try to fix line endings on images, this prevents it.
*.png binary
*.jpg binary
*.ico binary
79 changes: 79 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CI

on:
push:
branches:
- master
pull_request:
schedule:
# Run at 18:00 UTC every day
- cron: '0 18 * * *'

jobs:
ci:
if: github.repository == 'rust-lang/rustc-dev-guide'
runs-on: ubuntu-latest
env:
MDBOOK_VERSION: 0.4.21
MDBOOK_LINKCHECK_VERSION: 0.7.6
MDBOOK_MERMAID_VERSION: 0.11.2
MDBOOK_TOC_VERSION: 0.9.0
DEPLOY_DIR: book/html
BASE_SHA: ${{ github.event.pull_request.base.sha }}
steps:
- uses: actions/checkout@v3
with:
# linkcheck needs the base commit.
fetch-depth: 0

- name: Cache binaries
id: mdbook-cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin
key: ${{ runner.os }}-${{ env.MDBOOK_VERSION }}--${{ env.MDBOOK_LINKCHECK_VERSION }}--${{ env.MDBOOK_TOC_VERSION }}--${{ env.MDBOOK_MERMAID_VERSION }}

- name: Cache linkcheck
uses: actions/cache@v3
with:
path: |
~/book/linkcheck
key: ${{ runner.os }}-${{ hashFiles('./book/linkcheck') }}

- name: Check line lengths
if: github.event_name != 'push'
run: |
shopt -s globstar
MAX_LINE_LENGTH=100 bash ci/check_line_lengths.sh src/**/*.md

- name: Install latest nightly Rust toolchain
if: steps.mdbook-cache.outputs.cache-hit != 'true'
run: |
rustup update nightly
rustup override set nightly

- name: Install Dependencies
if: steps.mdbook-cache.outputs.cache-hit != 'true'
run: |
cargo install mdbook --version ${{ env.MDBOOK_VERSION }}
cargo install mdbook-linkcheck --version ${{ env.MDBOOK_LINKCHECK_VERSION }}
cargo install mdbook-toc --version ${{ env.MDBOOK_TOC_VERSION }}
cargo install mdbook-mermaid --version ${{ env.MDBOOK_MERMAID_VERSION }}

- name: Check build
run: mdbook build

- name: Deploy to gh-pages
if: github.event_name == 'push'
run: |
touch "${{ env.DEPLOY_DIR }}/.nojekyll"
cp CNAME "${{ env.DEPLOY_DIR }}"
cd "${{ env.DEPLOY_DIR }}"
rm -rf .git
git init
git config user.name "Deploy from CI"
git config user.email ""
git add .
git commit -m "Deploy ${GITHUB_SHA} to gh-pages"
git push --quiet -f "https://x-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}" HEAD:gh-pages
49 changes: 49 additions & 0 deletions .github/workflows/date-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Date-Check

on:
schedule:
# Run at noon UTC every 1st of the month
- cron: '00 12 01 * *'

# Allow manually starting the workflow
workflow_dispatch:

jobs:
date-check:
if: github.repository == 'rust-lang/rustc-dev-guide'
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Ensure Rust is up-to-date
run: |
rustup update stable

- name: Run `date-check`
working-directory: ci/date-check
run: |
cargo run -- ../../src/ > ../../date-check-output.txt

- name: Open issue
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const fs = require('fs');

const rawText = fs.readFileSync('date-check-output.txt', { encoding: 'utf8' });
const title = rawText.split('\n')[0];
if (title != 'empty') {
const body = rawText.split('\n').slice(1).join('\n');
github.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title,
body,
});
console.log('Opened issue.');
} else {
console.log('No dates to triage.');
}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
book

# prevent accidental changes
book.toml

ci/date-check/target/
ci/semantic-line-breaks/target/

# Generated by check-in.sh
pulls.json
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rustc-dev-guide.rust-lang.org
37 changes: 1 addition & 36 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,3 @@
# The Rust Code of Conduct

A version of this document [can be found online](https://www.rust-lang.org/conduct.html).

## Conduct

**Contact**: [rust-mods@rust-lang.org](mailto:rust-mods@rust-lang.org)

* We are committed to providing a friendly, safe and welcoming environment for all, regardless of level of experience, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality, or other similar characteristic.
* On IRC, please avoid using overtly sexual nicknames or other nicknames that might detract from a friendly, safe and welcoming environment for all.
* Please be kind and courteous. There's no need to be mean or rude.
* Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer.
* Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works.
* We will exclude you from interaction if you insult, demean or harass anyone. That is not welcome behaviour. We interpret the term "harassment" as including the definition in the <a href="http://citizencodeofconduct.org/">Citizen Code of Conduct</a>; if you have any lack of clarity about what might be included in that concept, please read their definition. In particular, we don't tolerate behavior that excludes people in socially marginalized groups.
* Private harassment is also unacceptable. No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member, please contact one of the channel ops or any of the [Rust moderation team](/team.html#Moderation) immediately. Whether you're a regular contributor or a newcomer, we care about making this community a safe place for you and we've got your back.
* Likewise any spamming, trolling, flaming, baiting or other attention-stealing behaviour is not welcome.

## Moderation


These are the policies for upholding our community's standards of conduct. If you feel that a thread needs moderation, please contact the [Rust moderation team](/team.html#Moderation).

1. Remarks that violate the Rust standards of conduct, including hateful, hurtful, oppressive, or exclusionary remarks, are not allowed. (Cursing is allowed, but never targeting another user, and never in a hateful manner.)
2. Remarks that moderators find inappropriate, whether listed in the code of conduct or not, are also not allowed.
3. Moderators will first respond to such remarks with a warning.
4. If the warning is unheeded, the user will be "kicked," i.e., kicked out of the communication channel to cool off.
5. If the user comes back and continues to make trouble, they will be banned, i.e., indefinitely excluded.
6. Moderators may choose at their discretion to un-ban the user if it was a first offense and they offer the offended party a genuine apology.
7. If a moderator bans someone and you think it was unjustified, please take it up with that moderator, or with a different moderator, **in private**. Complaints about bans in-channel are not allowed.
8. Moderators are held to a higher standard than other community members. If a moderator creates an inappropriate situation, they should expect less leeway than others.

In the Rust community we strive to go the extra step to look out for each other. Don't just aim to be technically unimpeachable, try to be your best self. In particular, avoid flirting with offensive or sensitive issues, particularly if they're off-topic; this all too often leads to unnecessary fights, hurt feelings, and damaged trust; worse, it can drive people away from the community entirely.

And if someone takes issue with something you said or did, resist the urge to be defensive. Just stop doing what it was they complained about and apologize. Even if you feel you were misinterpreted or unfairly accused, chances are good there was something you could've communicated better — remember that it's your responsibility to make your fellow Rustaceans comfortable. Everyone wants to get along and we are all here first and foremost because we want to talk about cool technology. You will find that people will be eager to assume good intent and forgive as long as you earn their trust.

The enforcement policies listed above apply to all official Rust venues; including official IRC channels (#rust, #rust-internals, #rust-tools, #rust-libs, #rustc, #rust-beginners, #rust-docs, #rust-community, #rust-lang, and #cargo); GitHub repositories under rust-lang, rust-lang-nursery, and rust-lang-deprecated; and all forums under rust-lang.org (users.rust-lang.org, internals.rust-lang.org). For other projects adopting the Rust Code of Conduct, please contact the maintainers of those projects for enforcement. If you wish to use this code of conduct for your own project, consider explicitly mentioning your moderation policy or making a copy with your own moderation policy so as to avoid confusion.

*Adapted from the [Node.js Policy on Trolling](http://blog.izs.me/post/30036893703/policy-on-trolling) as well as the [Contributor Covenant v1.3.0](http://contributor-covenant.org/version/1/3/0/).*
This repository follows the [Code of Conduct](https://www.rust-lang.org/conduct.html) of the Rust organization.
130 changes: 127 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,127 @@
An attempt to docuemnt how the compiler works. The intention is to
bootstrap this "in repo" and eventually move the text over into the
main rustc repo.
[![CI](https://github.com/rust-lang/rustc-dev-guide/actions/workflows/ci.yml/badge.svg)](https://github.com/rust-lang/rustc-dev-guide/actions/workflows/ci.yml)


This is a collaborative effort to build a guide that explains how rustc
works. The aim of the guide is to help new contributors get oriented
to rustc, as well as to help more experienced folks in figuring out
some new part of the compiler that they haven't worked on before.

[You can read the latest version of the guide here.](https://rustc-dev-guide.rust-lang.org/)

You may also find the rustdocs [for the compiler itself][rustdocs] useful.
Note that these are not intended as a guide; it's recommended that you search
for the docs you're looking for instead of reading them top to bottom.

[rustdocs]: https://doc.rust-lang.org/nightly/nightly-rustc

For documentation on developing the standard library, see
[`std-dev-guide`](https://std-dev-guide.rust-lang.org/).

### Contributing to the guide

The guide is useful today, but it has a lot of work still to go.

If you'd like to help improve the guide, we'd love to have you! You can find
plenty of issues on the [issue
tracker](https://github.com/rust-lang/rustc-dev-guide/issues). Just post a
comment on the issue you would like to work on to make sure that we don't
accidentally duplicate work. If you think something is missing, please open an
issue about it!

**In general, if you don't know how the compiler works, that is not a
problem!** In that case, what we will do is to schedule a bit of time
for you to talk with someone who **does** know the code, or who wants
to pair with you and figure it out. Then you can work on writing up
what you learned.

In general, when writing about a particular part of the compiler's code, we
recommend that you link to the relevant parts of the [rustc
rustdocs][rustdocs].

### Build Instructions

To build a local static HTML site, install [`mdbook`](https://github.com/rust-lang/mdBook) with:

```
> cargo install mdbook mdbook-linkcheck mdbook-toc
```

and execute the following command in the root of the repository:

```
> mdbook build
```

The build files are found in the `book` directory.

### Link Validations

We use `mdbook-linkcheck` to validate URLs included in our documentation.
`linkcheck` will be run automatically when you build with the instructions in the section above.

### Table of Contents

We use `mdbook-toc` to auto-generate TOCs for long sections. You can invoke the preprocessor by
including the `<!-- toc -->` marker at the place where you want the TOC.

### Pre-commit script

We also test that line lengths are less than 100 columns. To test this locally,
you can run `ci/check_line_lengths.sh`.

You can also set this to run automatically.

On Linux:

```bash
ln -s ../../ci/check_line_lengths.sh .git/hooks/pre-commit
```

On Windows:

```powershell
New-Item -Path .git/hooks/pre-commit -ItemType HardLink -Value <absolute_path/to/check_line_lengths.sh>
```

## How to fix toolstate failures

> **NOTE**: Currently, we do not track the rustc-dev-guide toolstate due to
[spurious failures](https://github.com/rust-lang/rust/pull/71731),
but we leave these instructions for when we do it again in the future.

1. You will get a ping from the toolstate commit. e.g. https://github.com/rust-lang-nursery/rust-toolstate/commit/8ffa0e4c30ac9ba8546b7046e5c4ccc2b96ebdd4

2. The commit contains a link to the PR that caused the breakage. e.g. https://github.com/rust-lang/rust/pull/64321

3. If you go to that PR's thread, there is a post from bors with a link to the CI status: https://github.com/rust-lang/rust/pull/64321#issuecomment-529763807

4. Follow the check-actions link to get to the Actions page for that build

5. There will be approximately 1 billion different jobs for the build. They are for different configurations and platforms. The rustc-dev-guide build only runs on the Linux x86_64-gnu-tools job. So click on that job in the list, which is about 60% down in the list.

6. Click the Run build step in the job to get the console log for the step.

7. Click on the log and Ctrl-f to get a search box in the log

8. Search for rustc-dev-guide. This gets you to the place where the links are checked. It is usually ~11K lines into the log.

9. Look at the links in the log near that point in the log

10. Fix those links in the rustc-dev-guide (by making a PR in the rustc-dev-guide repo)

11. Make a PR on the rust-lang/rust repo to update the rustc-dev-guide git submodule in src/docs/rustc-dev-guide.
To make a PR, the following steps are useful.

```bash
# Assuming you already cloned the rust-lang/rust repo and you're in the correct directory
git submodule update --remote src/doc/rustc-dev-guide
git add -u
git commit -m "Update rustc-dev-guide"
# Note that you can use -i, which is short for --incremental, in the following command
./x.py test --incremental src/doc/rustc-dev-guide # This is optional and should succeed anyway
# Open a PR in rust-lang/rust
```

12. Wait for PR to merge

Voilà!
43 changes: 42 additions & 1 deletion book.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
[book]
title = "Guide to Rustc Development"
author = "Rustc developers"
description = "A guide to developing rustc "
description = "A guide to developing rustc"

[build]
create-missing = false

[preprocessor.toc]
command = "mdbook-toc"
renderer = ["html"]

[preprocessor.mermaid]
command = "mdbook-mermaid"

[output.html]
git-repository-url = "https://github.com/rust-lang/rustc-dev-guide"
edit-url-template = "https://github.com/rust-lang/rustc-dev-guide/edit/master/{path}"
additional-js = ["mermaid.min.js", "mermaid-init.js"]

[output.html.fold]
enable = true
level = 0

[output.linkcheck]
command = "ci/linkcheck.sh"
follow-web-links = true
exclude = [
"crates\\.io",
"gcc\\.godbolt\\.org",
"youtube\\.com",
"youtu\\.be",
"dl\\.acm\\.org",
"cs\\.bgu\\.ac\\.il",
"www\\.amazon\\.com",
"www\\.rustaceans\\.org",
"play\\.rust-lang\\.org",
"tomlee\\.co"
]
cache-timeout = 86400
warning-policy = "error"

[output.html.redirect]
"/compiletest.html" = "tests/compiletest.html"
"/diagnostics/sessiondiagnostic.html" = "diagnostics/diagnostic-structs.html"
"/miri.html" = "const-eval/interpret.html"
Loading