Commit Graph

2913 Commits

Author SHA1 Message Date
Eric Huss 984b36eca4
Merge pull request #1486 from aoyama-val/patch-1
Fix typo of shebang
2024-03-25 14:05:19 +00:00
Shotaro Aoyama 0b153cb607
fix typo of shebang 2024-03-24 14:02:49 +09:00
Eric Huss 824b9156b2
Merge pull request #1461 from clubby789/imported-main
Document importing `main`
2024-03-20 15:54:19 +00:00
Eric Huss b6779f40a1
Merge pull request #1481 from compiler-errors/atb
add grammar for `associated_type_bounds` in reference
2024-03-20 15:52:40 +00:00
Eric Huss be4f7be926
Merge pull request #1483 from mattheww/2024-03_unicode_escape_fix
Literal expressions: fix mistake in the definition of unicode escapes
2024-03-19 20:01:14 +00:00
Matthew Woodcraft 659915cc11 Literal expressions: fix mistake in the definition of unicode escapes 2024-03-19 19:36:32 +00:00
Michael Goulet 6c77f499ea
Update src/paths.md 2024-03-08 11:42:50 -05:00
Michael Goulet 9ad55f00b1
Fix copy/paste error 2024-03-08 11:42:32 -05:00
Michael Goulet 684b549fc7 add support for ATB in reference 2024-03-07 19:47:28 +00:00
Eric Huss 5afb503a4c
Merge pull request #1459 from mattheww/2024-01_input_format
Input format
2024-03-06 21:29:54 +00:00
Eric Huss 54400709b0
Merge pull request #1479 from mattheww/2024-03_lifetime_tokens
Lexer: say that lifetime-like tokens can't be immediately followed by '
2024-03-06 19:01:19 +00:00
Matthew Woodcraft 7bd81a6a03 tokens.md: say that lifetime-like tokens can't be immediately followed by '
Forms like 'ab'c are rejected, so we need some way to explain why they
don't tokenise as two consecutive LIFETIME_OR_LABEL tokens.

Address this by adding "not immediately followed by `'`" to each of the
lexer rules for the lifetime-like tokens.

