Skip to content

Generate grammar.html and link to it from the reference. #22308

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion mk/docs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
######################################################################
DOCS := index intro tutorial complement-bugreport \
complement-lang-faq complement-design-faq complement-project-faq \
rustdoc reference
rustdoc reference grammar

# Legacy guides, preserved for a while to reduce the number of 404s
DOCS += guide-crates guide-error-handling guide-ffi guide-macros guide \
Expand Down
6 changes: 2 additions & 4 deletions src/doc/grammar.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# **This is a work in progress**

% The Rust Grammar
% Grammar

# Introduction

Expand Down Expand Up @@ -570,7 +568,7 @@ binop_expr : expr binop expr ;
The precedence of Rust binary operators is ordered as follows, going from
strong to weak:

```
```text
* / %
as
+ -
Expand Down
7 changes: 4 additions & 3 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
This document is the primary reference for the Rust programming language. It
provides three kinds of material:

- Chapters that formally define the language grammar and, for each
construct, informally describe its semantics and give examples of its
use.
- Chapters that informally describe each language construct and their use.
- Chapters that informally describe the memory model, concurrency model,
runtime services, linkage model and debugging facilities.
- Appendix chapters providing rationale and references to languages that
Expand All @@ -23,8 +21,11 @@ separately by extracting documentation attributes from their source code. Many
of the features that one might expect to be language features are library
features in Rust, so what you're looking for may be there, not here.

You may also be interested in the [grammar].

[book]: book/index.html
[standard]: std/index.html
[grammar]: grammar.html

# Notation

Expand Down