| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
* Generate links to the primitive type docs for re-exports.
* Don't ICE on cross crate primitive type re-exports.
* Make primitive type re-exports show up cross crate.
|
|
|
|
rustdoc: HTML escape const values
r? @GuillaumeGomez
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
There's not really any reason to not have the visibility default to
inherited, and this saves us the trouble of checking everywhere for
whether we have a visibility or not.
|
|
This will eventually allow us to easily pass in more parameters to the
functions without TLS or other such hacks
|
|
|
|
|
|
|
|
This means that callers can pass in a closure like
`|buf| some_function(..., &mut buf)` and pass in arbitrary arguments to
that function without complicating the trait definition. We also keep
the impl for str and String, since it's useful to be able to just pass
in "" or format!("{}"...) results in some cases.
This changes Print's definition to take self, instead of &self, because
otherwise FnOnce cannot be called directly. We could instead take FnMut
or even Fn, but that seems like it'd merely complicate matters -- most
of the time, the FnOnce does not constrain us at all anyway. If it does,
a custom Print impl for &'_ SomeStruct is not all that painful.
|
|
|
|
|
|
This introduces a WithFormatter abstraction that permits one-time
fmt::Display on an arbitrary closure, created via `display_fn`. This
allows us to prevent allocation while still using functions instead of
structs, which are a bit unwieldy to thread arguments through as they
can't easily call each other (and are generally a bit opaque).
The eventual goal here is likely to move us off of the formatting
infrastructure entirely in favor of something more structured, but this
is a good step to move us in that direction as it makes, for example,
passing a context describing current state to the formatting impl much
easier.
|
|
|
|
Previously we stored the entire current path which is a bit expensive
and only ever accessed its length. This stores the length directly.
|
|
The alternate mode merely prints out the passed in text which is largely
useless (as the text can simply be directly printed).
|
|
|
|
|
|
|
|
|
|
Fix duplicated bounds printing in rustdoc
Fixes #56331.
Once again, I couldn't find out how to reproduce it with a small code so no test... :-/
r? @QuietMisdreavus
|
|
We are going to uniform the terminology of all associated items.
Methods that may or may not have `self` are called "associated
functions". Because `AssociatedFn` is a bit long, we rename `Associated`
to `Assoc`.
|
|
|
|
Add const generics to rustdoc
Split out from #53645. This work is a collaborative effort with @yodaldevoid.
The `FIXME`s are waiting on a refactor to `LazyConst`. I'll address these in a follow up, but I thought it would be better to implement the rest now to avoid bitrot.
r? @QuietMisdreavus
|
|
|
|
|
|
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
|
|
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
|
|
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
|
|
|
|
|
|
Add support for defining C compatible variadic functions in unsafe rust
with extern "C".
|
|
|
|
rustdoc: respect alternate flag when formatting impl trait
Fixes #58226.
Before:
<img width="963" alt="screen shot 2019-02-12 at 3 23 30 pm" src="https://user-images.githubusercontent.com/1372438/52665732-4496ea00-2eda-11e9-9e29-efffe43b2abf.png">
After:
<img width="964" alt="screen shot 2019-02-12 at 3 23 51 pm" src="https://user-images.githubusercontent.com/1372438/52665733-452f8080-2eda-11e9-999a-dd1fb28dee16.png">
|
|
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
|
|
Cosmetic improvements to doc comments
This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase).
r? @steveklabnik
Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
|
|
|
|
|
|
|
|
|
|
The dyn keyword has been stable for a while now so rustdoc should start using it.
|