Skip to content

Rollup of 11 pull requests #142781

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 56 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
9aa572d
use consistent title capitalization
tshepang May 22, 2025
a4c8ef9
Adjust some doc for Query System
xizheyin Jun 13, 2025
067a99b
install docs for each target in different directory
Forist2034 Jun 13, 2025
94d56d1
Merge pull request #2441 from rust-lang/tshepang-remove-title-case
tshepang Jun 14, 2025
9265493
Merge pull request #2465 from xizheyin/rustc-query
tshepang Jun 14, 2025
a70deb6
content has moved to another chapter
tshepang Jun 14, 2025
9926215
Merge pull request #2466 from rust-lang/tshepang-moved
tshepang Jun 14, 2025
0834e48
use sentence case
tshepang Jun 14, 2025
a3f261c
Merge pull request #2467 from rust-lang/tshepang-patch-1
tshepang Jun 14, 2025
820e88a
title case
tshepang Jun 14, 2025
21a1e51
do not inline links
tshepang Jun 14, 2025
d16e1a1
Merge pull request #2468 from rust-lang/query-cleaning
tshepang Jun 14, 2025
808d16c
Use stage 1 for building docs
Darksonn Jun 16, 2025
3edb332
Merge pull request #2471 from Darksonn/patch-1
Noratrieb Jun 16, 2025
1dbf86a
Remove hanging parenthesis from example signature.
cbloodsworth Jun 16, 2025
02334e1
Merge pull request #2472 from cbloodsworth/fix/tytable_parens
BoxyUwU Jun 16, 2025
8bc55da
Profiling with perf: specify the section of bootstrap settings.
lolbinarycat Jun 17, 2025
671817f
Merge pull request #2475 from lolbinarycat/patch-3
Noratrieb Jun 17, 2025
d96b2d4
Stub chapter and consolidate under `/hir/`
BoxyUwU Jun 6, 2025
42888bb
Write chapter on Unambig vs Ambig Types/Consts
BoxyUwU Jun 17, 2025
c1506c0
Add links
BoxyUwU Jun 17, 2025
39e9800
Reviews
BoxyUwU Jun 18, 2025
6c7830e
Merge pull request #2474 from BoxyUwU/ambig_unambig_ty_consts
BoxyUwU Jun 18, 2025
4145596
fix markup
tshepang Jun 18, 2025
79652d9
Merge pull request #2476 from rust-lang/tshepang-patch-1
tshepang Jun 18, 2025
0a185e4
initial instructions for gpu offload
ZuseZ4 Jun 2, 2025
f25cfe8
Merge pull request #2447 from rust-lang/offload-docs
ZuseZ4 Jun 19, 2025
48b36ee
Preparing for merge from rustc
invalid-email-address Jun 19, 2025
d854d56
Merge from rustc
invalid-email-address Jun 19, 2025
8c28161
Add `get_host_target` function
Kobzol Jun 17, 2025
21d21d5
Normalize host target in snapshot tests
Kobzol Jun 17, 2025
718e475
Clarify arrow in snapshot tests
Kobzol Jun 18, 2025
eefd598
correct template for `#[align]`
folkertdev Jun 19, 2025
aca0688
De-dup common code from `ExternalCrate` methods
yotamofek Jun 19, 2025
6ad42bf
Merge pull request #2477 from rust-lang/rustc-pull
tshepang Jun 19, 2025
dfaa622
add issue template for rustdoc
lolbinarycat Jun 19, 2025
240dc05
Add a mailmap entry for y21
tgross35 Jun 19, 2025
fca6e81
Make sure to rebuild rustdoc if `src/rustdoc-json-types` is changed
jieyouxu Jun 19, 2025
42b0201
Fix `tests/ui/asm/naked-invalid-attr.stderr`.
nnethercote May 27, 2025
4a1f445
Use a symbol for `ExpansionConfig::crate_name`.
nnethercote May 29, 2025
1edf201
Avoid some unnecessary symbol interning.
nnethercote May 29, 2025
b95d39d
Remove an unnecessary check in rustfmt.
nnethercote May 27, 2025
75bcc9c
remove equivalent new method on context
jdonszelmann Jun 19, 2025
d475e10
Add temporary directory for executing snapshot tests
Kobzol Jun 20, 2025
88f1ed4
Convert `ilog(10)` to `ilog10()`
ChaiTRex Jun 20, 2025
aae966e
Rollup merge of #142478 - Forist2034:master, r=clubby789
Kobzol Jun 20, 2025
044b499
Rollup merge of #142629 - Kobzol:bootstrap-tests-builder, r=jieyouxu
Kobzol Jun 20, 2025
480ea7e
Rollup merge of #142715 - folkertdev:fn-align-corrections, r=jdonszel…
Kobzol Jun 20, 2025
99b850e
Rollup merge of #142720 - yotamofek:pr/rustdoc/ext-crate-cleanup, r=G…
Kobzol Jun 20, 2025
b638bec
Rollup merge of #142736 - lolbinarycat:rustdoc-issue-template, r=Guil…
Kobzol Jun 20, 2025
3a676cc
Rollup merge of #142743 - tshepang:rdg-push, r=jieyouxu
Kobzol Jun 20, 2025
509d289
Rollup merge of #142744 - tgross35:y21-mailmap, r=y21
Kobzol Jun 20, 2025
833efa1
Rollup merge of #142758 - jieyouxu:rustdoc-json-types, r=Kobzol
Kobzol Jun 20, 2025
8b8255b
Rollup merge of #142764 - ChaiTRex:ilog_10_to_ilog10, r=workingjubilee
Kobzol Jun 20, 2025
4c899b2
Rollup merge of #142767 - nnethercote:symbol-cleanups, r=petrochenkov
Kobzol Jun 20, 2025
7cb6acc
Rollup merge of #142769 - jdonszelmann:remove-useless-new-method, r=t…
Kobzol Jun 20, 2025
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
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/rustdoc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: Problem with rustdoc
about: Report an issue with how docs get generated.
labels: C-bug, T-rustdoc
---
<!--
Thank you for filing a rustdoc issue! Rustdoc is the tool that handles the generation of docs. It is usually invoked via `cargo doc`, but can also be used directly.
If you have an issue with the actual content of the docs, use the "Documentation problem" template instead.
-->

