Skip to content

Tc/precise capturing #1

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

Merged
merged 679 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
679 commits
Select commit Hold shift + click to select a range
27afd64
Update operator-expr.md
cameraMeasurementTech Oct 11, 2023
a68f808
Merge pull request #1409 from compiler-errors/ref
cameraMeasurementTech Oct 14, 2023
ae46af5
pure requires readonly or nomem
cameraMeasurementTech Oct 17, 2023
8304558
Update src/expressions/operator-expr.md
cameraMeasurementTech Oct 26, 2023
937e6f7
Update operator-expr.md
cameraMeasurementTech Oct 26, 2023
6d7a94d
Merge pull request #1415 from coastalwhite/stabilize-riscv-target-fea…
cameraMeasurementTech Oct 30, 2023
0010760
Merge pull request #1401 from joshlf/patch-2
cameraMeasurementTech Oct 30, 2023
f5ce6b8
Stabilize Wasm target features that are in phase 4 and 5
cameraMeasurementTech Oct 31, 2023
a88cf04
tokens.md: Add <- to the Punctuation table
cameraMeasurementTech Nov 1, 2023
8e41cf4
Merge pull request #1413 from RalfJung/nofence
cameraMeasurementTech Nov 4, 2023
4baaf1a
Remove extra blank lines.
cameraMeasurementTech Nov 4, 2023
b6e8473
Merge pull request #1417 from joshlf/patch-3
cameraMeasurementTech Nov 4, 2023
289f9b3
paths.md: document standalone `self` in a method body
cameraMeasurementTech Nov 19, 2023
b08d6f6
Reference wildcard patterns from underscore expr
cameraMeasurementTech Nov 20, 2023
51a3400
use md extension instead of html
cameraMeasurementTech Nov 21, 2023
b670e5d
Merge pull request #1428 from riking/patch-1
cameraMeasurementTech Nov 21, 2023
d2d9e75
Merge pull request #1427 from mattheww/2023-11_lone_self
cameraMeasurementTech Nov 21, 2023
93bfeea
type-layout.md: Warn about repr(align)/repr(packed) and field order
cameraMeasurementTech Nov 22, 2023
6e1e315
Merge pull request #1430 from joshlf/patch-2
cameraMeasurementTech Nov 22, 2023
d6675fc
Document C string literal tokens (`c"..."` and `cr#"..."#`).
cameraMeasurementTech Nov 3, 2023
96086c3
Merge pull request #1423 from jmillikin/c-str-literals
cameraMeasurementTech Dec 2, 2023
8dc98ab
Fix note on `self` coercion
cameraMeasurementTech Dec 2, 2023
6d5d304
Merge pull request #1431 from madsmtm/fix-self-coercion-note
cameraMeasurementTech Dec 4, 2023
dc509bd
Document object unsafety of async-fn-in-trait
cameraMeasurementTech Dec 8, 2023
aae18b4
Merge pull request #1435 from kpreid/patch-1
cameraMeasurementTech Dec 10, 2023
532556e
Clarify that `asm!` blocks can be duplicated or deduplicated by the c…
cameraMeasurementTech Dec 25, 2023
0733f04
pure asm blocks must terminate
cameraMeasurementTech Dec 26, 2023
eedb52b
adjust wording
cameraMeasurementTech Dec 26, 2023
1d8782e
Use proper footnote for number literals `_` separator note
cameraMeasurementTech Dec 29, 2023
1a7ab4a
Use real markdown footnote for `#` sets.
cameraMeasurementTech Dec 29, 2023
e5835b0
Merge pull request #1444 from Jules-Bertholet/patch-1
cameraMeasurementTech Dec 29, 2023
f4a89e9
Document `target_abi`
cameraMeasurementTech Jan 4, 2024
9679e42
Merge pull request #1424 from mattheww/2023-11_larrow
cameraMeasurementTech Jan 8, 2024
bef84da
Literal expressions: document non-C-string textual literals
cameraMeasurementTech Jan 14, 2024
fb5b219
tokens.md: remove sentence about the type of byte string literals
cameraMeasurementTech Jan 21, 2024
5c89c92
Move discussion of string continuations from tokens.md to literal-exp…
cameraMeasurementTech Jan 22, 2024
f52ec62
tokens.md: link to specific headings in literal-expr.md
cameraMeasurementTech Jan 22, 2024
697d7a5
Update reference for https://github.com/rust-lang/rust/pull/119172.
cameraMeasurementTech Jan 22, 2024
d84235b
Merge pull request #1452 from mattheww/2024-01_string_literal_expr
cameraMeasurementTech Jan 27, 2024
bfe35d7
Merge pull request #1442 from RalfJung/asm-terminate
cameraMeasurementTech Jan 27, 2024
eddca5e
Merge pull request #1450 from nnethercote/nul-in-c-str-literal
cameraMeasurementTech Jan 27, 2024
f752620
Literal expressions: document C-string literals
cameraMeasurementTech Jan 27, 2024
789f68e
tokens.md: remove sentence about the type of C string literals
cameraMeasurementTech Jan 27, 2024
8b75634
update patterns.md for const pattern RFC
cameraMeasurementTech Jan 26, 2024
3439654
Lexical structure: move the description of CRLF normalization
cameraMeasurementTech Jan 27, 2024
4918779
lexical structure: move the description of BOM-removal
cameraMeasurementTech Jan 28, 2024
bc73183
lexical structure: move the description of shebang-removal
cameraMeasurementTech Jan 28, 2024
fb11a3c
Input format: note about include! macros
cameraMeasurementTech Jan 28, 2024
d4eaca5
Say that Struct patterns can match enum values
cameraMeasurementTech Jan 29, 2024
63a1382
Cover enums in the refutability rule for tuple struct patterns
cameraMeasurementTech Jan 29, 2024
b71bafb
Use "null byte" rather than "zero byte" when talking about C string l…
cameraMeasurementTech Jan 30, 2024
e97ef5a
Merge pull request #1457 from mattheww/2024-01_c_string_literal_expr
cameraMeasurementTech Jan 30, 2024
4c66cf2
Document importing `main`
cameraMeasurementTech Jan 30, 2024
814f90f
Update lifetime-elision.md
cameraMeasurementTech Feb 5, 2024
0ee2fb6
Fix markdown backslash for FLOAT_LITERAL
cameraMeasurementTech Feb 5, 2024
cd77608
Merge pull request #1464 from ehuss/fix-backslash
cameraMeasurementTech Feb 7, 2024
2af520c
Merge pull request #1463 from andreasfelix/patch-1
cameraMeasurementTech Feb 9, 2024
efebc51
Fix a typo in external-blocks.md
cameraMeasurementTech Feb 12, 2024
80fd4ae
Merge pull request #1467 from yutannihilation/patch-1
cameraMeasurementTech Feb 12, 2024
51e10be
Add docs for `#[collapse_debuginfo]` attribute
cameraMeasurementTech Feb 13, 2024
5df0e94
Use standard template introducing an attribute.
cameraMeasurementTech Feb 14, 2024
1bdcf4c
Use em-dash separator
cameraMeasurementTech Feb 14, 2024
958fcb6
Place `rustc` behavior in a side note.
cameraMeasurementTech Feb 14, 2024
9cac482
Use semantic line wrapping.
cameraMeasurementTech Feb 14, 2024
ff12206
Link `collapse_debuginfo` in the index of built-in attributes.
cameraMeasurementTech Feb 14, 2024
cd3732e
Fix grammar for TypePathFn
cameraMeasurementTech Oct 10, 2022
f548b33
Merge pull request #1281 from ehuss/fix-TypePathFn
cameraMeasurementTech Feb 15, 2024
59931ff
Update aarch64 target feature docs to match LLVM
cameraMeasurementTech Jan 25, 2024
372dd48
Add note about static libraries not linking their dependencies
cameraMeasurementTech Feb 17, 2024
74a8067
Cleanup wrapping, whitespace, etc. in `README.md`
cameraMeasurementTech Feb 19, 2024
b222a05
Add `rust-toolchain.toml` and revise README
cameraMeasurementTech Feb 19, 2024
89a9fa3
Document semantics of various pointer casts
cameraMeasurementTech Jan 22, 2024
a2238a3
Merge pull request #1470 from adamgemmell/dev/adagem01/target-feature…
cameraMeasurementTech Feb 21, 2024
4b78d26
Add redirect for slice-dst-pointer-to-pointer-cast
cameraMeasurementTech Feb 21, 2024
ee26719
Semantic line wrapping.
cameraMeasurementTech Feb 21, 2024
00856bf
Merge pull request #1451 from udoprog/document-ptr-casts
cameraMeasurementTech Feb 21, 2024
157912c
Merge pull request #1474 from traviscross/TC/improve-readme
cameraMeasurementTech Feb 21, 2024
4d95f9e
Merge pull request #1446 from ChrisDenton/target-abi
cameraMeasurementTech Feb 25, 2024
951cd06
Say that struct patterns can match union values
cameraMeasurementTech Feb 27, 2024
f5da910
Merge pull request #1460 from mattheww/2024-01_patterns
cameraMeasurementTech Feb 28, 2024
c5a3272
underscore-expr: add more examples
cameraMeasurementTech Mar 3, 2024
6aa529b
tokens.md: say that lifetime-like tokens can't be immediately followe…
cameraMeasurementTech Mar 4, 2024
fad1713
Merge pull request #1479 from mattheww/2024-03_lifetime_tokens
cameraMeasurementTech Mar 6, 2024
8888f36
Merge pull request #1459 from mattheww/2024-01_input_format
cameraMeasurementTech Mar 6, 2024
21e00b1
add support for ATB in reference
cameraMeasurementTech Mar 7, 2024
0a84cd5
Fix copy/paste error
cameraMeasurementTech Mar 8, 2024
74520ac
Update src/paths.md
cameraMeasurementTech Mar 8, 2024
4c36dda
Add the `#[diagnostic]` attribute namespace and the
cameraMeasurementTech Jan 18, 2024
9ccc379
Apply suggestions from code review
cameraMeasurementTech Jan 19, 2024
988c9f7
Apply more review suggestions manually
cameraMeasurementTech Jan 19, 2024
7f7a175
Various fixes and editing.
cameraMeasurementTech Mar 12, 2024
71d721e
Literal expressions: fix mistake in the definition of unicode escapes
cameraMeasurementTech Mar 19, 2024
3961376
Merge pull request #1483 from mattheww/2024-03_unicode_escape_fix
cameraMeasurementTech Mar 19, 2024
737d71e
Merge pull request #1481 from compiler-errors/atb
cameraMeasurementTech Mar 20, 2024
713107b
Merge pull request #1461 from clubby789/imported-main
cameraMeasurementTech Mar 20, 2024
1d49bfe
fix typo of shebang
cameraMeasurementTech Mar 24, 2024
0520b3c
Merge pull request #1486 from aoyama-val/patch-1
cameraMeasurementTech Mar 25, 2024
4320782
Fix clippy warning in procedural macro example
cameraMeasurementTech Mar 30, 2024
a661997
Merge pull request #1488 from yotamofek/patch-1
cameraMeasurementTech Apr 1, 2024
cfb3518
Merge pull request #1393 from dvdhrm/pr/align32
cameraMeasurementTech Apr 3, 2024
f01fd88
Update on_unimplemented for format string changes.
cameraMeasurementTech Apr 3, 2024
8171465
Merge pull request #1449 from weiznich/diagnostic_namespace
cameraMeasurementTech Apr 3, 2024
618b19c
Fix link to RISC-V Zkt spec; it was pointing to Zkr
cameraMeasurementTech Apr 14, 2024
4c3d948
Document how `non_exhaustive` interacts with tuple and unit-like stru…
cameraMeasurementTech Apr 14, 2024
0051992
Merge pull request #1490 from jlokier/patch-1
cameraMeasurementTech Apr 15, 2024
407e2fd
Replace “min()” visibility notation with English.
cameraMeasurementTech Apr 15, 2024
317d359
Merge pull request #1491 from kpreid/neunit
cameraMeasurementTech Apr 15, 2024
8afd73e
Update clone reference to include closures
cameraMeasurementTech Apr 16, 2024
f368b3d
Expand and clarify primitive alignment
cameraMeasurementTech Apr 16, 2024
a220bce
Clone: Also mention closures that don't capture anything
cameraMeasurementTech Apr 17, 2024
8c62a45
Merge pull request #1492 from conradludgate/patch-1
cameraMeasurementTech Apr 17, 2024
55267ac
Merge pull request #1493 from kpreid/patch-1
cameraMeasurementTech Apr 20, 2024
3e71ab3
Merge pull request #1420 from daxpedda/wasm-target-feature-phase-4-5
cameraMeasurementTech Apr 21, 2024
bdd9f11
Add an example of collapse_debuginfo
cameraMeasurementTech Apr 27, 2024
fdb0209
Merge pull request #1468 from petrochenkov/debmac
cameraMeasurementTech Apr 27, 2024
7c74dfd
Add const blocks
cameraMeasurementTech Nov 7, 2022
6344eab
Remove outdated info about impl Trait and generics in the same function
cameraMeasurementTech May 1, 2024
3bc9fa3
mention associated consts
cameraMeasurementTech May 3, 2024
24d01ba
clarifications
cameraMeasurementTech May 7, 2024
7d5ac61
patterns: include new exclusive range patterns
cameraMeasurementTech Mar 22, 2024
a036db6
Merge pull request #1484 from MultisampledNight/excl-range-patterns
cameraMeasurementTech May 7, 2024
ba5e176
Small editorial updates for const blocks.
cameraMeasurementTech May 8, 2024
1e80dda
Merge pull request #1295 from nbdd0121/master
cameraMeasurementTech May 10, 2024
bcc4c3e
document guarantee about evaluation of associated consts and const bl…
cameraMeasurementTech May 10, 2024
a4073ed
Update recognized tool attributes
cameraMeasurementTech May 19, 2024
a33810e
elaborate on slice wide pointer metadata
cameraMeasurementTech May 23, 2024
c4dfef0
Merge pull request #1497 from RalfJung/const-eval-guarantee
cameraMeasurementTech May 25, 2024
701b2b2
more explicitly explain the UB around immutable extern statics
cameraMeasurementTech May 26, 2024
32e3542
Merge pull request #1456 from RalfJung/const-pattern
cameraMeasurementTech May 27, 2024
b0ac888
Merge PR #1040: Add "scopes" chapter
cameraMeasurementTech May 28, 2024
3f25552
Merge pull request #1040 from ehuss/scopes
cameraMeasurementTech May 28, 2024
1aafe7a
Mention Variadics With No Fixed Parameter
cameraMeasurementTech Apr 18, 2024
ba663e6
Merge pull request #1494 from veera-sivarajan/c23-variadics
cameraMeasurementTech May 30, 2024
b287af5
this needs a space
cameraMeasurementTech May 31, 2024
310f956
Merge pull request #1506 from correabuscar/patch-1
cameraMeasurementTech May 31, 2024
756f6a6
Add Apple target_abi values to the example values
cameraMeasurementTech Jun 2, 2024
cb062c3
Merge pull request #1507 from madsmtm/apple-target-abi-example
cameraMeasurementTech Jun 3, 2024
b1ce53f
union syntax fix
cameraMeasurementTech Jun 7, 2024
6889a7c
Merge pull request #1509 from nefelitav/union-syntax-patch
cameraMeasurementTech Jun 7, 2024
9a10fbb
Merge pull request #1495 from drewtato/impl-trait-and-generics
cameraMeasurementTech Jun 18, 2024
076acb9
Merge pull request #1478 from japm48/patch-1
cameraMeasurementTech Jun 18, 2024
62381fb
typo fix and clarifications
cameraMeasurementTech May 23, 2024
7a0077a
Added example of 1-ary tuple type
cameraMeasurementTech Jun 21, 2024
8768b6b
Remove 1-ary space
cameraMeasurementTech Jun 21, 2024
dee7446
Merge pull request #1514 from Suguis/unary-tuple-type
cameraMeasurementTech Jun 21, 2024
c9c2c59
Merge pull request #1498 from Veykril/patch-3
cameraMeasurementTech Jun 24, 2024
95e5635
Remove stubs needed for the link checker.
cameraMeasurementTech Jun 24, 2024
03c71ba
Document new `#[expect]` attribute and `reasons` parameter (RFC 2383)
cameraMeasurementTech Jul 9, 2022
af07f40
Improve `#[expect]` documentation and address review comments
cameraMeasurementTech Jul 10, 2022
f83bca1
Improve `#[expect]` documentation again
cameraMeasurementTech Feb 10, 2024
b85e18e
Fix Typos
cameraMeasurementTech Feb 17, 2024
3fe498d
Fix a code example to use the correct code tags.
cameraMeasurementTech Jun 27, 2024
128ac52
Merge pull request #1237 from xFrednet/rfc-2383-document-lint-reason-…
cameraMeasurementTech Jun 27, 2024
37bbb7b
Merge pull request #1517 from ehuss/remove-linkchecker-stubs
cameraMeasurementTech Jun 27, 2024
7454ec2
Provide an example of `target_family` being multi-valued
cameraMeasurementTech Jun 28, 2024
413eece
Merge pull request #1518 from madsmtm/multivalued-target_family
cameraMeasurementTech Jun 29, 2024
6adb864
Enable mdbook smart-punctuation.
cameraMeasurementTech Jun 24, 2024
4e5aaf2
Add checks for hard-to-see characters.
cameraMeasurementTech Jul 1, 2024
812bf59
Update pulldown-cmark to 0.10.
cameraMeasurementTech Jul 1, 2024
814b58f
Merge pull request #1516 from ehuss/smart-punctuation
cameraMeasurementTech Jul 2, 2024
1290f42
Start using mdbook-spec for the reference.
cameraMeasurementTech Jun 27, 2024
002e19c
Copy the spec authoring guide over verbatim.
cameraMeasurementTech Jul 1, 2024
b2ffe29
Merge the Reference style guide to the authoring guide.
cameraMeasurementTech Jul 1, 2024
0463d4f
Update CI to use mdbook-spec
cameraMeasurementTech Jul 1, 2024
6022b2f
Remove confusing usage of terminology "block of a function"
cameraMeasurementTech Jan 28, 2024
c7e67df
Merge pull request #1458 from steffahn/parameters_and_block_example
cameraMeasurementTech Jul 2, 2024
b2ba042
Add clarification from nikomatsakis
cameraMeasurementTech Jul 3, 2024
5dee323
Merge pull request #1502 from RalfJung/immutable-extern-static
cameraMeasurementTech Jul 3, 2024
c278b26
Add clarification on linking
cameraMeasurementTech Jul 3, 2024
3f3e3d6
Merge pull request #1472 from madsmtm/help-usage-of-print-native-stat…
cameraMeasurementTech Jul 3, 2024
4cdcd33
Sort link section alphabetically
cameraMeasurementTech Jul 4, 2024
68ab122
Rewrap paragraph
cameraMeasurementTech Jul 4, 2024
6f11d3c
Follow the authoring guide in the authoring guide
cameraMeasurementTech Jul 4, 2024
00fa182
Copy remaining style guidance to authoring guide
cameraMeasurementTech Jul 4, 2024
af851d7
Replace style guide with a link to the authoring guide
cameraMeasurementTech Jul 4, 2024
8887b7c
Merge pull request #1520 from ehuss/mdbook-spec
cameraMeasurementTech Jul 4, 2024
90f9773
Merge pull request #1441 from Amanieu/asm-dedup
cameraMeasurementTech Jul 9, 2024
cefc315
Add `.insn` assembly directive.
cameraMeasurementTech Jan 24, 2024
727e2e7
Merge pull request #1453 from CyoeeA9e/master
cameraMeasurementTech Jul 12, 2024
0cd21e0
Merge pull request #1499 from RalfJung/wide-ptr-meta
cameraMeasurementTech Jul 13, 2024
f83bd2e
Suppress type length limit test and note that it is not enforced
cameraMeasurementTech Jul 14, 2024
d9363d6
Don't use admonition syntax.
cameraMeasurementTech Jul 15, 2024
479205f
Merge pull request #1527 from compiler-errors/type-length-limit
cameraMeasurementTech Jul 15, 2024
fdbd635
Enforce `cargo fmt` on the style-check code.
cameraMeasurementTech Jul 15, 2024
a6afc88
add missing associated type link in type-aliases.md
cameraMeasurementTech Jul 16, 2024
144df47
Merge pull request #1530 from cafkafk/patch-1
cameraMeasurementTech Jul 16, 2024
f446ec4
Remove broken link checker.
cameraMeasurementTech Jul 16, 2024
8666119
Add '_ to LIFETIME_OR_LABEL
cameraMeasurementTech Jul 16, 2024
b814eca
Merge pull request #1532 from ehuss/keyword-lifetimes
cameraMeasurementTech Jul 16, 2024
a7fe316
Merge pull request #1531 from ehuss/remove-broken-link
cameraMeasurementTech Jul 16, 2024
67f2cdf
Merge pull request #1529 from ehuss/fmt-style-check
cameraMeasurementTech Jul 16, 2024
a2667a2
Update conditional-compilation.md
cameraMeasurementTech Sep 18, 2023
90c2b74
Apply review suggestions.
cameraMeasurementTech Jul 17, 2024
225c62b
Merge pull request #1402 from klu235/patch-2
cameraMeasurementTech Jul 17, 2024
d01b3db
Add review policy for the reference and specification work
cameraMeasurementTech Jul 17, 2024
a2888a2
Merge pull request #1535 from JoelMarcey/review-process
cameraMeasurementTech Jul 19, 2024
24f2570
Describe all cases for which the weak `dyn` keyword is parsed as a ke…
cameraMeasurementTech Jul 20, 2024
2cace48
re-structure 'invalid values' enumeration to instead define what is *…
cameraMeasurementTech Jul 22, 2024
ac059af
update 'dangling pointers' to new zero-sized rules
cameraMeasurementTech Jul 22, 2024
a767e2e
say more clearly what is still being debated
cameraMeasurementTech Jul 22, 2024
be05515
Update link for unsafe blocks.
cameraMeasurementTech Jul 23, 2024
ba0c423
Update mutable static items example for modern Rust.
cameraMeasurementTech Jul 23, 2024
3dd886c
Merge pull request #1544 from ehuss/update-static-items-2024.md
cameraMeasurementTech Jul 23, 2024
6d44f7a
Merge pull request #1543 from ehuss/fix-unsafe-blocks-link
cameraMeasurementTech Jul 23, 2024
f7f76be
Merge pull request #1541 from RalfJung/zero-sized
cameraMeasurementTech Jul 23, 2024
8c9eac0
Improve some editorial bits
cameraMeasurementTech Jul 23, 2024
bf01ecb
Merge pull request #1540 from RalfJung/valid
cameraMeasurementTech Jul 23, 2024
fbe2fdb
Merge pull request #1538 from Veykril/ed-2015-dyn
cameraMeasurementTech Jul 23, 2024
fde0db7
Improve some editorial bits and weaken claim
cameraMeasurementTech Jul 23, 2024
cb44ce3
Merge pull request #1361 from sdroege/staticlib-gc-sections-symbol-vi…
cameraMeasurementTech Jul 23, 2024
b82f233
Add mdbook-spec.
cameraMeasurementTech Feb 22, 2024
dc9f35f
Support automatic links to the standard library.
cameraMeasurementTech Mar 8, 2024
5eeb0d0
Move regular expressions to be global statics.
cameraMeasurementTech Jun 27, 2024
9fa9532
Fix std links that have digits in them.
cameraMeasurementTech Jun 27, 2024
6dae798
Move std_links to its own module.
cameraMeasurementTech Jun 27, 2024
94b5297
Split std_links into multiple functions.
cameraMeasurementTech Jun 27, 2024
81e6c0f
Don't override explicit link definitions.
cameraMeasurementTech Jun 27, 2024
b041eef
Convert std links to be relative.
cameraMeasurementTech Jun 27, 2024
fe822f0
Fix chapter iteration to include nested chapters.
cameraMeasurementTech Jun 27, 2024
14b4b00
Prepare mdbook-spec for publishing
cameraMeasurementTech Jun 27, 2024
dd6f2ee
Rename main.rs to lib.rs.
cameraMeasurementTech Jul 4, 2024
5f2be46
Create mdbook-spec main.rs.
cameraMeasurementTech Jul 4, 2024
93f1314
Bump version to 0.1.1.
cameraMeasurementTech Jul 4, 2024
598ca95
Fix rustdoc test that is failing.
cameraMeasurementTech Jul 5, 2024
7fe9102
Update Cargo.lock
cameraMeasurementTech Jul 5, 2024
96fa3f1
Update all dependencies
cameraMeasurementTech Jul 5, 2024
d0a91e4
Fix some issues with the rust-lang/rust upstream.
cameraMeasurementTech Jul 11, 2024
4cfc082
Fix outdated Cargo.lock
cameraMeasurementTech Jul 11, 2024
f6aee82
Switch to using the local mdbook-spec copy.
cameraMeasurementTech Jul 23, 2024
52c6e4f
mdbook-spec is no longer needed to be installed separately.
cameraMeasurementTech Jul 23, 2024
2c7a278
Update CI for mdbook-spec.
cameraMeasurementTech Jul 23, 2024
4cb16a0
Merge pull request #1542 from ehuss/mdbook-spec
cameraMeasurementTech Jul 25, 2024
8cbb8c2
Specify how names are introduced.
cameraMeasurementTech Jun 27, 2021
52f65ff
Clean up a few uses of the word "namespace".
cameraMeasurementTech Jun 27, 2021
a834b2a
Try to elaborate more on what Self defines.
cameraMeasurementTech Jun 28, 2021
c99db24
Update `use` chapter with more detail.
cameraMeasurementTech Jul 1, 2021
f565ed2
Fixes from review.
cameraMeasurementTech Jul 2, 2021
bb0e32f
Fix mistake in Self.
cameraMeasurementTech Jul 5, 2021
9b582d6
Remove ambiguity error removed in Rust 1.72.
cameraMeasurementTech Jun 30, 2024
63001d5
Make some editorial improvements
cameraMeasurementTech Jul 5, 2024
89ff4ad
Note a redundantly imported name is allowed to be used
cameraMeasurementTech Jul 5, 2024
766cd18
Remove "or shadowed" caveat
cameraMeasurementTech Jul 6, 2024
f3984b5
Replace "Example:" with "For example:"
cameraMeasurementTech Jul 6, 2024
69b8e5f
Remove custom blockquote styling
cameraMeasurementTech Jul 25, 2024
3760713
Remove struct-like enum variant values.
cameraMeasurementTech Jul 26, 2024
20a4cb5
Fix std-links for generics with commas.
cameraMeasurementTech Jul 26, 2024
8c08e53
Merge pull request #1052 from ehuss/namespace-defines
cameraMeasurementTech Jul 30, 2024
cb33061
Merge pull request #1549 from ehuss/std-link-comma
cameraMeasurementTech Jul 30, 2024
1d2b1eb
Merge pull request #1547 from ehuss/blockquote-styling
cameraMeasurementTech Jul 30, 2024
3c6405b
Add capturing and precise capturing rules
cameraMeasurementTech Aug 6, 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
94 changes: 88 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: CI
on: [push, pull_request]
on:
pull_request:
merge_group:

