Skip to content

Commit 5526a2f

Browse files
committed
Auto merge of rust-lang#142795 - Kobzol:rollup-vvnnjno, r=Kobzol
Rollup of 10 pull requests Successful merges: - rust-lang#142629 (Add config builder for bootstrap tests) - rust-lang#142715 (correct template for `#[align]` attribute) - rust-lang#142720 (De-dup common code from `ExternalCrate` methods) - rust-lang#142736 (add issue template for rustdoc) - rust-lang#142743 (rustc-dev-guide subtree update) - rust-lang#142744 (Add a mailmap entry for y21) - rust-lang#142758 (Make sure to rebuild rustdoc if `src/rustdoc-json-types` is changed) - rust-lang#142764 (Convert `ilog(10)` to `ilog10()`) - rust-lang#142767 (Some symbol and PathRoot cleanups) - rust-lang#142769 (remove equivalent new method on context) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 9c4ff56 + e7cc4ec commit 5526a2f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+550
-261
lines changed

.github/ISSUE_TEMPLATE/rustdoc.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: Problem with rustdoc
3+
about: Report an issue with how docs get generated.
4+
labels: C-bug, T-rustdoc
5+
---
6+
<!--
7+
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.
8+
9+
If you have an issue with the actual content of the docs, use the "Documentation problem" template instead.
10+
-->
11+
12+
# Code
13+
<!-- problematic snippet and/or link to repo and/or full path of standard library function -->
14+
15+
```rust
16+
<code>
17+
```
18+
19+
# Reproduction Steps
20+
<!--
21+
* command(s) to run, if any
22+
* permalink to hosted documentation, if any
23+
* search query, if any
24+
-->
25+
26+
# Expected Outcome
27+
<!--
28+
What did you want to happen?
29+
30+
For GUI issues, feel free to provide a mockup image of what you want it to look like.
31+
32+
For diagnostics, please provide a mockup of the desired output in a code block.
33+
-->
34+
35+
# Actual Output
36+
<!--
37+
* rustdoc console output
38+
* browser screenshot of generated html
39+
* rustdoc json (prettify by running through `jq` or running thorugh an online formatter)
40+
-->
41+
```console
42+
<code>
43+
```
44+
45+
46+
# Version
47+
<!--
48+
Available via `rustdoc --version` or under the "Help" menu.
49+
50+
If the issue involves opening the documentation in a browser, please also provide the name and version of the browser used.
51+
-->
52+
53+
# Additional Details
54+
<!-- Anything else you think is relevant -->

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,3 +698,4 @@ Zach Pomerantz <zmp@umich.edu>
698698
Zack Corr <zack@z0w0.me> <zackcorr95@gmail.com>
699699
Zack Slayton <zack.slayton@gmail.com>
700700
Zbigniew Siciarz <zbigniew@siciarz.net> Zbigniew Siciarz <antyqjon@gmail.com>
701+
y21 <30553356+y21@users.noreply.github.com>

compiler/rustc_attr_parsing/src/attributes/repr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ pub(crate) struct AlignParser(Option<(Align, Span)>);
273273

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

278278
fn parse<'c, S: Stage>(
279279
&mut self,

compiler/rustc_attr_parsing/src/context.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -422,19 +422,13 @@ impl<'sess> AttributeParser<'sess, Early> {
422422

423423
parsed.pop()
424424
}
425-
426-
pub fn new_early(sess: &'sess Session, features: &'sess Features, tools: Vec<Symbol>) -> Self {
427-
Self { features: Some(features), tools, parse_only: None, sess, stage: PhantomData }
428-
}
429425
}
430426

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

437-
impl<'sess, S: Stage> AttributeParser<'sess, S> {
438432
pub(crate) fn sess(&self) -> &'sess Session {
439433
&self.sess
440434
}

compiler/rustc_builtin_macros/src/alloc_error_handler.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ pub(crate) fn expand(
6262
fn generate_handler(cx: &ExtCtxt<'_>, handler: Ident, span: Span, sig_span: Span) -> Stmt {
6363
let usize = cx.path_ident(span, Ident::new(sym::usize, span));
6464
let ty_usize = cx.ty_path(usize);
65-
let size = Ident::from_str_and_span("size", span);
66-
let align = Ident::from_str_and_span("align", span);
65+
let size = Ident::new(sym::size, span);
66+
let align = Ident::new(sym::align, span);
6767

6868
let layout_new = cx.std_path(&[sym::alloc, sym::Layout, sym::from_size_align_unchecked]);
6969
let layout_new = cx.expr_path(cx.path(span, layout_new));

compiler/rustc_builtin_macros/src/autodiff.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,8 +652,10 @@ mod llvm_enzyme {
652652
exprs = ecx.expr_call(new_decl_span, bb_call_expr, thin_vec![exprs]);
653653
} else {
654654
let q = QSelf { ty: d_ret_ty, path_span: span, position: 0 };
655-
let y =
656-
ExprKind::Path(Some(P(q)), ecx.path_ident(span, Ident::from_str("default")));
655+
let y = ExprKind::Path(
656+
Some(P(q)),
657+
ecx.path_ident(span, Ident::with_dummy_span(kw::Default)),
658+
);
657659
let default_call_expr = ecx.expr(span, y);
658660
let default_call_expr =
659661
ecx.expr_call(new_decl_span, default_call_expr, thin_vec![]);

compiler/rustc_builtin_macros/src/proc_macro_harness.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub fn inject(
5656
is_test_crate: bool,
5757
dcx: DiagCtxtHandle<'_>,
5858
) {
59-
let ecfg = ExpansionConfig::default("proc_macro".to_string(), features);
59+
let ecfg = ExpansionConfig::default(sym::proc_macro, features);
6060
let mut cx = ExtCtxt::new(sess, ecfg, resolver, None);
6161

6262
let mut collect = CollectProcMacros {

compiler/rustc_builtin_macros/src/standard_library_imports.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub fn inject(
3636
let span = DUMMY_SP.with_def_site_ctxt(expn_id.to_expn_id());
3737
let call_site = DUMMY_SP.with_call_site_ctxt(expn_id.to_expn_id());
3838

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

4242
let ident_span = if edition >= Edition2018 { span } else { call_site };

compiler/rustc_builtin_macros/src/test_harness.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ fn generate_test_harness(
227227
panic_strategy: PanicStrategy,
228228
test_runner: Option<ast::Path>,
229229
) {
230-
let econfig = ExpansionConfig::default("test".to_string(), features);
230+
let econfig = ExpansionConfig::default(sym::test, features);
231231
let ext_cx = ExtCtxt::new(sess, econfig, resolver, None);
232232

233233
let expn_id = ext_cx.resolver.expansion_for_ast_pass(

compiler/rustc_expand/src/errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,12 @@ pub(crate) struct FeatureNotAllowed {
183183
#[derive(Diagnostic)]
184184
#[diag(expand_recursion_limit_reached)]
185185
#[help]
186-
pub(crate) struct RecursionLimitReached<'a> {
186+
pub(crate) struct RecursionLimitReached {
187187
#[primary_span]
188188
pub span: Span,
189189
pub descr: String,
190190
pub suggested_limit: Limit,
191-
pub crate_name: &'a str,
191+
pub crate_name: Symbol,
192192
}
193193

194194
#[derive(Diagnostic)]

0 commit comments

Comments
 (0)