# Code
<!-- problematic snippet and/or link to repo and/or full path of standard library function -->

```rust
<code>
```

# Reproduction Steps
<!--
* command(s) to run, if any
* permalink to hosted documentation, if any
* search query, if any
-->

# Expected Outcome
<!--
What did you want to happen?
For GUI issues, feel free to provide a mockup image of what you want it to look like.
For diagnostics, please provide a mockup of the desired output in a code block.
-->

# Actual Output
<!--
* rustdoc console output
* browser screenshot of generated html
* rustdoc json (prettify by running through `jq` or running thorugh an online formatter)
-->
```console
<code>
```


# Version
<!--
Available via `rustdoc --version` or under the "Help" menu.
If the issue involves opening the documentation in a browser, please also provide the name and version of the browser used.
-->

# Additional Details
<!-- Anything else you think is relevant -->
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -698,3 +698,4 @@ Zach Pomerantz <[email protected]>
Zack Corr <[email protected]> <[email protected]>
Zack Slayton <[email protected]>
Zbigniew Siciarz <[email protected]> Zbigniew Siciarz <[email protected]>
y21 <[email protected]>
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/attributes/repr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ pub(crate) struct AlignParser(Option<(Align, Span)>);

impl AlignParser {
const PATH: &'static [Symbol] = &[sym::align];
const TEMPLATE: AttributeTemplate = template!(Word, List: "<alignment in bytes>");
const TEMPLATE: AttributeTemplate = template!(List: "<alignment in bytes>");

fn parse<'c, S: Stage>(
&mut self,
Expand Down
8 changes: 1 addition & 7 deletions compiler/rustc_attr_parsing/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,19 +422,13 @@ impl<'sess> AttributeParser<'sess, Early> {

parsed.pop()
}

pub fn new_early(sess: &'sess Session, features: &'sess Features, tools: Vec<Symbol>) -> Self {
Self { features: Some(features), tools, parse_only: None, sess, stage: PhantomData }
}
}