env:
MDBOOK_VERSION: 0.4.40

jobs:
test:
name: Test
code-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand All @@ -12,12 +16,12 @@ jobs:
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install nightly -c rust-docs
rustup toolchain install nightly
rustup default nightly
- name: Install mdbook
run: |
mkdir bin
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
echo "$(pwd)/bin" >> $GITHUB_PATH
- name: Report versions
run: |
Expand All @@ -26,10 +30,88 @@ jobs:
mdbook --version
- name: Run tests
run: mdbook test

style-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Update rustup
run: rustup self update
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install nightly -c rust-docs,rustfmt
rustup default nightly
- name: Install mdbook
run: |
mkdir bin
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
echo "$(pwd)/bin" >> $GITHUB_PATH
- name: Report versions
run: |
rustup --version
rustc -Vv
mdbook --version
- name: Verify the book builds
env:
SPEC_DENY_WARNINGS: 1
run: mdbook build
- name: Style checks
run: (cd style-check && cargo run -- ../src)
working-directory: style-check
run: cargo run --locked -- ../src
- name: Style fmt
working-directory: style-check
run: cargo fmt --check
- name: Check for broken links
run: |
curl -sSLo linkcheck.sh \
https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh
sh linkcheck.sh --all reference

mdbook-spec:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Update rustup
run: rustup self update
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install nightly -c rustfmt
rustup default nightly
- name: Install mdbook
run: |
mkdir bin
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
echo "$(pwd)/bin" >> $GITHUB_PATH
- name: Report versions
run: |
rustup --version
rustc -Vv
- name: Verify mdbook-spec lockfile is current
working-directory: ./mdbook-spec
run: cargo update -p mdbook-spec --locked
- name: Test mdbook-spec
working-directory: ./mdbook-spec
run: cargo test
- name: Rustfmt check
working-directory: ./mdbook-spec
run: cargo fmt --check

