about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-06-11rustdoc-search: simplify JS in `checkGenerics`Michael Howell-68/+68
2023-06-11Auto merge of #112530 - matthiaskrgr:rollup-qee1kc1, r=matthiaskrgrbors-130/+139
Rollup of 3 pull requests Successful merges: - #112487 (Update documentation for `tools` defaults) - #112513 (Dont compute `opt_suggest_box_span` span for TAIT) - #112528 (bootstrap: Don't override `debuginfo-level = 1` to mean `line-tables-only`) r? `@ghost` `@rustbot` modify labels: rollup
2023-06-11Rollup merge of #112528 - jyn514:fix-debuginfo-level, r=Mark-SimulacrumMatthias Krüger-20/+73
bootstrap: Don't override `debuginfo-level = 1` to mean `line-tables-only` This has real differences in the effective debuginfo: in particular, it omits the module-level information and makes perf less useful (it can't distinguish "self" from "child" time anymore). Allow passing `line-tables-only` directly in config.toml instead. See https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/debuginfo.20in.20try.20builds/near/365090631 and https://rust-lang.zulipchat.com/#narrow/stream/238009-t-compiler.2Fmeetings/topic/.5Bsteering.5D.202023-06-09/near/364883519 for more discussion. This effectively reverts the cargo half of https://github.com/rust-lang/rust/pull/110221 to avoid regressing https://github.com/rust-lang/rust/issues/60020 again in 1.72.
2023-06-11Rollup merge of #112513 - compiler-errors:dont-compute-box-span-for-tait, ↵Matthias Krüger-110/+56
r=cjgillot Dont compute `opt_suggest_box_span` span for TAIT Fixes #112434 Also a couple more commits on top, pruning some dead code and fixing another weird suggestion encountered in the above issue.
2023-06-11Rollup merge of #112487 - zwhiteley:improve-docs, r=Mark-SimulacrumMatthias Krüger-0/+10
Update documentation for `tools` defaults This PR alters the information in the tools profile config to mention that `download-rustc` uses the stage2 toolchain and not the stage1 toolchain (see https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Unable.20to.20compile.20rustc.20MSVC and rust-lang/rustc-dev-guide#1694).
2023-06-11Don't override `debuginfo-level = 1` to mean `line-tables-only`jyn-20/+73
This has real differences in the effective debuginfo: in particular, it omits the module-level information and breaks perf. Allow passing `line-tables-only` directly in config.toml instead.
2023-06-11Auto merge of #111958 - notriddle:notriddle/type-search-slice-array, ↵bors-82/+502
r=GuillaumeGomez rustdoc: search for slices and arrays by type with `[]` This feature extends rustdoc to support the syntax that most users will naturally attempt to use to search for slices and arrays. Part of #60485 Function signature searches already support arrays and slices. The explicit name `primitive:slice<u8>` and `primitive:array<u8>` can be used to match a slice or array of bytes, while square brackets `[u8]` will match either one. Empty square brackets, `[]`, will match any slice regardless of what it contains. Preview: * [`option -> []`](https://notriddle.com/rustdoc-demo-html-3/search-slice-array/std/index.html?search=option%20-%3E%20%5B%5D) * [`[u8] -> str`](https://notriddle.com/rustdoc-demo-html-3/search-slice-array/std/index.html?search=%5Bu8%5D%20-%3E%20str) * [`Box<[u8]> -> str`](https://notriddle.com/rustdoc-demo-html-3/search-slice-array/std/index.html?search=Box%3C%5Bu8%5D%3E%20-%3E%20str) Motivation: When type-based search was first landed, it was directly described as "incomplete". Here's [a comment] from the discussion thread: [a comment]: https://github.com/rust-lang/rust/pull/23289#issuecomment-79437386 > This is looking really great, nice work! I can think of a number of cases that aren't quite covered by this, but I feel like this is a great improvement regardless and it can always be iterated on so I'm fine landing with a few known cases where it may not work :) Filling out the missing functionality is going to mean adding support for more of Rust's [type expression] syntax, such as slices (in this PR), tuples, references, raw pointers, function pointers, and generics. [type expression]: https://doc.rust-lang.org/reference/types.html#type-expressions There does seem to be demand for this sort of thing, such as [this Discord message](https://discord.com/channels/442252698964721669/443150878111694848/1042145740065099796) expressing regret at rustdoc not supporting tuples in search queries.
2023-06-11Auto merge of #112202 - nicklimmm:item-template-derive-macro, r=GuillaumeGomezbors-61/+120
rustdoc: Add `item_template` macro Closes #112021 This change removes the use of `self.borrows()` in Askama templates, removes code duplication from `item_and_mut_cx()`, and improved readability by eliminating the prefix `item_template_` when calling from the template. References: - Discussion issue: https://github.com/rust-lang/rust/issues/112021 - `ItemTemplate` PR: https://github.com/rust-lang/rust/pull/111946 r? `@GuillaumeGomez`
2023-06-11Add `item_template` macroNicky Lim-61/+120
2023-06-11Auto merge of #112466 - lcnr:opaque-type-cleanup, r=compiler-errorsbors-175/+204
opaque type cleanup the commits are pretty self-contained. r? `@compiler-errors` cc `@oli-obk`
2023-06-11Auto merge of #112512 - matthiaskrgr:rollup-o2jh1jx, r=matthiaskrgrbors-46/+292
Rollup of 7 pull requests Successful merges: - #112475 (Fix issue for module name when surround the struct literal with parentheses) - #112477 (Give more helpful progress messages in `Assemble`) - #112484 (Fix ntdll linkage issues on Windows UWP platforms) - #112492 (Migrate GUI colors test to original CSS color format) - #112493 (iat selection: normalize self ty & completely erase bound vars) - #112497 (abs_sub: fix typo 0[-:][+.]0) - #112498 (Update links to Rust Reference in diagnostic) r? `@ghost` `@rustbot` modify labels: rollup
2023-06-11Don't suggest boxing an empty if/else armMichael Goulet-1/+44
2023-06-11Rollup merge of #112498 - SamZhang3:rust-reference-link-update, r=NilstriebMatthias Krüger-9/+9
Update links to Rust Reference in diagnostic Instead of linking to the [old Rust Reference site](https://static.rust-lang.org/doc/master/reference.html#literals), which is severely outdated (Rust 1.17), link to the [current website](https://doc.rust-lang.org/stable/reference/expressions/literal-expr.html) in diagnostic about incorrect literals.
2023-06-11Rollup merge of #112497 - icecream17:patch-1, r=Mark-SimulacrumMatthias Krüger-2/+2
abs_sub: fix typo 0[-:][+.]0
2023-06-11Rollup merge of #112493 - fmease:iat-select-complete-bound-var-erasure, ↵Matthias Krüger-19/+92
r=compiler-errors iat selection: normalize self ty & completely erase bound vars Erase bound vars (most notably late-bound regions) irrespective of their binding level instead of just at the innermost one. Fixes #111404.
2023-06-11Rollup merge of #112492 - GuillaumeGomez:migrate-gui-test-color-13, r=notriddleMatthias Krüger-2/+2
Migrate GUI colors test to original CSS color format Follow-up of https://github.com/rust-lang/rust/pull/111459. r? `@notriddle`
2023-06-11Rollup merge of #112484 - bdbai:fix/uwpntdll, r=ChrisDentonMatthias Krüger-2/+60
Fix ntdll linkage issues on Windows UWP platforms See discussion: https://github.com/rust-lang/rust/issues/112265#issuecomment-1575479683 Static loading `ntdll` functions does not work for UWP programs, which will end up link errors complaining about missing symbols, or failure to pass the WACK tests. The breakage was introduced in #108262. This PR basically reverts part of the changes in #108262 for UWP only, and fixes some lint suggestions.
2023-06-11Rollup merge of #112477 - jyn514:assemble-info, r=clubby789Matthias Krüger-3/+14
Give more helpful progress messages in `Assemble` Before (download-rustc): ``` # no output ``` After (download-rustc): ``` Creating a sysroot for stage2 compiler (use `rustup toolchain link 'name' build/host/stage2`) ``` Before (compiling from source): ``` Building compiler artifacts (stage0 -> stage1, x86_64-unknown-linux-gnu) Assembling stage1 compiler Build stage1 library artifacts (x86_64-unknown-linux-gnu -> i686-unknown-linux-gnu) Building compiler artifacts (stage0:x86_64-unknown-linux-gnu -> stage1:i686-unknown-linux-gnu) Assembling stage1 compiler (i686-unknown-linux-gnu) ``` After (compiling from source): ``` Building compiler artifacts (stage0 -> stage1, x86_64-unknown-linux-gnu) Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`) Build stage1 library artifacts (x86_64-unknown-linux-gnu) Building compiler artifacts (stage0:x86_64-unknown-linux-gnu -> stage1:i686-unknown-linux-gnu) Creating a sysroot for stage1 compiler (i686-unknown-linux-gnu) (use `rustup toolchain link 'name' build/i686-unknown-linux-gnu/stage1`) ``` cc https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Unable.20to.20compile.20rustc.20MSVC, https://discord.com/channels/273534239310479360/957720175619215380/1116867245499498506
2023-06-11Rollup merge of #112475 - chenyukang:yukang-fix-112278, r=compiler-errorsMatthias Krüger-9/+113
Fix issue for module name when surround the struct literal with parentheses Fixes #112278
2023-06-10prune some unused codeMichael Goulet-109/+4
2023-06-10Don't compute opt_suggest_box_span for TAITMichael Goulet-0/+8
2023-06-11iat selection: normalize self ty & completely erase bound varsLeón Orell Valerian Liehr-19/+92
2023-06-10Auto merge of #112256 - jyn514:faster-mingw-check, r=Mark-Simulacrumbors-16/+19
Don't compile rustc to self-test compiletest This was changed from stage 0 to 1 in https://github.com/rust-lang/rust/pull/108905, but I'm not sure why. Change it to `top_stage` instead to allow people to choose the stage. This should save quite a bit of time in the `mingw-check` builder, which explicitly runs `x test --stage 0 compiletest`. Note that this also fixes a latent bug that depended on running `x build compiler` before `x doc compiler`, as well as a couple cleanups related to symlinks (which made the latent bug easier to find). cc `@pietroalbini`
2023-06-10rustdoc: add note about slice/array searches to help popupMichael Howell-22/+22
2023-06-10rustdoc: update book with `[]` syntaxMichael Howell-0/+5
2023-06-10rustdoc: search for slices and arrays by type with `[]`Michael Howell-82/+487
Part of #60485
2023-06-10rustdoc: add test case for `OsString::into_string`Michael Howell-0/+10
2023-06-10Use a better linkHankai Zhang-9/+9
2023-06-10Auto merge of #107637 - fmease:rustdoc-reelide-x-crate-def-tr-obj-lt-bnds, ↵bors-68/+402
r=notriddle,cgillot,GuillaumeGomez rustdoc: re-elide cross-crate default trait-object lifetime bounds Hide trait-object lifetime bounds (re-exported from an external crate) if they coincide with [their default](https://doc.rust-lang.org/reference/lifetime-elision.html#default-trait-object-lifetimes). Partially addresses #44306. Follow-up to #103885. [Zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/clean_middle_ty.3A.20I.20need.20to.20add.20a.20parameter/near/307143097). Most notably, if `std` exported something from `core` containing a type like `Box<dyn Fn()>`, then it would now be rendered as `Box<dyn Fn(), Global>` instead of `Box<dyn Fn() + 'static, Global>` (hiding `+ 'static` as it is the default in this case). Showing `Global` here is a separate issue, #80379, which is on my agenda. Note that I am not really fond of the fact that I had to add a parameter to such a widely used function (30+ call sites) to address such a niche bug. CC `@GuillaumeGomez` Requesting a review from a compiler contributor or team member as recommended on Zulip. r? compiler --- `@rustbot` label T-compiler T-rustdoc A-cross-crate-reexports
2023-06-10Improve documentation for `tools` profileZachary Whiteley-0/+10
Make the build process more beginner friendly: - Include information explaining that the stage2 toolchain should be used (and not the stage1 toolchain) due to the `download-rustc` setting. - Display a message when the user runs `x setup tools` explaining that they should use the stage2 toolchain.
2023-06-10Update links to Rust Reference page on literals in diagnosticHankai Zhang-9/+9
Instead of linking to the old Rust Reference site on static.rust-lang.org, link to the current website doc.rust-lang.org/stable/reference instead in diagnostic about incorrect literals.
2023-06-10Auto merge of #112494 - matthiaskrgr:rollup-xdf3om8, r=matthiaskrgrbors-86/+104
Rollup of 5 pull requests Successful merges: - #112297 (bootstrap: Disallow `--exclude test::std`) - #112298 (Update field-offset and enable unstable_offset_of) - #112335 (ci: Upgrade loongarch64-linux-gnu GCC to 13.1.0) - #112413 (Adjust span labels for `HIDDEN_GLOB_REEXPORTS`) - #112483 (Add deprecation warning to python versions <3.6 in x.py) r? `@ghost` `@rustbot` modify labels: rollup
2023-06-10abs_sub: fix typo 0[-:][+.]0icecream17-2/+2
2023-06-10Rollup merge of #112483 - tgross35:py2-dep-warning, r=Mark-SimulacrumMatthias Krüger-1/+19
Add deprecation warning to python versions <3.6 in x.py Introduced based on conversation on Zulip. This is a repeat of #110439 with two changes: - Warning rather than exit - Can be suppressed via an environment variable The min to not get the warning is set to 3.6 because that's a fairly recent "old" version (went EOL in 2021) and it's the first version to support useful modern features like f-strings and type hints. cc `@Nilstrieb` (author of #110439) and `@Mark-Simulacrum` (reviewer of that PR)
2023-06-10Rollup merge of #112413 - jieyouxu:fix-hidden-glob-reexports-span-order, ↵Matthias Krüger-15/+38
r=petrochenkov Adjust span labels for `HIDDEN_GLOB_REEXPORTS` Addresses https://github.com/rust-lang/rust/pull/111378#issuecomment-1581226063. ### Before This PR The possibility that the private item comes before the glob re-export was not account for, causing the span label messages to say "but private item here shadows it" before "the name `Foo` in the type namespace is supposed to be publicly re-exported here". ### After This PR ```rust warning: private item shadows public glob re-export --> $DIR/hidden_glob_reexports.rs:9:5 | LL | struct Foo; | ^^^^^^^^^^^ the private item here shadows the name `Foo` in the type namespace ... LL | pub use self::inner::*; | -------------- but it is supposed to be publicly re-exported here | = note: `#[warn(hidden_glob_reexports)]` on by default warning: private item shadows public glob re-export --> $DIR/hidden_glob_reexports.rs:27:9 | LL | pub use self::inner::*; | -------------- the name `Foo` in the type namespace is supposed to be publicly re-exported here LL | LL | use self::other::Foo; | ^^^^^^^^^^^^^^^^ but the private item here shadows it ```
2023-06-10Rollup merge of #112335 - loongarch-rs:gcc13, r=Mark-SimulacrumMatthias Krüger-2/+2
ci: Upgrade loongarch64-linux-gnu GCC to 13.1.0 This PR upgrades GCC to 13.1.0 for the `loongarch64-unknown-linux-gnu` target. This upgrade was suggested in a previous review discussion: https://github.com/rust-lang/rust/pull/110519#discussion_r1184613749
2023-06-10Rollup merge of #112298 - est31:update_field_offset, r=Mark-SimulacrumMatthias Krüger-6/+17
Update field-offset and enable unstable_offset_of This makes the compiler use the builtin `offset_of!()` macro, through the wrappers in memoffset and then in field-offset. cc #111839
2023-06-10Rollup merge of #112297 - jyn514:remove-exclude-kind, r=Mark-SimulacrumMatthias Krüger-62/+28
bootstrap: Disallow `--exclude test::std` Use the top-level Kind to determine whether Steps are excluded. Previously, this would use the `Kind` passed to `--exclude` (and not do any filtering at all if no kind was passed). That meant that `x test linkchecker --exclude std` would fail - you had to explicitly say `--exclude test::std`. Change bootstrap to use the top-level Kind instead, which does the right thing automatically. Note that this breaks things like `x test --exclude doc::std`, but I'm not sure why you'd ever want to do that. There's a lot of churn here, but the 1-line change in the first commit is the actual behavior change, the rest is just cleanup. Fixes https://github.com/rust-lang/rust/issues/103201. Note that this effectively reverts most of https://github.com/rust-lang/rust/pull/91965. cc `@pietroalbini`
2023-06-10Auto merge of #111818 - Urgau:uplift_cmp_nan, r=cjgillotbors-308/+604
Uplift `clippy::cmp_nan` lint This PR aims at uplifting the `clippy::cmp_nan` lint into rustc. ## `invalid_nan_comparisons` ~~(deny-by-default)~~ (warn-by-default) The `invalid_nan_comparisons` lint checks comparison with `f32::NAN` or `f64::NAN` as one of the operand. ### Example ```rust,compile_fail let a = 2.3f32; if a == f32::NAN {} ``` ### Explanation NaN does not compare meaningfully to anything – not even itself – so those comparisons are always false. ----- Mostly followed the instructions for uplifting a clippy lint described here: https://github.com/rust-lang/rust/pull/99696#pullrequestreview-1134072751 `@rustbot` label: +I-lang-nominated r? compiler
2023-06-10Keep uwp specific code in sync with windows-sysbdbai-5/+4
2023-06-10Migrate GUI colors test to original CSS color formatGuillaume Gomez-2/+2
2023-06-10Auto merge of #112485 - matthiaskrgr:rollup-ta84xje, r=matthiaskrgrbors-581/+435
Rollup of 6 pull requests Successful merges: - #110141 (expand: Change how `#![cfg(FALSE)]` behaves on crate root) - #112369 (More CGU cleanups) - #112467 (Compile rustc_driver by default) - #112468 (Change format of rustdoc-js tests by putting query and correction directly alongside the expected values) - #112473 (Update cargo) - #112481 (Ignore tests that hang in new solver) r? `@ghost` `@rustbot` modify labels: rollup
2023-06-10Rollup merge of #112481 - compiler-errors:new-solver-ignore-bad-tests, r=lqdMatthias Krüger-7/+13
Ignore tests that hang in new solver This makes it easier to run `--compare-mode=next-solver`, and we can revisit these tests later to find out how to make them less overflowy 😅 r? `@lcnr`
2023-06-10Rollup merge of #112473 - weihanglo:update-cargo, r=weihangloMatthias Krüger-0/+0
Update cargo 12 commits in b0fa79679e717cd077b7fc0fa4166f47107f1ba9..49b6d9e179a91cf7645142541c9563443f64bf2b 2023-06-03 14:19:48 +0000 to 2023-06-09 17:21:19 +0000 - docs: doc comments for all registry kinds (rust-lang/cargo#12247) - chore: Migrate print-ban from test to clippy (rust-lang/cargo#12246) - fix: fetch nested git submodules (rust-lang/cargo#12244) - refactor: registry source cleanup (rust-lang/cargo#12240) - test: loose overly matches for git cli output (rust-lang/cargo#12241) - fix: disable multiplexing on macOS for some versions of curl (rust-lang/cargo#12234) - docs: doc comments for registry source and index (rust-lang/cargo#12239) - doc: point to nightly cargo doc (rust-lang/cargo#12237) - Upgrade to `gix` v0.45 for multi-round pack negotiations. (rust-lang/cargo#12236) - refactor: git source cleanup (rust-lang/cargo#12197) - Add message on reusing previous temporary path on failed cargo installs (rust-lang/cargo#12231) - doc: the first line should be a simple sentence instead of a heading (rust-lang/cargo#12228) r? `@ghost`
2023-06-10Rollup merge of #112468 - GuillaumeGomez:change-rustdoc-js-formats, r=notriddleMatthias Krüger-441/+285
Change format of rustdoc-js tests by putting query and correction directly alongside the expected values As I was working on fixing merge conflicts in #108537, I faced quite a big issue when trying to update the `rustdoc-js*` tests. To make it much simpler, this PR moves the `query` and `correction` directly alongside the expected data so now we know what is the query that is being run without needing to add comments or going back to the top of the file. r? ```@notriddle```
2023-06-10Rollup merge of #112467 - sigaloid:master, r=albertlarsan68Matthias Krüger-1/+6
Compile rustc_driver by default Fixes #112440. It now properly compiles `rustc_driver` and opens the doc page.
2023-06-10Rollup merge of #112369 - nnethercote:more-cgu-cleanups, r=wesleywiserMatthias Krüger-101/+68
More CGU cleanups An assortment of improvements. r? `@wesleywiser`
2023-06-10Rollup merge of #110141 - petrochenkov:cratecfg2, r=WaffleLapkinMatthias Krüger-31/+63
expand: Change how `#![cfg(FALSE)]` behaves on crate root Previously it removed all other attributes from the crate root. Now it removes only attributes below itself (during both regular expansion and pre-configuration). So it becomes possible to configure some global crate properties even for fully unconfigured crates. Fixes https://github.com/rust-lang/rust/issues/104633 Part of https://github.com/rust-lang/rust/issues/110082
2023-06-10Drop uplifted `clippy:cmp_nan`Urgau-301/+70
2023-06-10Uplift improved version of `clippy::cmp_nan` to rustcUrgau-7/+530