rollup merge of #19998: th0114nd/unicode-bottom
In the HTML version of the documentation, it isn't rendered so might as well use the unicode representation.
This commit is contained in:
commit
b8e404f289
3 changed files with 12 additions and 5 deletions
11
mk/docs.mk
11
mk/docs.mk
|
@ -49,8 +49,10 @@ RUSTDOC_HTML_OPTS_NO_CSS = --html-before-content=doc/version_info.html \
|
||||||
RUSTDOC_HTML_OPTS = $(RUSTDOC_HTML_OPTS_NO_CSS) --markdown-css rust.css
|
RUSTDOC_HTML_OPTS = $(RUSTDOC_HTML_OPTS_NO_CSS) --markdown-css rust.css
|
||||||
|
|
||||||
PANDOC_BASE_OPTS := --standalone --toc --number-sections
|
PANDOC_BASE_OPTS := --standalone --toc --number-sections
|
||||||
PANDOC_TEX_OPTS = $(PANDOC_BASE_OPTS) --include-before-body=doc/version.tex \
|
PANDOC_TEX_OPTS = $(PANDOC_BASE_OPTS) --from=markdown --to=latex \
|
||||||
--from=markdown --include-before-body=doc/footer.tex --to=latex
|
--include-before-body=doc/version.tex \
|
||||||
|
--include-before-body=doc/footer.tex \
|
||||||
|
--include-in-header=doc/uptack.tex
|
||||||
PANDOC_EPUB_OPTS = $(PANDOC_BASE_OPTS) --to=epub
|
PANDOC_EPUB_OPTS = $(PANDOC_BASE_OPTS) --to=epub
|
||||||
|
|
||||||
# The rustdoc executable...
|
# The rustdoc executable...
|
||||||
|
@ -155,6 +157,9 @@ doc/footer.tex: $(D)/footer.inc | doc/
|
||||||
@$(call E, pandoc: $@)
|
@$(call E, pandoc: $@)
|
||||||
$(CFG_PANDOC) --from=html --to=latex $< --output=$@
|
$(CFG_PANDOC) --from=html --to=latex $< --output=$@
|
||||||
|
|
||||||
|
doc/uptack.tex: $(D)/uptack.tex | doc/
|
||||||
|
$(Q)cp $< $@
|
||||||
|
|
||||||
# HTML (rustdoc)
|
# HTML (rustdoc)
|
||||||
DOC_TARGETS += doc/not_found.html
|
DOC_TARGETS += doc/not_found.html
|
||||||
doc/not_found.html: $(D)/not_found.md $(HTML_DEPS) | doc/
|
doc/not_found.html: $(D)/not_found.md $(HTML_DEPS) | doc/
|
||||||
|
@ -180,7 +185,7 @@ doc/$(1).epub: $$(D)/$(1).md | doc/
|
||||||
|
|
||||||
# PDF (md =(pandoc)=> tex =(pdflatex)=> pdf)
|
# PDF (md =(pandoc)=> tex =(pdflatex)=> pdf)
|
||||||
DOC_TARGETS += doc/$(1).tex
|
DOC_TARGETS += doc/$(1).tex
|
||||||
doc/$(1).tex: $$(D)/$(1).md doc/footer.tex doc/version.tex | doc/
|
doc/$(1).tex: $$(D)/$(1).md doc/uptack.tex doc/footer.tex doc/version.tex | doc/
|
||||||
@$$(call E, pandoc: $$@)
|
@$$(call E, pandoc: $$@)
|
||||||
$$(CFG_PANDOC) $$(PANDOC_TEX_OPTS) $$< --output=$$@
|
$$(CFG_PANDOC) $$(PANDOC_TEX_OPTS) $$< --output=$$@
|
||||||
|
|
||||||
|
|
|
@ -1259,8 +1259,8 @@ We call such functions "diverging" because they never return a value to the
|
||||||
caller. Every control path in a diverging function must end with a `panic!()` or
|
caller. Every control path in a diverging function must end with a `panic!()` or
|
||||||
a call to another diverging function on every control path. The `!` annotation
|
a call to another diverging function on every control path. The `!` annotation
|
||||||
does *not* denote a type. Rather, the result type of a diverging function is a
|
does *not* denote a type. Rather, the result type of a diverging function is a
|
||||||
special type called $\bot$ ("bottom") that unifies with any type. Rust has no
|
special type called ⊥ ("bottom") that unifies with any type. Rust has no
|
||||||
syntax for $\bot$.
|
syntax for ⊥.
|
||||||
|
|
||||||
It might be necessary to declare a diverging function because as mentioned
|
It might be necessary to declare a diverging function because as mentioned
|
||||||
previously, the typechecker checks that every control path in a function ends
|
previously, the typechecker checks that every control path in a function ends
|
||||||
|
|
2
src/doc/uptack.tex
Normal file
2
src/doc/uptack.tex
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
\usepackage{newunicodechar}
|
||||||
|
\newunicodechar⊥{{$\bot$}}
|
Loading…
Add table
Add a link
Reference in a new issue