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

Document behavior of multiple stability attributes on items #2128

Closed
wants to merge 2,517 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2517 commits
Select commit Hold shift + click to select a range
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
1cf32e0
Update CI documentation to avoid mentioning `expand-yaml-anchors`
Kobzol Apr 30, 2024
2f9b577
Add an example how to add a job to PR CI
Kobzol May 2, 2024
57f4083
Add Apple notification group (#1964)
madsmtm May 5, 2024
27b2b40
Add documentation for check-cfg by-default in UI tests
Urgau Apr 24, 2024
2d1947f
Improve FALSE sentence
Urgau Apr 25, 2024
4b692c0
Edit `Parameter Environments`'s url as it has been edited in #1953
surechen May 9, 2024
610b875
Update the rustc_interface examples for current rustc (#1974)
mattheww May 10, 2024
d01697b
Link to lint L-* labels
jieyouxu May 13, 2024
4978a88
Toc here is overkill
oriongonza May 14, 2024
6f60d12
Add note about how to pick up abandoned PRs
Kobzol May 14, 2024
79bf0ba
Fix broken link
gstjepan2 May 15, 2024
dbfb44d
Fix broken link to "Lowering"
DavidArchibald May 16, 2024
b6d4a49
add a high level explanation, and remove a disclaimer (#1982)
BoxyUwU May 17, 2024
77478e9
fix some typos
surechen May 21, 2024
f7a8759
Add Rust for Linux notification group entry
Kobzol May 21, 2024
b71f723
sync the stage0 filename
onur-ozkan May 15, 2024
ea35ee8
Introduce chapter for defining generic parameters
BoxyUwU May 27, 2024
4a705f9
Rewrite the "representing types" section to be more comprehensive
BoxyUwU May 27, 2024
6a7374b
Reviews
BoxyUwU May 31, 2024
99d2ed7
should use `&` to load completions for PowerShell (#1978)
hycinth22 Jun 4, 2024
203ade3
Fix dead links (#1988)
hycinth22 Jun 4, 2024
544d262
Document the `//@ unused-revision-names:` test header (#1991)
Zalathar Jun 8, 2024
7773507
Add run-make port initiative to the Recurring work section (#1992)
Kobzol Jun 9, 2024
92f40da
Mention `COMPILETEST_REQUIRE_ALL_LLVM_COMPONENTS` in `needs-llvm-comp…
erikdesjardins Jun 10, 2024
cb69788
run-make: add tip about quick-compile with stage0 rustc
jieyouxu Jun 10, 2024
9179f48
Add {{target}} to header substitutions
Veykril Jun 12, 2024
3f0b69b
Compiletest docs for recently-added features (#1994)
Zalathar Jun 12, 2024
521f87f
Rewrite CI documentation
Kobzol May 6, 2024
aec8216
tell about `STAGE0_MISSING_TARGETS` for new targets
onur-ozkan Jun 15, 2024
e7998be
docs: mention RUSTC_ICE=0 to suppress ICE file
jieyouxu Jun 18, 2024
5ec72a2
Fix note about compiletest header `rustfix-only-machine-applicable` (…
fmease Jun 18, 2024
6875c49
docs: document hard-resetting submodules
jieyouxu Jun 19, 2024
88cc553
Document inert vs active attributes (#1110)
Aaron1011 Jun 23, 2024
a251320
Rename `wasm32-wasi` to `wasm32-wasip1`
yoshuawuyts Apr 21, 2023
22fbccf
tests/headers: document `needs-symlink` (#2001)
jieyouxu Jun 24, 2024
c4f9678
tests: document how to run `run-make` on Windows (#2002)
jieyouxu Jun 24, 2024
f303e09
provide `libstdc++.so.6` through `LD_LIBRARY_PATH`
DianQK Jun 19, 2024
0bd5b6a
Add docs for building Fuchsia locally and in CI (#1989)
tmandry Jun 28, 2024
7ecba26
Add Rust for Linux integration tests documentation
Kobzol Jun 30, 2024
98c5f27
Add link to integration tests list
Kobzol Jun 30, 2024
d6e3a32
Update new target check-cfg instructions
Urgau Jul 1, 2024
cb5b444
Update name of Fuchsia builder (#2008)
tmandry Jul 1, 2024
108ce63
Fix grammar issue in optimize-build.md (#2009)
arjunUpatel Jul 2, 2024
5837d21
use "bootstrap" instead of "rustbuild"
onur-ozkan Jul 6, 2024
6571079
Fix typo: lists -> lints (#2011)
camelid Jul 8, 2024
09258ac
Bump chrono
camelid Jul 8, 2024
2165940
Fix chrono deprecations
camelid Jul 8, 2024
db1c4ca
Bump all other deps
camelid Jul 8, 2024
6bbd1c4
Improve doc of MIR queries & passes
Jaic1 Aug 16, 2022
8ec48c0
Typo in src/mir/passes.md
Jaic1 Aug 22, 2022
0c4d55c
refine mir passes doc
Jaic1 Jun 30, 2024
0a92516
Update adding.md (#2016)
10takla Jul 19, 2024
55477c1
MIR docs: fix borked links and update style
marxin Jul 23, 2024
9e35307
fix link
lcnr Jul 24, 2024
f49f30d
linkcheck: fix reported broken links (part 1) (#2022)
marxin Jul 24, 2024
e5cb04c
Fix invalid link to toolstate documentation (#2021)
Kobzol Jul 24, 2024
fa411dc
Fix broken links in `llvm-coverage-instrumentation.md` (#2027)
Zalathar Jul 26, 2024
fdb610d
typo (#2029)
tshepang Jul 26, 2024
4765bd7
linkcheck: fix reported broken links (part 2) (#2024)
marxin Jul 27, 2024
8f92da7
chore: fix some comments
riyueguang Jul 26, 2024
f15edb8
linkcheck: fix filtering of the source files (#2019)
marxin Aug 3, 2024
3fbb21e
Correct rust code block in *Dataflow Analysis*
xFrednet Aug 5, 2024
9c47f8c
Review comments <3
xFrednet Aug 6, 2024
ed3365e
Disable linkcheck in PRs until bugs are fixed
camelid Aug 6, 2024
43d8378
Added 'the' in chapter "Running test" subtitle "Run unit tests on the…
GabrieleC07 Aug 8, 2024
d194bc5
Update LLVM docs (#2039)
nikic Aug 12, 2024
98926c5
fix typo (#2043)
FlashWhite Aug 19, 2024
cd7f600
Replace direct http links to rustc-dev-guide.rust-lang.org to relativ…
pmundkur Aug 21, 2024
918486d
missing char (#2047)
tshepang Aug 22, 2024
4be2f54
Explain the internal `#[rustc_*]` TEST attributes used for debugging …
fmease Aug 23, 2024
369a2e9
Update `stabilization_guide.md` (#2034)
folkertdev Aug 23, 2024
fa928a6
Fix x.py reference
dkm Aug 26, 2024
8ced117
clarify the role of rustc_const_unstable
RalfJung Aug 22, 2024
75ffaf0
add section on overlap checks (#2042)
jdonszelmann Sep 6, 2024
77be3b8
improve query system documentation (#2041)
jdonszelmann Sep 6, 2024
1874fe2
fix typo maker -> marker (thanks @lholten)
jdonszelmann Sep 8, 2024
9cbb920
fixed the typo (#2058)
ibilalkayy Sep 8, 2024
236dcb9
fix/improve rdg contributing howto (#2056)
tshepang Sep 8, 2024
fc68d40
link to additional LLVM update PRs (#2055)
tshepang Sep 8, 2024
fc6bd7e
Fix a link and create an implied internal link (#2051)
pmundkur Sep 8, 2024
0ed9229
fix some comments (#2059)
cuishuang Sep 9, 2024
34cb340
Fix Typo and Remove Outdated Line About C Variadics
veera-sivarajan Sep 10, 2024
da18f77
we standardized on this more reliable command (#2061)
tshepang Sep 10, 2024
d39f68b
Reflect `x.py test`'s `--rustc-args` option being renamed to `--compi…
dianne Sep 12, 2024
af1c98d
Add docs for JS tests
notriddle Aug 23, 2024
b7c3561
Minor wording improvements
notriddle Aug 23, 2024
a307168
Clean up misleading language
notriddle Aug 23, 2024
713eeaa
Update src/rustdoc-internals/search.md
notriddle Aug 23, 2024
aa64419
Specify, more explicitly, the default behavior
notriddle Aug 23, 2024
1c83da8
Further clarification
notriddle Aug 24, 2024
8990c68
update proof tree chapter (#2054)
lcnr Sep 17, 2024
4f3126e
Fix conditions lowering text for enums with no fields (#2066)
spastorino Sep 18, 2024
ed0e273
Remove chalk is owned by WG-traits
spastorino Sep 18, 2024
06b80b1
Emphasize how to run a single tool test (#2070)
adwinwhite Sep 20, 2024
57634df
Edit a sentence for clarity (#2071)
joculatrix Sep 23, 2024
0f7f7df
Add advice about submitting potentially hard-to-review PRs (#2036)
jieyouxu Sep 23, 2024
a8a77cb
fix broken links (#2063)
max-heller Sep 23, 2024
48bf61f
Add remark on required free disk space (#2073)
jieyouxu Sep 23, 2024
555f3de
chore: add missing `.` (#2074)
marcoieni Sep 23, 2024
fc02fea
Note lldb debuginfo requires `python310.dll` to be present in `PATH`
jieyouxu Sep 24, 2024
2a67e13
Describe `.git-blame-ignore-rev`
jieyouxu Sep 23, 2024
4fa05b6
Document `#[rustc_default_body_unstable]`
dianne Sep 17, 2024
7cffa3b
Fix getting diagnostics example
Sep 18, 2024
6aa536d
Document `crashes` test suite
jieyouxu Sep 24, 2024
206f42b
Update src/tests/compiletest.md
Noratrieb Sep 24, 2024
957ea06
Revise wording to not imply *only* Python 3.10 can be installed
jieyouxu Sep 24, 2024
b65af7c
Fix `is_diagnostic_item()` example
trevyn Jul 13, 2024
ec77cdd
mention rustc's stable-through-unstable bug being fixed
dianne Sep 17, 2024
c612fc3
feat: Add section about partial clones with `git clone --filter='blob…
futile Aug 4, 2024
6b70577
Update name-resolution.md
Tbkhi Mar 11, 2024
172d38e
Update name-resolution.md
Tbkhi Mar 12, 2024
cb22326
Minor edits
Noratrieb Sep 24, 2024
23bf5ec
Move example code block to paragraph referencing it
camelid May 29, 2024
6977f20
Use 2021 edition for example code playground link
camelid May 29, 2024
2edd9e0
Update macro-expansion.md
Tbkhi Mar 10, 2024
5a07a85
Update macro-expansion.md
Tbkhi Mar 11, 2024
749e5ba
additional changes to links and some text
Tbkhi Mar 11, 2024
a4c880e
Update macro-expansion.md
Tbkhi Mar 11, 2024
247519e
Update macro-expansion.md
Tbkhi Mar 12, 2024
77b005b
Minor edits
Noratrieb Sep 24, 2024
42e30f8
Update the-parser.md
Tbkhi Mar 10, 2024
26558f8
Update the-parser.md
Tbkhi Mar 12, 2024
91d6ab9
minor edits
Noratrieb Sep 24, 2024
cba023d
Update syntax-intro.md
Tbkhi Mar 10, 2024
5317005
minor edits
Noratrieb Sep 24, 2024
c21730a
improve rustc-driver.md
Tbkhi Mar 10, 2024
131e86b
Update serialization.md
Tbkhi Feb 26, 2024
4034a8e
updates documentation
Tbkhi Mar 5, 2024
3c4ef7c
minor edits
Noratrieb Sep 24, 2024
bb5cdc1
Update memory.md
Tbkhi Feb 25, 2024
37e0c09
Update salsa.md
Feb 25, 2024
4e34e79
doc edits
Tbkhi Mar 5, 2024
e7e1a20
minor edits
Noratrieb Sep 24, 2024
afdad07
Update rustdoc build instructions
fmease Feb 28, 2024
b20c899
Update compiler-src.md
Feb 24, 2024
69b7b0b
Clarify how to disable warnings in deps
nyurik Jul 18, 2024
bf46b0f
Apply suggestions from code review
nyurik Sep 23, 2024
451d43f
elaborate on warnings
Noratrieb Sep 24, 2024
2562a10
Fix file paths to section 35.1 & 35.2 example code (#2078)
CBSpeir Sep 25, 2024
776b1ad
building/suggested: Add instructions for Emacs & Helix (#2080)
mrkajetanp Sep 28, 2024
abd7ea6
Add documentation for `{{rust-src-base}}` (#2079)
Urgau Sep 29, 2024
e79615d
fixups (#2082)
fmease Oct 3, 2024
7a46f88
Rename "object safe" to "dyn compatible" (#2083)
fmease Oct 3, 2024
6bd436a
update `x install` documentation (#2084)
onur-ozkan Oct 3, 2024
a507102
Fixed links to rust-analyzer configs for Emacs and Helix (#2087)
YohDeadfall Oct 6, 2024
1be6249
[Testing 1/2] Revise testing chapters excluding the directives chapte…
jieyouxu Oct 7, 2024
e17bfa5
[Testing 2/2] Revise revisions docs (#2089)
jieyouxu Oct 7, 2024
b82e917
building: Update instructions for ./x setup editor
mrkajetanp Oct 5, 2024
0cd0a74
Document `bootstrap` integration with `rustc-perf` (#2005)
Kobzol Oct 7, 2024
bbdfd18
Revise test naming advice to discourage using issue numbers alone
jieyouxu Oct 7, 2024
07bc9ca
rustdoc: docs for search deduplication (#1850)
notriddle Oct 7, 2024
2150561
Purge `run-pass-valgrind` mentions
jieyouxu Oct 7, 2024
971f809
Document compiletest directives `ignore-coverage-map` and `ignore-cov…
Zalathar Oct 9, 2024
2f06bb1
Rename `needs-profiler-support` to `needs-profiler-runtime` (#2095)
Zalathar Oct 9, 2024
65d87ee
Update bootstrapping.md (#1900)
Tbkhi Oct 13, 2024
59d94ea
Add the WASM | WASI | Emscripten notification groups (#2100)
juntyr Oct 21, 2024
49afa1d
Update compiler-src.md (#2102)
lolbinarycat Oct 24, 2024
cc0e2c9
Advice on auto-formatting C++ code (#2104)
Zalathar Oct 25, 2024
43df628
update const stability docs (#2098)
RalfJung Oct 26, 2024
5a25078
Update current status of diagnostics translation infra (#2105)
jieyouxu Oct 28, 2024
124513e
Describe why and how to use a separate build directory for rust-analy…
Zalathar Oct 29, 2024
fd1ce74
Fix internal and incomplete links (#2107)
thomasnyman Oct 31, 2024
7ad3157
update rfl ci job policy (#2108)
davidtwco Oct 31, 2024
0dc7845
Async closures chapter
compiler-errors Nov 2, 2024
7764847
fix permalinks
compiler-errors Nov 2, 2024
433e0f6
Fix rustc-related links that are 404 right now (#2112)
marxin Nov 2, 2024
09bb84a
Try to fix footnotes
compiler-errors Nov 2, 2024
01d0c4e
Ok now linkify
compiler-errors Nov 2, 2024
a7a5729
Describe how to revert a PR (#2118)
DianQK Nov 3, 2024
2f1d8d8
Fix borked links (#2119)
marxin Nov 3, 2024
60ab43f
Add redirects for integration-testing and headers (#2092)
jieyouxu Nov 4, 2024
f715ad7
Fix and update docs for `needs-force-clang-based-tests` (#2085)
jieyouxu Nov 4, 2024
6ff146c
Describe `minicore` test auxiliary and directive (#2097)
jieyouxu Nov 4, 2024
53d4920
Update for recent dataflow simplifications. (#2121)
nnethercote Nov 4, 2024
693b6d2
Fix minicore.rs link (#2122)
marxin Nov 4, 2024
a319678
Fix broken links (#2123)
marxin Nov 4, 2024
f8e6a86
Remove an mdbook workaround (#2124)
fmease Nov 4, 2024
b4725b4
Slightly fix up the glossary (#2127)
fmease Nov 4, 2024
6a5accd
Add a link for the `reference` compiletest header (#2096)
ehuss Nov 4, 2024
36f61df
diagnostics: lists should use the Oxford comma
onkoe Oct 8, 2024
59816a0
update const stability docs (#2111)
RalfJung Nov 5, 2024
b1f4417
Document behavior of multiple stability attributes on items
dianne Nov 8, 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à!
59 changes: 56 additions & 3 deletions book.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,58 @@
[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",
# The bug listing URL works only if an user is logged in, otherwise one gets 404.
"github\\.com/issues\\?",
# Handle: connection closed before message completed
"microsoft\\.com/en-us/research/publication/",
]
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"
"/tests/integration.html" = "ecosystem.html"
"/tests/headers.html" = "directives.html"
Loading