Commit Graph

2948 Commits

Author SHA1 Message Date
Eric Huss e356977fce
Merge pull request #1295 from nbdd0121/master
Document inline const/const block expression
2024-05-10 12:49:15 +00:00
Eric Huss efdc9b6fe3 Small editorial updates for const blocks. 2024-05-08 09:50:26 -07:00
Eric Huss 5e8b3f635a
Merge pull request #1484 from MultisampledNight/excl-range-patterns
patterns: include yet unstable exclusive range patterns
2024-05-07 13:32:57 +00:00
MultisampledNight 95ab92091f patterns: include new exclusive range patterns
See also https://github.com/rust-lang/rust/issues/37854.
2024-05-07 06:31:18 -07:00
Gary Guo 01c8196e01 Add const blocks 2024-04-29 12:09:17 +01:00
Eric Huss 51817951d0
Merge pull request #1468 from petrochenkov/debmac
Add docs for `#[collapse_debuginfo]` attribute
2024-04-27 17:54:45 +00:00
Eric Huss 2d51a2aec4 Add an example of collapse_debuginfo 2024-04-27 10:53:08 -07:00
Eric Huss 5854fcc286
Merge pull request #1420 from daxpedda/wasm-target-feature-phase-4-5
Stabilize Wasm target features that are in phase 4 and 5
2024-04-21 13:47:07 +00:00
Eric Huss 5e68de3dc2
Merge pull request #1493 from kpreid/patch-1
Expand and clarify primitive alignment
2024-04-20 14:05:08 +00:00
Eric Huss 735c5dbf05
Merge pull request #1492 from conradludgate/patch-1
Update clone reference to include closures
2024-04-17 15:06:26 +00:00
Eric Huss 330ef95694
Clone: Also mention closures that don't capture anything 2024-04-17 08:04:47 -07:00
Kevin Reid a432cf4afd
Expand and clarify primitive alignment
These changes are intended to make the section more informative and readable, without making any new normative claims.

* Specify that the alignment might be _less_ than the size, rather than just that it might be different. This is mandatory and stated in the previous section, but I think it's useful to reiterate here.
* Mention `u128`/`i128` as another example of alignment less than size, so that this doesn't sound like a mainly 32-bit thing.
* Add `usize`/`isize` to the size table, so it can be spotted at a glance.
2024-04-16 09:35:51 -07:00
Conrad Ludgate 4f47e3ffe7
Update clone reference to include closures 2024-04-16 06:55:59 +01:00
Eric Huss 585b9bcb72
Merge pull request #1491 from kpreid/neunit
Document how `non_exhaustive` interacts with tuple and unit-like structs.
2024-04-15 19:59:53 +00:00
Kevin Reid 076a798583 Replace “min()” visibility notation with English. 2024-04-15 11:13:52 -07:00
Eric Huss a60221ad9c
Merge pull request #1490 from jlokier/patch-1
Fix link to RISC-V Zkt spec; it was pointing to Zkr
2024-04-15 16:12:40 +00:00
Kevin Reid ec0065fd92 Document how `non_exhaustive` interacts with tuple and unit-like structs. 2024-04-14 10:48:46 -07:00
Jamie Lokier b4311de691
Fix link to RISC-V Zkt spec; it was pointing to Zkr 2024-04-14 14:07:07 +01:00
Eric Huss 55694913b1
Merge pull request #1449 from weiznich/diagnostic_namespace
Add the `#[diagnostic]` attribute namespace and the `#[diagnostic::on_unimplemented]` feature to the reference
2024-04-03 21:31:14 +00:00
Eric Huss 52874b8312 Update on_unimplemented for format string changes.
Updated in https://github.com/rust-lang/rust/pull/122402
2024-04-03 14:29:34 -07:00
Eric Huss 1c03c9d3b8
Merge pull request #1393 from dvdhrm/pr/align32
type-layout: be more specific about 32-bit alignments
2024-04-03 02:21:31 +00:00
Eric Huss 1e1fec30f1
Merge pull request #1488 from yotamofek/patch-1
Fix clippy warning in procedural macro example
2024-04-01 19:56:13 +00:00
Yotam Ofek a7a86824fa
Fix clippy warning in procedural macro example
I copy+pasted this example into my code and the `clippy::to_string_in_format_args` lint fired.
2024-03-30 23:14:03 +03:00
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
Eric Huss 5e29b0135e Various fixes and editing. 2024-03-12 09:21:17 -07:00
Georg Semmler 99b19d92c1 Apply more review suggestions manually
Co-authored-by: Eric Huss <eric@huss.org>
2024-03-12 08:23:37 -07:00
Georg Semmler 5baf87cdd9 Apply suggestions from code review
Co-authored-by: Eric Huss <eric@huss.org>
2024-03-12 08:23:37 -07:00
Georg Semmler 81fe01a111 Add the `#[diagnostic]` attribute namespace and the
`#[diagnostic::on_unimplemented]` feature to the reference
2024-03-12 08:23:37 -07: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