impl<'sess> AttributeParser<'sess, Late> {
impl<'sess, S: Stage> AttributeParser<'sess, S> {
pub fn new(sess: &'sess Session, features: &'sess Features, tools: Vec<Symbol>) -> Self {
Self { features: Some(features), tools, parse_only: None, sess, stage: PhantomData }
}
}

impl<'sess, S: Stage> AttributeParser<'sess, S> {
pub(crate) fn sess(&self) -> &'sess Session {
&self.sess
}
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_builtin_macros/src/alloc_error_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ pub(crate) fn expand(
fn generate_handler(cx: &ExtCtxt<'_>, handler: Ident, span: Span, sig_span: Span) -> Stmt {
let usize = cx.path_ident(span, Ident::new(sym::usize, span));
let ty_usize = cx.ty_path(usize);
let size = Ident::from_str_and_span("size", span);
let align = Ident::from_str_and_span("align", span);
let size = Ident::new(sym::size, span);
let align = Ident::new(sym::align, span);

let layout_new = cx.std_path(&[sym::alloc, sym::Layout, sym::from_size_align_unchecked]);
let layout_new = cx.expr_path(cx.path(span, layout_new));
Expand Down
6 changes: 4 additions & 2 deletions compiler/rustc_builtin_macros/src/autodiff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,10 @@ mod llvm_enzyme {
exprs = ecx.expr_call(new_decl_span, bb_call_expr, thin_vec![exprs]);
} else {
let q = QSelf { ty: d_ret_ty, path_span: span, position: 0 };
let y =
ExprKind::Path(Some(P(q)), ecx.path_ident(span, Ident::from_str("default")));
let y = ExprKind::Path(
Some(P(q)),
ecx.path_ident(span, Ident::with_dummy_span(kw::Default)),
);
let default_call_expr = ecx.expr(span, y);
let default_call_expr =
ecx.expr_call(new_decl_span, default_call_expr, thin_vec![]);
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_builtin_macros/src/proc_macro_harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub fn inject(
is_test_crate: bool,
dcx: DiagCtxtHandle<'_>,
) {
let ecfg = ExpansionConfig::default("proc_macro".to_string(), features);
let ecfg = ExpansionConfig::default(sym::proc_macro, features);
let mut cx = ExtCtxt::new(sess, ecfg, resolver, None);

let mut collect = CollectProcMacros {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn inject(
let span = DUMMY_SP.with_def_site_ctxt(expn_id.to_expn_id());
let call_site = DUMMY_SP.with_call_site_ctxt(expn_id.to_expn_id());

let ecfg = ExpansionConfig::default("std_lib_injection".to_string(), features);
let ecfg = ExpansionConfig::default(sym::std_lib_injection, features);
let cx = ExtCtxt::new(sess, ecfg, resolver, None);

let ident_span = if edition >= Edition2018 { span } else { call_site };
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_builtin_macros/src/test_harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ fn generate_test_harness(
panic_strategy: PanicStrategy,
test_runner: Option<ast::Path>,
) {
let econfig = ExpansionConfig::default("test".to_string(), features);
let econfig = ExpansionConfig::default(sym::test, features);
let ext_cx = ExtCtxt::new(sess, econfig, resolver, None);

let expn_id = ext_cx.resolver.expansion_for_ast_pass(
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_expand/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,12 @@ pub(crate) struct FeatureNotAllowed {
#[derive(Diagnostic)]
#[diag(expand_recursion_limit_reached)]
#[help]
pub(crate) struct RecursionLimitReached<'a> {
pub(crate) struct RecursionLimitReached {
#[primary_span]
pub span: Span,
pub descr: String,
pub suggested_limit: Limit,
pub crate_name: &'a str,
pub crate_name: Symbol,
}

#[derive(Diagnostic)]
Expand Down
10 changes: 5 additions & 5 deletions compiler/rustc_expand/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use rustc_session::lint::builtin::{UNUSED_ATTRIBUTES, UNUSED_DOC_COMMENTS};
use rustc_session::parse::feature_err;
use rustc_session::{Limit, Session};
use rustc_span::hygiene::SyntaxContext;
use rustc_span::{ErrorGuaranteed, FileName, Ident, LocalExpnId, Span, sym};
use rustc_span::{ErrorGuaranteed, FileName, Ident, LocalExpnId, Span, Symbol, sym};
use smallvec::SmallVec;

use crate::base::*;
Expand Down Expand Up @@ -473,7 +473,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
let dir_path = file_path.parent().unwrap_or(&file_path).to_owned();
self.cx.root_path = dir_path.clone();
self.cx.current_expansion.module = Rc::new(ModuleData {
mod_path: vec![Ident::from_str(&self.cx.ecfg.crate_name)],
mod_path: vec![Ident::with_dummy_span(self.cx.ecfg.crate_name)],
file_path_stack: vec![file_path],
dir_path,
});
Expand Down Expand Up @@ -689,7 +689,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
span: expn_data.call_site,
descr: expn_data.kind.descr(),
suggested_limit,
crate_name: &self.cx.ecfg.crate_name,
crate_name: self.cx.ecfg.crate_name,
});

self.cx.trace_macros_diag();
Expand Down Expand Up @@ -2458,7 +2458,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
}

pub struct ExpansionConfig<'feat> {
pub crate_name: String,
pub crate_name: Symbol,
pub features: &'feat Features,
pub recursion_limit: Limit,
pub trace_mac: bool,
Expand All @@ -2471,7 +2471,7 @@ pub struct ExpansionConfig<'feat> {
}

impl ExpansionConfig<'_> {
pub fn default(crate_name: String, features: &Features) -> ExpansionConfig<'_> {
pub fn default(crate_name: Symbol, features: &Features) -> ExpansionConfig<'_> {
ExpansionConfig {
crate_name,
features,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ declare_features! (
(unstable, ffi_pure, "1.45.0", Some(58329)),
/// Controlling the behavior of fmt::Debug
(unstable, fmt_debug, "1.82.0", Some(129709)),
/// Allows using `#[repr(align(...))]` on function items
/// Allows using `#[align(...)]` on function items
(unstable, fn_align, "1.53.0", Some(82232)),
/// Support delegating implementation of functions to other already implemented functions.
(incomplete, fn_delegation, "1.76.0", Some(118212)),
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_hir_pretty/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use rustc_hir::{
TyPatKind,
};
use rustc_span::source_map::SourceMap;
use rustc_span::{FileName, Ident, Span, Symbol, kw};
use rustc_span::{FileName, Ident, Span, Symbol, kw, sym};
use {rustc_ast as ast, rustc_hir as hir};

pub fn id_to_string(cx: &dyn rustc_hir::intravisit::HirTyCtxt<'_>, hir_id: HirId) -> String {
Expand Down Expand Up @@ -1517,7 +1517,7 @@ impl<'a> State<'a> {
self.bopen(ib);

// Print `let _t = $init;`:
let temp = Ident::from_str("_t");
let temp = Ident::with_dummy_span(sym::_t);
self.print_local(false, Some(init), None, |this| this.print_ident(temp));
self.word(";");

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_interface/src/passes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ fn configure_and_expand(
// Create the config for macro expansion
let recursion_limit = get_recursion_limit(pre_configured_attrs, sess);
let cfg = rustc_expand::expand::ExpansionConfig {
crate_name: crate_name.to_string(),
crate_name,
features,
recursion_limit,
trace_mac: sess.opts.unstable_opts.trace_macros,
Expand Down
7 changes: 5 additions & 2 deletions compiler/rustc_passes/src/check_attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use rustc_session::lint::builtin::{
UNKNOWN_OR_MALFORMED_DIAGNOSTIC_ATTRIBUTES, UNUSED_ATTRIBUTES,
};
use rustc_session::parse::feature_err;
use rustc_span::{BytePos, DUMMY_SP, Span, Symbol, edition, sym};
use rustc_span::{BytePos, DUMMY_SP, Span, Symbol, edition, kw, sym};
use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
use rustc_trait_selection::infer::{TyCtxtInferExt, ValuePairs};
use rustc_trait_selection::traits::ObligationCtxt;
Expand Down Expand Up @@ -724,7 +724,10 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
&& !matches!(other_attr.path().as_slice(), [sym::rustfmt, ..])
{
let path = other_attr.path();
let path: Vec<_> = path.iter().map(|s| s.as_str()).collect();
let path: Vec<_> = path
.iter()
.map(|s| if *s == kw::PathRoot { "" } else { s.as_str() })
.collect();
let other_attr_name = path.join("::");

self.dcx().emit_err(errors::NakedFunctionIncompatibleAttribute {
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_resolve/src/def_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::mem;
use rustc_ast::visit::FnKind;
use rustc_ast::*;
use rustc_ast_pretty::pprust;
use rustc_attr_parsing::{AttributeParser, OmitDoc};
use rustc_attr_parsing::{AttributeParser, Early, OmitDoc};
use rustc_expand::expand::AstFragment;
use rustc_hir as hir;
use rustc_hir::def::{CtorKind, CtorOf, DefKind};
Expand Down Expand Up @@ -128,7 +128,7 @@ impl<'a, 'ra, 'tcx> visit::Visitor<'a> for DefCollector<'a, 'ra, 'tcx> {
// FIXME(jdonszelmann) make one of these in the resolver?
// FIXME(jdonszelmann) don't care about tools here maybe? Just parse what we can.
// Does that prevents errors from happening? maybe
let mut parser = AttributeParser::new_early(
let mut parser = AttributeParser::<'_, Early>::new(
&self.resolver.tcx.sess,
self.resolver.tcx.features(),
Vec::new(),
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_span/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,7 @@ symbols! {
__S,
__awaitee,
__try_var,
_d,
_e,
_t,
_task_context,
a32,
aarch64_target_feature,
Expand Down Expand Up @@ -2052,6 +2051,7 @@ symbols! {
static_recursion,
staticlib,
std,
std_lib_injection,
std_panic,
std_panic_2015_macro,
std_panic_macro,
Expand Down
4 changes: 2 additions & 2 deletions library/alloc/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2841,7 +2841,7 @@ macro_rules! impl_to_string {
impl SpecToString for $signed {
#[inline]
fn spec_to_string(&self) -> String {
const SIZE: usize = $signed::MAX.ilog(10) as usize + 1;
const SIZE: usize = $signed::MAX.ilog10() as usize + 1;
let mut buf = [core::mem::MaybeUninit::<u8>::uninit(); SIZE];
// Only difference between signed and unsigned are these 8 lines.
let mut out;
Expand All @@ -2861,7 +2861,7 @@ macro_rules! impl_to_string {
impl SpecToString for $unsigned {
#[inline]
fn spec_to_string(&self) -> String {
const SIZE: usize = $unsigned::MAX.ilog(10) as usize + 1;
const SIZE: usize = $unsigned::MAX.ilog10() as usize + 1;
let mut buf = [core::mem::MaybeUninit::<u8>::uninit(); SIZE];

self._fmt(&mut buf).to_string()
Expand Down
8 changes: 4 additions & 4 deletions library/core/src/fmt/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ macro_rules! impl_Display {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
#[cfg(not(feature = "optimize_for_size"))]
{
const MAX_DEC_N: usize = $unsigned::MAX.ilog(10) as usize + 1;
const MAX_DEC_N: usize = $unsigned::MAX.ilog10() as usize + 1;
// Buffer decimals for $unsigned with right alignment.
let mut buf = [MaybeUninit::<u8>::uninit(); MAX_DEC_N];

Expand All @@ -226,7 +226,7 @@ macro_rules! impl_Display {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
#[cfg(not(feature = "optimize_for_size"))]
{
const MAX_DEC_N: usize = $unsigned::MAX.ilog(10) as usize + 1;
const MAX_DEC_N: usize = $unsigned::MAX.ilog10() as usize + 1;
// Buffer decimals for $unsigned with right alignment.
let mut buf = [MaybeUninit::<u8>::uninit(); MAX_DEC_N];

Expand Down Expand Up @@ -323,7 +323,7 @@ macro_rules! impl_Display {

#[cfg(feature = "optimize_for_size")]
fn $gen_name(mut n: $u, is_nonnegative: bool, f: &mut fmt::Formatter<'_>) -> fmt::Result {
const MAX_DEC_N: usize = $u::MAX.ilog(10) as usize + 1;
const MAX_DEC_N: usize = $u::MAX.ilog10() as usize + 1;
let mut buf = [MaybeUninit::<u8>::uninit(); MAX_DEC_N];
let mut curr = MAX_DEC_N;
let buf_ptr = MaybeUninit::slice_as_mut_ptr(&mut buf);
Expand Down Expand Up @@ -565,7 +565,7 @@ mod imp {
}
impl_Exp!(i128, u128 as u128 via to_u128 named exp_u128);

const U128_MAX_DEC_N: usize = u128::MAX.ilog(10) as usize + 1;
const U128_MAX_DEC_N: usize = u128::MAX.ilog10() as usize + 1;

#[stable(feature = "rust1", since = "1.0.0")]
impl fmt::Display for u128 {
Expand Down
12 changes: 7 additions & 5 deletions src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,13 @@ impl Step for Docs {
let host = self.host;
builder.default_doc(&[]);

let dest = "share/doc/rust/html";
let dest = format!("share/doc/rust/html/{host}");

let mut tarball = Tarball::new(builder, "rust-docs", &host.triple);
tarball.include_target_in_component_name(true);
tarball.set_product_name("Rust Documentation");
tarball.add_bulk_dir(builder.doc_out(host), dest);
tarball.add_file(builder.src.join("src/doc/robots.txt"), dest, FileType::Regular);
tarball.add_bulk_dir(builder.doc_out(host), &dest);
tarball.add_file(builder.src.join("src/doc/robots.txt"), &dest, FileType::Regular);
Some(tarball.generate())
}
}
Expand Down Expand Up @@ -113,12 +114,13 @@ impl Step for JsonDocs {
DocumentationFormat::Json,
));

let dest = "share/doc/rust/json";
let dest = format!("share/doc/rust/json/{host}");

let mut tarball = Tarball::new(builder, "rust-docs-json", &host.triple);
tarball.include_target_in_component_name(true);
tarball.set_product_name("Rust Documentation In JSON Format");
tarball.is_preview(true);
tarball.add_bulk_dir(builder.json_doc_out(host), dest);
tarball.add_bulk_dir(builder.json_doc_out(host), &dest);
Some(tarball.generate())
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/build_steps/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ impl Step for Rustdoc {
&& target_compiler.stage > 0
&& builder.rust_info().is_managed_git_subrepository()
{
let files_to_track = &["src/librustdoc", "src/tools/rustdoc"];
let files_to_track = &["src/librustdoc", "src/tools/rustdoc", "src/rustdoc-json-types"];

// Check if unchanged
if !builder.config.has_changes_from_upstream(files_to_track) {
Expand Down
Loading
Loading