| Age | Commit message (Collapse) | Author | Lines |
|
fix rustdoc warnings
|
|
|
|
|
|
Add all remaining `DefKind`s.
r? @eddyb or @Centril
~~I'm not sure if this is what you were thinking of. There are also a few places where I'm not sure what the correct choice is because I don't fully understand the meaning of some variants.~~
~~In general, it feels a bit odd to add some of these as `DefKind`s (e.g. `Arm`) because they don't feel like definitions. Are there things that it makes sense not to add?~~
|
|
Replace filter_map().next() calls with find_map()
These are semantically the same, but `find_map()` is more concise.
|
|
These are semantically the same, but `find_map()` is more concise.
|
|
These are changes that would be needed if we add `#[must_use]` to
`Option::map`, per #71484.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Replace big JS dict with JSON parsing
Part of #56545.
@ollie27 suggested that using JSON instead of a JS dict might be faster, so I decided to test it. And the results far exceeded whatever expectations I had...
I used https://github.com/adamgreig/stm32ral for my tests. If you want to build it locally:
```bash
$ cargo doc --features doc --open
```
But I strongly recommend to do it with this PR. Some numbers:
* Loading a page with the JSON search-index: less than 1 second
* Loading a page with the JS search-index: crashed after 30 seconds
I think the results are clear enough...
r? @ollie27
cc @rust-lang/rustdoc
|
|
This lets us specify the default at the options declaration point,
instead of using `.unwrap(default)` or `None | Some(default)` at some
use point far away. It also makes the code more concise.
|
|
|
|
Dogfood or_patterns in rustdoc
We can start using `or_patterns` in `rustdoc` as a step toward stabilization.
cc #54883 @Centril
|
|
|
|
fix more clippy warnings
|
|
Add illumos triple
This fixes rust-lang/rust#55553 and adds support for `illumos` as a `target_os` on `x86_64`. In addition to the compile spec and libstd additions, several library dependencies have been bumped in order to permit working builds of cargo and rustup for the new target.
Work originally started by @jasonbking, with subsequent additions by @pfmooney and @jclulow.
|
|
Improve rustdoc source code a bit
Very small clean up. I realized that there were too many nested conditions whereas we could just use `and_then`.
r? @kinnison
cc @ollie27
|
|
|
|
clippy::{filter_next,single_char_pattern,unit_arg,identity_conversion,nonminimal_bool}
|
|
Entirely remove `DUMMY_HIR_ID`
Some helpers functions have been introduced to deal with (buggy) cases
where either a `NodeId` or a `DefId` do not have a corresponding `HirId`.
Those cases are tracked in issue #71104.
|
|
ptr: introduce len() method on raw slices
It is already possible to extract the pointer part of a raw slice by a
simple cast, but retrieving the length is not possible without relying
on the representation of the raw slice when it is not valid to convert
the raw slice into a slice reference (i.e. the pointer is null or
unaligned).
~Introduce a new function ptr::slice_len() to add this missing feature.~
Introduce a len() method on raw slices to add this missing feature.
|
|
fix target & runtool args order
- `TargetTripple::to_string` converts "path triples" to `<target>-<hash>`, but in this case we need the path. Afaict there is no method to get the real triple other than manually matching
- the order of the runtools arguments is inconsistent with the way tests usually pass arguments ie using `runner` key in `.cargo/config`
|
|
Co-Authored-By: Jason King <jason.brian.king@gmail.com>
Co-Authored-By: Joshua M. Clulow <jmc@oxide.computer>
|
|
|
|
|
|
Rename fn_has_self_argument to fn_has_self_parameter
Rename AssocItemKind::Method to AssocItemKind::Fn
Refine has_no_input_arg
Refine has_no_input_arg
Revert has_no_input_arg
Refine suggestion_descr
Move as_def_kind into AssocKind
Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
Fix tidy check issue
Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
|
|
Improve scrollbar display in rustdoc
The scrollbar of the left sidebar in rustdoc looks very bad on firefox (on dark theme). This PR improves it:
<div style="display:inline-block;">
<div style="width:50%;display:inline-block;float:left;">
<image src="https://user-images.githubusercontent.com/3050060/78148412-202b0380-7435-11ea-8ff3-79f02ea8f9ed.png">
</div>
<div style="width:50%;display:inline-block;float:left;">
<image src="https://user-images.githubusercontent.com/3050060/78148437-28833e80-7435-11ea-946b-a6fc9320b705.png">
</div>
</div>
With light theme:


And on chrome:


Small extra question: should I extend it to all scrollbars? I think it'd be better but just in case...
r? @kinnison
|
|
Partial work on building with Cargo
This cherry picks the commits I'm directly approving from #70999, I want to land them so that that PR is smaller.
|
|
rustc_session exports it for other crates to avoid mismatching
crate versions.
|
|
Allocate some query results on an arena
This avoids a cloning few `Lrc` and `Vec`s in the queries.
|
|
|
|
|
|
|
|
|
|
|
|
rustdoc: Don't try to load source files from external crates
Local items defined in external macros shouldn't generate rendered source files and should link to the external crate's docs instead.
Part of #70757
r? @GuillaumeGomez
cc @eddyb
|
|
Local items defined in external macros shouldn't generate rendered source files and should link to the external crate's docs instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|