# The success job is here to consolidate the total success/failure state of
# all other jobs. This job is then included in the GitHub branch protection
# rule which prevents merges unless all other jobs are passing. This makes
# it easier to manage the list of jobs via this yml file and to prevent
# accidentally adding new jobs without also updating the branch protections.
success:
name: Success gate
if: always()
needs:
- code-tests
- style-tests
- mdbook-spec
runs-on: ubuntu-latest
steps:
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
- name: Done
run: exit 0
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ for the Reference. As such, we have the warning saying there's work that needs
to be done. Eventually, we plan to make sure everything is well documented
enough that we can remove the warning.

It is encouraged for you to read the [introduction] to familiarize yourself
with the kind of content the reference is expected to contain and the
conventions it uses. Also, the [style guide] provides more detailed guidelines
for formatting and content.
It is encouraged for you to read the [introduction] to familiarize yourself with
the kind of content the reference is expected to contain and the conventions it
uses. Also, the [Authoring Guide] provides more detailed guidelines for
formatting and content.

## Critiquing the Reference

Expand Down Expand Up @@ -68,9 +68,9 @@ This should include links to any relevant information, such as the
stabilization PR, the RFC, the tracking issue, and anything else that would be
helpful for writing the documentation.

[Authoring Guide]: docs/authoring.md
[introduction]: src/introduction.md
[issue tracker]: https://github.com/rust-lang/reference/issues
[playpen]: https://play.rust-lang.org/
[rust-lang/rust]: https://github.com/rust-lang/rust/
[style guide]: STYLE.md
[unstable]: https://doc.rust-lang.org/nightly/unstable-book/
63 changes: 38 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# The Rust Language Reference

