| Age | Commit message (Collapse) | Author | Lines |
|
|
|
GuillaumeGomez:generate-not-more-docs-than-necessary, r=Mark-Simulacrum
Generate not more docs than necessary
This is something that `@Nemo157` was talking about: they wanted that when using `x.py doc std`, it only generated `std` (and the crates "before" it).
r? `@Mark-Simulacrum`
|
|
|
|
|
|
|
|
Support `x.py doc std --open`
I usually run this command:
```
./x.py doc std --stage 1 --jobs 8
```
Then I gave a try to `--open` and realized it wasn't working. I finally realized it was simply because it was only handling paths starting with `library`. This PR allows to handle both kinds of paths.
cc ``@jyn514``
r? ``@Mark-Simulacrum``
|
|
|
|
|
|
|
|
Since compiler/ always passes --document-private-items, it's ok to link
to items that are private.
|
|
1.52 Cargo adds rust-lang/cargo#8640 which means that cargo will try to purge
the doc directory caches for us. In theory this may mean that we can jettison
the clear_if_dirty for rustdoc versioning entirely, but for now just workaround
the effects of this change in a less principled but more local way.
|
|
This way, you can debug rustdoc's JavaScript and CSS file
with normal F12 Dev Tools and you'll have useful line numbers
to work with.
|
|
|
|
|
|
|
|
Document rustc_macros on nightly-rustc
Fixes https://github.com/rust-lang/rust/issues/80345.


r? ``@ehuss``
|
|
|
|
|
|
|
|
Add -Z normalize-docs and enable it for compiler docs
Works around https://github.com/rust-lang/rust/issues/79459 by only enabling normalization for the compiler itself (and anyone who opts-in on nightly). Eventually I want to remove this and enable normalization by default, but that's turned out to be [really hard](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/How.20do.20I.20normalize.20projection.20types.20to.20a.20single.20type.3F/near/218125195).
This uses a command line option instead of a feature gate so it's easier to pass it to all crates at once. Theoretically it's better to use a feature gate instead so that it's easier for people to use on docs.rs, but I'm also not terribly concerned with how easy it to use a temporary hack.
Addresses https://github.com/rust-lang/rust/issues/77459.
|
|
|
|
|
|
|
|
Fix cross compiling dist/build invocations
I am uncertain why the first commit is not affecting CI. I suspect it's because we pass --disable-docs on most of our cross-compilation builders. The second commit doesn't affect CI because CI runs x.py dist, not x.py build.
Both commits are standalone; together they should resolve #76733. The first commit doesn't really fix that issue but rather just fixes cross-compiled x.py dist, resolving a bug introduced in #76549.
|
|
The Rust version number is currently embedded in bootstrap's source
code, which makes it hard to update it automatically or access it
outside of ./x.py (as you'd have to parse the source code).
This commit moves the version number to a standalone plaintext file,
which makes accessing or updating it trivial.
|
|
Otherwise, we may not have a standard library built for the native "host" target
of the rustc being run.
|
|
|
|
|
|
|
|
|
|
clippy::print_literal
clippy::clone_on_copy
clippy::single_char_pattern
clippy::into_iter_on_ref
clippy::match_like_matches_macro
|
|
The directories for core, alloc, std, proc_macro, and test crates now
correspond directly to the crate name and stripping the "lib" prefix is
no longer necessary.
|
|
|
|
|
|
We were setting these in both Builder::cargo and here, which ended up only
setting the first of the two.
|
|
`rustc` allows passing in predefined target triples as well as JSON
target specification files. This change allows bootstrap to have the
first inkling about those differences. This allows building a
cross-compiler for an out-of-tree architecture (even though that
compiler won't work for other reasons).
Even if no one ever uses this functionality, I think the newtype
around the `Interned<String>` improves the readability of the code.
|
|
|
|
Other terms are more inclusive and precise.
|
|
|
|
[rustdoc] Page hash handling
Fixes https://github.com/rust-lang/rust/issues/70476
A good example to see the change is to use this URL: https://doc.rust-lang.org/nightly/std/string/struct.String.html#from_iter.v-3
After the change, it actually goes to the target element (and change the page hash to something more clear for the users).
r? @kinnison
cc @ollie27
|
|
|
|
|
|
|
|
|
|
This should run much faster.
There are also some drive-by cleanups here to try to simplify things.
Also, the paths for in-tree crates are now displayed as relative
in `x.py test -h -v`.
|
|
On my machine, an error looks like:
Finished release [optimized] target(s) in 0.29s
Opening doc /git/rust/build/x86_64-unknown-linux-gnu/doc/std/index.html
command 'xdg-open (internal)' did not execute successfully; exit code: 4
command stderr:
gio: file:///git/rust/build/x86_64-unknown-linux-gnu/doc/std/index.html: Error when getting information for file “/git/rust/build/x86_64-unknown-linux-gnu/doc/std/index.html”: No such file or directory
Build completed successfully in 0:00:08
|
|
Tested with:
# opens doc/index.html
x.py doc --stage 0 --open
x.py doc --stage 0 --open src/doc
# opens doc/book/index.html
x.py doc --stage 0 --open src/doc/book
# opens doc/std/index.html
x.py doc --stage 0 --open src/libstd
# opens doc/proc_macro/index.html
x.py doc --stage 0 --open src/libproc_macro
# opens both
x.py doc --stage 0 --open src/libstd src/libproc_macro
|
|
|
|
So that the rlibs will work with both LTO and non-LTO builds.
|
|
|