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

Elaborate on dataflow outputs for region constraints #1969

Open
wants to merge 2,341 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2341 commits
Select commit Hold shift + click to select a range
17fe3e9
fix_typo
Ddystopia Jun 26, 2023
f8e4d5c
Define more lint terms
ehuss Apr 29, 2023
7fa8c55
fix link
tshepang Jun 28, 2023
dda77e0
Fix some links
ehuss Jun 27, 2023
2cbc4c1
Reword `messages.ftl` example.
ehuss Jun 28, 2023
dd45ecf
Move "Adding a new feature gate" to the "Implementing new features" c…
jyn514 Jun 24, 2023
8ff4abb
distinguish language and library processes more consistently
jyn514 Jun 24, 2023
5a6171c
move the Breaking Changes section later in the guide
jyn514 Jun 24, 2023
855a295
fix broken link
jyn514 Jun 24, 2023
c01a1fa
cleanup the "tracking issue" section
jyn514 Jun 24, 2023
1690634
Inline alternate x.py invocations from the rust-lang/rust readme
jyn514 Jun 24, 2023
c8213e1
Improve Windows docs
jyn514 Jun 24, 2023
7267158
include rustc-dev-guide's own issues in suggested search
jyn514 Jun 29, 2023
d3034ae
Change `./x.py` into `./x`
sslime336 Jun 30, 2023
50dbcba
Change `x.py` into `x`, add explanation for `x`
sslime336 Jun 30, 2023
37ffa30
Fix line length out of limit
sslime336 Jun 30, 2023
8648005
typo
tshepang Jun 30, 2023
07f16bb
Try to avoid confusion
sslime336 Jul 1, 2023
605c35a
OwningRef exists no more
tshepang Jul 2, 2023
07c92b8
typo
tshepang Jun 28, 2023
49b868e
update link
tshepang Jun 29, 2023
68967d7
fix link
tshepang Jul 2, 2023
a0f596f
replace dead link (#1717)
tshepang Jul 3, 2023
e592090
tests/run-make files have moved
tshepang Jul 2, 2023
95ce237
document `.x test --rustc-args` option
lqd Jul 3, 2023
0658909
ty::ConstKind has moved (#1724)
tshepang Jul 7, 2023
6d5b3db
various fixes/improvements to Contributing chapter (#1723)
tshepang Jul 8, 2023
b10654a
improve explanation of placing tests in separate file (#1721)
tshepang Jul 8, 2023
c7d6710
Fix a bug in getting-started.md (#1726)
ismailarilik Jul 9, 2023
b5a12d9
fix: update link to function coverage (#1727)
emmanuel-ferdman Jul 9, 2023
492a6a8
Improve cleanup-crew.md with an example post
ismailarilik Jul 10, 2023
1726dad
add section for normalization with the new solver
lcnr Jul 11, 2023
59f1356
split file and replace with deep dive doc
BoxyUwU Jul 11, 2023
6e0f9a2
Gats isnt the only cool kid anymore
BoxyUwU Jul 11, 2023
7a8d862
caps is so important
BoxyUwU Jul 11, 2023
ec67371
Update src/early-late-bound.md
compiler-errors Jul 11, 2023
88340e1
remove duplicated reference in about-this-guide.md
ismailarilik Jul 12, 2023
3448f66
linked issue is closed (#1729)
tshepang Jul 12, 2023
0daab93
coverage code has moved (#1728)
tshepang Jul 12, 2023
2f05d62
fix(how-to-build-and-run): remove a wrong paragraph
ismailarilik Jul 13, 2023
a6896cf
fix(how-to-build-and-run): fix a typo ("fromer" -> "former")
ismailarilik Jul 13, 2023
3ed56e7
make it read better
tshepang Jul 14, 2023
c514440
fix(suggested): remove an unnecessary and confusing statement
ismailarilik Jul 14, 2023
6e6f620
generic_arguments.md: substs -> GenericArgs
mdibaiee Jul 14, 2023
f15fd8b
fix(duplicate): remove unnecessary duplicate word
ismailarilik Jul 18, 2023
ec0a5f1
refactor(tests/ui): remove unnecessary duplicate word
ismailarilik Jul 18, 2023
d5d3932
refactor(test/headers.md): make the meaning more obvious
ismailarilik Jul 18, 2023
151dcc1
refactor(tests/headers): remove duplicate list item
ismailarilik Jul 18, 2023
d2a9df4
refactor(profiling/with_perf): remove a wrong to be verb
ismailarilik Jul 19, 2023
e24c499
fix(git.md): remove a confusing end of sentence character
ismailarilik Jul 21, 2023
246dd25
fix(walkthrough.md) add a comma operator to eliminate ambiguity
ismailarilik Jul 22, 2023
2c85732
refactor(git.md): make git-scm links clickable
ismailarilik Jul 21, 2023
214b396
refactor(git.md) use `<>` instead of long `[...](...)` syntax for pla…
ismailarilik Jul 22, 2023
03dbdbe
fix(about.md): use `a` instead of `an`
ismailarilik Jul 24, 2023
9ddd128
feat(fuzzing.md): make `halfempty` word a link
ismailarilik Jul 24, 2023
ff84b69
fix(salsa.md): remove duplicate "To Be" verb
ismailarilik Jul 27, 2023
20b988c
fix(salsa.md): add punctuation to prevent confusion
ismailarilik Jul 27, 2023
fb00c85
fix(serialization.md): add a necessary plural suffix
ismailarilik Jul 27, 2023
25ca6c5
fix(serialization.md): fix the name of a derive macro
ismailarilik Jul 27, 2023
d9128a9
fix(macro-expansion.md): fix the article `an` to `a` to have uninterr…
ismailarilik Jul 28, 2023
24eebb6
fix(name-resolution): remove unnecessary closing paranthesis
ismailarilik Jul 30, 2023
218da21
fix(visitor.md): fix a type name in a code sample
ismailarilik Aug 1, 2023
8cd3eb9
Add RPITIT documentation (#1764)
spastorino Aug 3, 2023
da891f2
Update to new warning attribute
nicklimmm Aug 7, 2023
fb7ec2c
Improve clarity about attribute applicability
nicklimmm Aug 8, 2023
d68d69a
feat(part-5-intro): make "Part 5" obvious
ismailarilik Jul 25, 2023
dfa37d5
fix(part-2-intro): remove the phrase "from Part 1" which is not exist
ismailarilik Aug 7, 2023
49a22ea
revert(part-2-intro): revert 2f0aa1e
ismailarilik Aug 11, 2023
4fa0caa
revert(part-5-intro): revert 4806958
ismailarilik Aug 11, 2023
3c5c746
refactor(parts): remove part numbers to be consistent
ismailarilik Aug 11, 2023
b123ab4
fix: stabilize debugger_visualizer
emmanuel-ferdman Aug 13, 2023
101bfc8
Add dropck documentation (#1767)
spastorino Aug 18, 2023
973e4f3
Update outdated doc for types (#1768)
chenyukang Aug 20, 2023
59030cb
Update suggested.md
Absobel Aug 21, 2023
28713ff
update internal terminology: Substs -> GenericArgs
chenyukang Aug 20, 2023
40a4798
avoid link rot
tshepang Aug 21, 2023
94bd1b1
fix link
tshepang Aug 21, 2023
745d796
missing space
tshepang Aug 21, 2023
9061333
fix link
tshepang Aug 21, 2023
844d581
Fix broken links format
chenyukang Aug 22, 2023
196b7f4
avoid repetition
tshepang Aug 22, 2023
0322fb4
Add additional licensing concerns to docs
wesleywiser Aug 22, 2023
8fd4dd1
Fix long lines
wesleywiser Aug 22, 2023
24c8e8c
Suggest enabling patch-binaries-for-nix in `shell.nix` (#1774)
eopb Aug 22, 2023
17fba0e
it is lower-case (#1772)
tshepang Aug 27, 2023
2c22cee
remove stray word (#1773)
tshepang Aug 27, 2023
0a88668
indicate full hierarchy of config option (#1776)
tshepang Aug 27, 2023
0985f5d
share link target (#1740)
tshepang Aug 27, 2023
8082f48
date-check: test suites/classes using "revisions" (#1738)
tshepang Aug 27, 2023
fefec88
make link more pleasant to eye (#1777)
tshepang Aug 27, 2023
e453e38
llvm updates (#1761)
tshepang Aug 27, 2023
64056ea
remove extraneous word (#1779)
tshepang Aug 27, 2023
9bdf3d3
coverage tests have moved, twice (#1780)
tshepang Aug 27, 2023
51bae06
remove (excessive) indentation (#1781)
tshepang Aug 27, 2023
78c9b0b
Reword sentence about using `./x` over `./x.py`
eopb Aug 27, 2023
6ec5335
link std-dev-guide from landing page (#1699)
zahash Aug 29, 2023
1f77525
move placement of std-dev-guide link (#1699)
zahash Aug 29, 2023
f83c46a
1675 add a 'Squash your commits' header to 'Advanced Rebasing' sectio…
zahash Aug 29, 2023
d61a12a
1675 move 'failed to push some refs' into its own section
zahash Aug 29, 2023
b02c792
Update minor how-to-build-and-run.md spelling mistake
kenshih Aug 31, 2023
2ffa3f5
Set max line length in `.editorconfig` to 100 (#1788)
Kobzol Sep 5, 2023
083cbb4
Add section about building an optimized version of `rustc`
Kobzol Sep 4, 2023
054eb75
Review changes
Kobzol Sep 5, 2023
b41735f
Updated index.md to add a command which can show unoptimized MIR
Prashant-Shekhar-Rao Sep 7, 2023
22500ee
typo
tshepang Sep 8, 2023
be5a669
grammar
tshepang Sep 8, 2023
08bb147
make link more pleasant to eye too (#1778)
tshepang Sep 11, 2023
2eb01f9
Document the `coverage-map` and `run-coverage` test suites
Zalathar Sep 11, 2023
aafa886
Revise the docs for coverage instrumentation tests
Zalathar Sep 11, 2023
ed55e7d
Clarify that `run-coverage` only runs in some of the CI jobs
Zalathar Sep 12, 2023
6b347d2
fix type name (#1792)
tshepang Sep 15, 2023
02a966c
explain the MIR const vs TY const situation
RalfJung Sep 16, 2023
5dbd029
add doc and move existing stuff around
BoxyUwU Sep 18, 2023
cb4c521
line length limit
BoxyUwU Sep 18, 2023
2025284
Remove outdated references to coverage debug code (#1797)
Zalathar Sep 21, 2023
c41116d
Modify build instructions for optimized build (#1795)
Kobzol Sep 21, 2023
a13b7c2
impl traits
compiler-errors Sep 24, 2023
3735857
test headers: fix `compile-flags` example
eopb Sep 27, 2023
b7e20c4
update rustc_driver examples (#1803)
y21 Oct 5, 2023
b98af7d
update new trait solver docs (#1802)
lcnr Oct 5, 2023
1a018c8
[suggested.md] `changelog-seen` -> `change-id`` in `shell.nix`
eopb Oct 10, 2023
2c65ca9
Document subtle implied bounds issue in RPITIT inference (#1807)
compiler-errors Oct 14, 2023
99157af
Start a chapter about the evolving const effect system (#1808)
oli-obk Oct 18, 2023
3febac0
recommend `unpretty=hir` alongside `unpretty=hir-tree`
eopb Oct 10, 2023
b0ee9ec
Add WF to glossary (#1810)
ouz-a Oct 22, 2023
57061ca
Update name of "active" features to "unstable" (#1814)
nicholasbishop Oct 29, 2023
92cb635
remove change-id from sample build configuration (#1813)
onur-ozkan Oct 29, 2023
7c28596
fixing author of "You Can't Spell Trust Without Rust"
betawave Oct 31, 2023
cd0eabf
Add some documentation for unsizing
compiler-errors Nov 1, 2023
f42a31f
Update some outdated descriptions of coverage instrumentation
Zalathar Oct 21, 2023
77dbe57
add a new type system invariant
lcnr Nov 6, 2023
2712dfe
Update documentation for coverage tests
Zalathar Nov 8, 2023
a07ec82
Fix typo in contribution walkthrough (#1824)
DavidSpickett Nov 10, 2023
ddb8b13
Add link for unsize.md
compiler-errors Nov 18, 2023
4d43a3b
emphasize that the experts map is not up to date
nouritsu Nov 21, 2023
f4c8255
Add back the `canonicalization` chapter. (#1532)
crlf0710 Nov 25, 2023
7620355
Add explanations on how to run rustc_codegen_gcc tests (#1821)
GuillaumeGomez Nov 27, 2023
03113ba
notification groups: add information about how to ping them to the re…
RalfJung Nov 27, 2023
904bb5a
Update how-to-build-and-run.md
krasimirgg Nov 27, 2023
2d11bd6
Replace experts map with reviewers from triagebot
spastorino Dec 5, 2023
993c157
Fix typo of unused_parens (#1832)
ehuss Dec 5, 2023
44b2f27
Remove mentions of plugin lints (#1833)
ehuss Dec 6, 2023
d2ca260
Add a chapter on editions. (#1835)
ehuss Dec 12, 2023
eb0273a
Remove feature edition fields. (#1836)
ehuss Dec 13, 2023
843c390
Move Editions chapter to "Contributing to Rust". (#1838)
ehuss Dec 14, 2023
0610665
add a mailmap
jyn514 Dec 17, 2023
ef41fc0
bootstrapping: Clarify that stage0 std code is not executed to produc…
Enselic Dec 19, 2023
038010b
Suggest `gcc_multi` to make `mir_opts` run on nixos (#1841)
Nadrieril Dec 19, 2023
cb22c58
Fix typo in unsize docs (#1843)
compiler-errors Dec 29, 2023
84ea9ec
Add a description of `unpretty=hir` to the HIR docs (#1842)
mox692 Dec 29, 2023
d13e851
Prominently mention `profiler = true` on the coverage page
Zalathar Dec 30, 2023
5606d30
Add guide for rustdoc search implementation (#1846)
notriddle Jan 6, 2024
45fa404
Explain the important concepts of exhaustiveness checking
Nadrieril Dec 4, 2023
8042fcc
Correct the link to rust reference
Arthur-Milchior Jan 12, 2024
fc36182
Mention label has-merge-commits
fmease Jan 14, 2024
4af29d1
Add guidelines for backport-accepted PRs
fmease Jan 14, 2024
f3f15a9
update old bootstrap docs
onur-ozkan Jan 15, 2024
1dc1152
Remove outdated references to `-Z dump-mir-spanview`
Zalathar Jan 16, 2024
4767d5a
Document unsafety checking (#1847)
matthewjasper Jan 20, 2024
bd181b2
update some of the diagnostic translations info (#1711)
tshepang Jan 20, 2024
a0eee2c
Add some explanations for frequently used rustbot commands (#1849)
chenyukang Jan 20, 2024
4b5116a
Add a perf. bot command and a link to its help page
Kobzol Jan 19, 2024
c2717f6
Update examples (#1856)
ShoyuVanilla Jan 21, 2024
4401e47
Get diagnostics directly in `rustc-driver-getting-diagnostics` exampl…
ShoyuVanilla Jan 21, 2024
a79d236
Clarify debugging graph dependency (#1862)
Arthur-Milchior Jan 27, 2024
5a7b5f8
Followup to #1862 (#1864)
Arthur-Milchior Jan 27, 2024
9dbff1e
update link to rustc dependencies (#1869)
the8472 Jan 28, 2024
7c6fe0b
Clarify what rt.rs is. (#1876)
Arthur-Milchior Jan 28, 2024
f8f61f9
Add link in salsa (#1866)
Arthur-Milchior Jan 28, 2024
3329715
Fix some links (#1865)
JohnTitor Jan 28, 2024
ec287e3
Upgrade actions to use Node.js v20 (#1863)
JohnTitor Jan 28, 2024
4875b60
Fix some broken links (#1877)
davidsemakula Jan 29, 2024
ea1767d
Replace letters by foo, bar and buz in lexing example (#1870)
Arthur-Milchior Jan 29, 2024
11aa615
Improving macro expansion section (#1875)
Arthur-Milchior Jan 29, 2024
9f9c9d2
Add links for arena and interning. (#1868)
Arthur-Milchior Jan 29, 2024
9115025
Update uses of renamed BoxMeUp to PanicPayload
syvb Jan 29, 2024
fd6ed0d
Update for upcoming markdown changes. (#1880)
ehuss Feb 7, 2024
af8e2fe
Rename occurrences of 'delay_span_bug' to 'span_delayed_bug'
gurry Feb 8, 2024
e3d8733
Some updates for recent diagnostics changes.
nnethercote Feb 9, 2024
2c8856a
fix sentence
tshepang Feb 8, 2024
1f30cc7
separate link target from normal content
tshepang Feb 8, 2024
e3db734
fix update llvm build command
gnana-ganesh-tw Feb 13, 2024
aa79783
updating-llvm.md: command does not work (#1887)
tshepang Feb 13, 2024
91332ec
Make git rebase commands more bulletproof (#1889)
Kobzol Feb 14, 2024
2c6117b
Update docs about ui tests now using `//@` headers
oli-obk Feb 12, 2024
2c01b49
Update src/tests/ui.md
compiler-errors Feb 16, 2024
75aad4b
Specify ui test suite directives and add note on ignore-tidy directives
jieyouxu Feb 16, 2024
2ae8949
Remove reference to -Z ast-json and -Z ast-json-noexpand
mattheww Feb 17, 2024
bafd382
Fix more links (#1884)
JohnTitor Feb 21, 2024
a29bab8
Add notes on tweak rust-analyzer.check.overrideCommand (#1890)
chenyukang Feb 21, 2024
7b0ef5b
Update compiletest directives to be in `ui_test` style `//@`
jieyouxu Feb 22, 2024
a539558
add implied bounds doc (#1915)
lcnr Feb 29, 2024
231c30f
opaque types in new solver (#1918)
lcnr Mar 1, 2024
9ef55c5
make shell.nix better (#1858)
Noratrieb Mar 1, 2024
cf9fb88
Add some more details on feature gating (#1891)
RossSmyth Mar 1, 2024
a9ab50b
Update run-make test description (#1920)
jieyouxu Mar 1, 2024
d866c38
Use different type in an example (#1908)
Arthur-Milchior Mar 1, 2024
fbea746
Add compiletest docs for FileCheck prefixes and `//@ filecheck-flags:…
Zalathar Mar 1, 2024
3af8b74
next-solver: document caching (#1923)
lcnr Mar 4, 2024
0d04d71
unfk links
lcnr Mar 4, 2024
e082dc6
and again
lcnr Mar 4, 2024
d43fff7
Update overview.md (#1898)
Tbkhi Mar 4, 2024
f863101
Document that test names cannot contain dots (#1927)
jieyouxu Mar 8, 2024
aa2a0d1
Update rustc-driver-getting-diagnostics.md
Tbkhi Mar 10, 2024
8a5d647
update rustc-driver-interacting-with-the-ast.md (#1930)
Tbkhi Mar 11, 2024
020d4a8
Update bibliography.md (#1912)
Tbkhi Mar 11, 2024
7d6e6c6
More updates for recent diagnostics changes.
nnethercote Mar 11, 2024
144e535
typos
tshepang Mar 13, 2024
dbee504
Extract Bootstrap into its own section (#1939)
jieyouxu Mar 13, 2024
8587c9b
Update test-implementation.md (#1937)
Tbkhi Mar 13, 2024
e864c02
Update rustdoc-internals.md (#1911)
Tbkhi Mar 13, 2024
4cb2b3b
Reflect rustc_codegen_cranelift move
sanxiyn Mar 18, 2024
d4c8701
typo
tshepang Mar 19, 2024
db46d3e
Fix broken link in chapter '1. How to build and run the compiler'
CBSpeir Mar 22, 2024
87894b0
canonicalization is out of date
lcnr Mar 21, 2024
a10a29a
explore significant changes with the new solver
lcnr Mar 21, 2024
66d43a8
is this sensible? idk
lcnr Mar 21, 2024
92066e7
Update src/solve/significant-changes.md
lcnr Mar 22, 2024
0c4c6d7
Update src/solve/significant-changes.md
lcnr Mar 22, 2024
f1698b1
explain rigid aliases
lcnr Mar 22, 2024
8f6a4f6
add chapter to summary
lcnr Mar 22, 2024
ffa246b
Rename AstConv to HIR ty lowering
fmease Feb 27, 2024
45d0afb
add opaque-types-region-inference-restrictions
aliemjay Mar 27, 2024
1ddb90c
summary: opaque-types-region-inference-restrictions
aliemjay Mar 27, 2024
35e77b8
Fix some comments
JohnEndson Mar 28, 2024
f109549
Delete length check (#1952)
Noratrieb Mar 30, 2024
f66b472
Add quickstart for how to build and run the compiler (#1951)
Noratrieb Mar 31, 2024
317a4e2
Initial rewrite
BoxyUwU Apr 1, 2024
f2adb25
Change location in guide
BoxyUwU Apr 1, 2024
01810f4
reviews
BoxyUwU Apr 1, 2024
e8cd1d9
Reorganise into subchapters and explain `Reveal`
BoxyUwU Apr 1, 2024
84bbfc3
Fix some broken links
BoxyUwU Apr 1, 2024
4375d85
Replace -Zno-parallel-llvm with -Zno-parallel-backend
TimNN Apr 3, 2024
5d1fdd3
Fix some broken links under bootstrapping. (#1958)
pmundkur Apr 6, 2024
0b6f210
Add needs-threads header command (#1943)
ehuss Apr 6, 2024
b735c7e
Add basic docs for the new `aux-bin` header (#1942)
Enselic Apr 6, 2024
55f79b5
Add docs for sharded descriptions
notriddle Apr 6, 2024
b77a34b
Explicitly mention compiletest directives are supported in rmake.rs (…
jieyouxu Apr 6, 2024
61c1e83
compiletest: specify which special env var and which particular CI jo…
jieyouxu Apr 8, 2024
9fbba97
chore: fix some typos in conments
needsure Apr 9, 2024
f703523
compiletest: clarify that headers must be one header per line
jieyouxu Apr 10, 2024
07425fe
Add a note about checks with multiple revisions (#1963)
tgross35 Apr 13, 2024
e5c5fc3
typo traige->triage
correabuscar Apr 28, 2024
4c97ad5
Rename `-Z verbose` to `-Z verbose-internals`
ohno418 Apr 30, 2024
37d8612
Update compiler-debugging.md
amandasystems Apr 30, 2024
b08f051
Update dataflow.md to mention region graphs
amandasystems Apr 30, 2024
2c521d5
Add images of graphs
amandasystems May 2, 2024
dc63e54
Accept @lqd's nit about SCC edges
amandasystems Aug 1, 2024
782c7f3
Update src/mir/dataflow.md
amandasystems Aug 1, 2024
5665927
Move Borrow checker debugging into its own chapter
amandasystems Aug 1, 2024
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
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[src/*]
end_of_line = lf
insert_final_newline = true
max_line_length = 100

[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
74 changes: 74 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
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.12.6
MDBOOK_TOC_VERSION: 0.11.2
DEPLOY_DIR: book/html
BASE_SHA: ${{ github.event.pull_request.base.sha }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
# linkcheck needs the base commit.
fetch-depth: 0

- name: Cache binaries
id: mdbook-cache
uses: actions/cache@v4
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@v4
with:
path: |
~/book/linkcheck
key: ${{ runner.os }}-${{ hashFiles('./book/linkcheck') }}

- 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
48 changes: 48 additions & 0 deletions .github/workflows/date-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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@v4

- 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@v7
with:
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.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title,
body,
});
console.log('Opened issue.');
} else {
console.log('No dates to triage.');
}
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
book

# prevent accidental changes
book.toml

ci/date-check/target/

# Generated by check-in.sh
pulls.json
5 changes: 5 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Jynn Nelson <[email protected]> <[email protected]>
Jynn Nelson <[email protected]> <[email protected]>
Jynn Nelson <[email protected]> <[email protected]>
Jynn Nelson <[email protected]> <[email protected]>
Jynn Nelson <[email protected]>
9 changes: 9 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cff-version: 1.2.0
message: If you use this guide, please cite it using these metadata.
title: Rust Compiler Development Guide (rustc-dev-guide)
abstract: A guide to developing the Rust compiler (rustc)
authors:
- name: "The Rust Project Developers"
date-released: "2018-01-16"
license: "MIT OR Apache-2.0"
repository-code: "https://github.com/rust-lang/rustc-dev-guide"
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**: [[email protected]](mailto:[email protected])

* 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/policies/code-of-conduct) of the Rust organization.
111 changes: 108 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,108 @@
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 mdbook-mermaid
```

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

```
> mdbook build --open
```

The build files are found in the `book/html` 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.

## 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 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à!
53 changes: 50 additions & 3 deletions book.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
[book]
title = "Guide to Rustc Development"
author = "Rustc developers"
description = "A guide to developing rustc "
title = "Rust Compiler Development Guide"
author = "The Rust Project Developers"
description = "A guide to developing the Rust compiler (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.search]
use-boolean-and = true

[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",
"marketplace\\.visualstudio\\.com",
"objects\\.githubusercontent\\.com"
]
cache-timeout = 86400
warning-policy = "error"

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