This document is the primary reference for the Rust programming language.
This document is the primary reference for the Rust programming
language.

This document is not normative. It may include details that are specific
to `rustc` itself, and should not be taken as a specification for the
Expand All @@ -9,52 +10,64 @@ what we have for now.

## Dependencies

- rustc (the Rust compiler).
- [mdbook](https://rust-lang.github.io/mdBook/) (use `cargo install mdbook` to install it).
- rust nightly (you would be required to set your Rust version to the nightly version to make sure all tests pass)
- Nightly Rust
- [mdbook](https://rust-lang.github.io/mdBook/)

## Build steps
## Installing dependencies

To build the project, follow the steps given below :
First, ensure that you have a recent copy of the nightly Rust compiler
installed, as this is needed in order to run the tests:

Clone the project by downloading the ZIP from the [GitHub page](https://github.com/rust-lang/reference) or
run the following command:

```
git clone https://github.com/rust-lang/reference
```sh
rustup toolchain install nightly
```

Change the directory to the downloaded repository:
Now, ensure you have `mdbook` installed, as this is needed in order to
build the Reference:

```sh
cd reference
cargo install --locked mdbook
```

To run the tests, you would need to set the Rust version to the nightly release. You can do this by executing the following command:
## Building

```shell
rustup override set nightly
To build the Reference, first clone the project:

```sh
git clone https://github.com/rust-lang/reference.git
```

This will set the nightly version only for your the current project.
(Alternatively, if you don't want to use `git`, [download][] a ZIP file
of the project, extract it using your preferred tool, and rename the
top-level directory to `reference`.)

[download]: https://github.com/rust-lang/reference/archive/refs/heads/master.zip

If you wish to set Rust nightly for all your projects, you can run the command:
Now change your current directory to the working directory:

```shell
rustup default nightly
```sh
cd reference
```

Now, run the following command to test the code snippets to catch compilation errors:
To test all of the code examples in the Reference, run:

```shell
```sh
mdbook test
```

For authors, consider using the server functionality which supports automatic reload.

To generate a local instance of the book, run:
To build the Reference locally (in `build/`) and open it in a web
browser, run:

```sh
mdbook build
mdbook build --open
```

The generated HTML will be in the `book` folder.
This will open a browser with a websocket live-link to automatically reload whenever the source is updated.

You can also open any current build of the reference by running:

```sh
mdbook serve --open
```
70 changes: 2 additions & 68 deletions STYLE.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,5 @@
# Rust reference style guide

Some conventions and content guidelines are specified in the [introduction].
This document serves as a guide for editors and reviewers.
See the [Authoring Guide] for details on the style used in the reference.

There is a [`style-check`](style-check/) tool which is run in CI to check some of these. To use it locally, run `cargo run --manifest-path=style-check/Cargo.toml src`.

## Markdown formatting

* Use ATX-style heading with sentence case.
* Use one line per sentence to make diffs nicer.
Do not wrap long lines.
* Use reference links, with shortcuts if appropriate.
Place the sorted link reference definitions at the bottom of the file, or at the bottom of a section if there is an unusually large number of links that are specific to the section.

```
Example of shortcut link: [enumerations]
Example of reference link with label: [block expression][block]

[block]: expressions/block-expr.md
[enumerations]: types/enum.md
```

* Links should be relative with the `.md` extension.
Links to other rust-lang books that are published with the reference or the standard library API should also be relative so that the linkchecker can validate them.
* See the [Conventions] section for formatting callouts such as notes, edition differences, and warnings.
* Formatting to avoid:
* Avoid trailing spaces.
* Avoid double blank lines.

### Code examples

Code examples should use code blocks with triple backticks.
The language should always be specified (such as `rust`).

```rust
println!("Hello!");
```

See https://highlightjs.org/ for a list of supported languages.

Rust examples are tested via rustdoc, and should include the appropriate annotations when tests are expected to fail:

* `edition2015` or `edition2018` — If it is edition-specific (see `book.toml` for the default).
* `no_run` — The example should compile successfully, but should not be executed.
* `should_panic` — The example should compile and run, but produce a panic.
* `compile_fail` — The example is expected to fail to compile.
* `ignore` — The example shouldn't be built or tested.
This should be avoided if possible.
Usually this is only necessary when the testing framework does not support it (such as external crates or modules, or a proc-macro), or it contains pseudo-code which is not valid Rust.
An HTML comment such as `<!-- ignore: requires extern crate -->` should be placed before the example to explain why it is ignored.

See the [rustdoc documentation] for more detail.

## Language and grammar

* Use American English spelling.
* Use Oxford commas.
* Idioms and styling to avoid:
* Avoid slashes for alternatives ("program/binary"), use conjunctions or rewrite it ("program or binary").
* Avoid qualifying something as "in Rust", the entire reference is about Rust.

## Content

* Whenever there is a difference between editions, the differences should be called out with an "Edition Differences" block.
The main text should stick to what is common between the editions.
However, for large differences (such as "async"), the main text may contain edition-specific content as long as it is made clear which editions it applies to.

[conventions]: src/introduction.md#conventions
[introduction]: src/introduction.md
[rustdoc documentation]: https://doc.rust-lang.org/rustdoc/documentation-tests.html
[Authoring Guide]: docs/authoring.md
10 changes: 10 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@ author = "The Rust Project Developers"
[output.html]
additional-css = ["theme/reference.css"]
git-repository-url = "https://github.com/rust-lang/reference/"
edit-url-template = "https://github.com/rust-lang/reference/edit/master/{path}"
smart-punctuation = true

[output.html.redirect]
"/expressions/enum-variant-expr.html" = "struct-expr.html"
"/unsafe-blocks.html" = "unsafe-keyword.html"
"/unsafe-functions.html" = "unsafe-keyword.html"

[rust]
edition = "2021"

[preprocessor.spec]
command = "cargo run --manifest-path mdbook-spec/Cargo.toml"

[build]
extra-watch-dirs = ["mdbook-spec/src"]
Loading
Loading