This also means there can be no ambiguity between CHAR_LITERAL and these
tokens (at present we don't say how such ambiguities are resolved).
2024-03-04 21:32:01 +00:00
Eric Huss 1afcfd9c66
Merge pull request #1460 from mattheww/2024-01_patterns
Patterns and enums
2024-02-28 04:06:45 +00:00
Matthew Woodcraft 08e5cd4e3c Say that struct patterns can match union values 2024-02-27 21:53:14 +00:00
Eric Huss 3417f86693
Merge pull request #1446 from ChrisDenton/target-abi
Document `target_abi`
2024-02-25 19:37:14 +00:00
Eric Huss 8c2500c059
Merge pull request #1474 from traviscross/TC/improve-readme
Add `rust-toolchain.toml` and revise README
2024-02-21 21:28:41 +00:00
Eric Huss b25c20b494
Merge pull request #1451 from udoprog/document-ptr-casts
Clarify semantics of the various pointer to pointer casts
2024-02-21 21:21:54 +00:00
Eric Huss 97c9ad16e5 Semantic line wrapping. 2024-02-21 13:20:15 -08:00
Eric Huss 72fb626596 Add redirect for slice-dst-pointer-to-pointer-cast 2024-02-21 13:17:59 -08:00
Eric Huss 405242bd3d
Merge pull request #1470 from adamgemmell/dev/adagem01/target-features-combined
Update aarch64 target feature docs to match LLVM
2024-02-21 21:11:25 +00:00
John-John Tedro 8c7cdd39ef Document semantics of various pointer casts
Co-authored-by: Ralf Jung <post@ralfj.de>
2024-02-21 17:34:02 +01:00
Travis Cross 81b8df4323 Add `rust-toolchain.toml` and revise README
We spent a lot of text in the README describing how to use the nightly
Rust compiler with this project.  Let's instead add a
`rust-toolchain.toml` file so that the nightly compiler is used
automatically, and let's redraft the README in that light.

With this revision, we'll add a section on installing dependencies in
which we'll describe how to ensure that the nightly compiler is
installed and up to date and how to install `mdbook`.

When describing how to clone the project, we'll suggest that people
clone the URL ending in `.git`.  This is what GitHub recommends, and
it removes a level of redirection which sometimes matters.

For people who want to download a ZIP file rather than using `git`,
we'll provide a direct link rather than simply referencing the GitHub
page.

When describing how to build the book, we'll suggesting passing
`--open` to `mdbook`, as this is usually what people will want, and it
will save a step.

Along with these changes, we include some general copyediting.
2024-02-19 07:03:53 +00:00
Travis Cross 1a23297a23 Cleanup wrapping, whitespace, etc. in `README.md`
In `README.md`, some lines were hard wrapped where others were not,
there was some trailing whitespace, and some list items were
terminated with a period where some were not.  Let's clean these
things up by hard wrapping all lines, cleaning up the whitespace, and
terminating all list items with periods.
2024-02-19 06:00:14 +00:00
Adam Gemmell db390b7cfe Update aarch64 target feature docs to match LLVM 2024-02-15 14:44:13 +00:00
Eric Huss 9104f17835
Merge pull request #1281 from ehuss/fix-TypePathFn
Fix grammar for TypePathFn
2024-02-15 13:28:59 +00:00
Eric Huss e33f255728 Fix grammar for TypePathFn 2024-02-15 05:27:15 -08:00
Eric Huss 8227666de1
Merge pull request #1467 from yutannihilation/patch-1
Fix a typo in external-blocks.md
2024-02-12 03:04:15 +00:00
Hiroaki Yutani 31f0c2c9e1
Fix a typo in external-blocks.md
Add a closing `]`
2024-02-12 11:06:08 +09:00
matthewjasper 8c0b6a8088
Merge pull request #1463 from andreasfelix/patch-1
Fix syntax in `'static lifetime elision` section of `lifetime-elision.md`
2024-02-09 17:26:09 +00:00
Eric Huss 5be836c39a
Merge pull request #1464 from ehuss/fix-backslash
Fix markdown backslash for FLOAT_LITERAL
2024-02-07 13:42:23 +00:00
Eric Huss 19ae8c51d2 Fix markdown backslash for FLOAT_LITERAL 2024-02-05 12:16:10 -08:00
Felix Andreas 8c6c7cdc2b
Update lifetime-elision.md 2024-02-05 13:09:46 +01:00
clubby789 50a2c87f82 Document importing `main` 2024-01-31 16:22:22 +00:00
Eric Huss 9329dc4ae6
Merge pull request #1457 from mattheww/2024-01_c_string_literal_expr
C string literal expressions
2024-01-30 20:10:53 +00:00
Matthew Woodcraft deac889efd Use "null byte" rather than "zero byte" when talking about C string literals 2024-01-30 19:18:43 +00:00
Matthew Woodcraft c6049baeaf Cover enums in the refutability rule for tuple struct patterns 2024-01-29 22:34:17 +00:00
Matthew Woodcraft eada9ba8ff Say that Struct patterns can match enum values 2024-01-29 22:34:14 +00:00
Matthew Woodcraft 8ba3c49114 Input format: note about include! macros 2024-01-28 18:44:28 +00:00
Matthew Woodcraft e364b6c6f9 lexical structure: move the description of shebang-removal
This takes place after CRLF normalization.

It's better not to list the shebang in a Lexer block, as it isn't a token that
can be fed to a macro.
2024-01-28 18:42:40 +00:00
Matthew Woodcraft 5f512692d3 lexical structure: move the description of BOM-removal
This takes place at the same time as CRLF normalisation.

It's better not to list it in a Lexer block, as it isn't a token that can be
fed to a macro.
2024-01-28 18:42:40 +00:00
Matthew Woodcraft fa56fdba0e Lexical structure: move the description of CRLF normalization
We now say that CRLF normalization happens as a separate pass before
tokenization.
2024-01-28 18:42:40 +00:00
Matthew Woodcraft 52dadd7d14 tokens.md: remove sentence about the type of C string literals
This is now covered in literal-expr.md
2024-01-27 19:40:14 +00:00
Matthew Woodcraft 075739db0e Literal expressions: document C-string literals 2024-01-27 19:24:36 +00:00
Eric Huss a0b119535e
Merge pull request #1450 from nnethercote/nul-in-c-str-literal
Update C-String literals to reject NUL
2024-01-27 19:22:06 +00:00
Eric Huss e848fbcdfe
Merge pull request #1442 from RalfJung/asm-terminate
pure asm blocks must terminate
2024-01-27 17:03:30 +00:00
Eric Huss d4eac740a8
Merge pull request #1452 from mattheww/2024-01_string_literal_expr
String literal expressions
2024-01-27 16:43:49 +00:00
Nicholas Nethercote a393aaf4a1 Update reference for https://github.com/rust-lang/rust/pull/119172.
Which moved the checking for NUL chars in C string literals earlier.
2024-01-26 15:44:37 +11:00
Matthew Woodcraft 00a2ac603a tokens.md: link to specific headings in literal-expr.md
Now that page is longer, linking to the top of the page isn't so helpful
2024-01-25 21:24:45 +00:00
Matthew Woodcraft 659f85640d Move discussion of string continuations from tokens.md to literal-expr.md 2024-01-25 21:24:45 +00:00
Matthew Woodcraft 7e3c5c3ea5 tokens.md: remove sentence about the type of byte string literals
This is now covered in literal-expr.md
2024-01-25 21:24:45 +00:00