about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2022-09-16bump version to 1.66.0Pietro Albini-1/+1
2022-09-16Auto merge of #101711 - chenyukang:fix-101691, r=jyn514bors-0/+37
Copy stage0 binaries into stage0-sysroot Fixes #101691
2022-09-15Auto merge of #101831 - compiler-errors:issue-75899, r=jackh726bors-0/+39
Normalize struct field types in `confirm_builtin_unsize_candidate` Fixes #75899 --- edited to move the normalization into `confirm_builtin_unsize_candidate` instead of the coercion code.
2022-09-15Auto merge of #101410 - dingxiangfei2009:fix-let-else-scoping, r=jackh726bors-1/+22
Reorder nesting scopes and declare bindings without drop schedule Fix #99228 Fix #99975 Storages are previously not declared before entering the `else` block of a `let .. else` statement. However, when breaking out of the pattern matching into the `else` block, those storages are recorded as scheduled for drops. This is not expected. This MR fixes this issue by not scheduling the drops for those storages. cc `@est31`
2022-09-15Auto merge of #101811 - flip1995:clippyup, r=flip1995bors-3/+2
Clippy pre beta branch fix Before beta is branched on Friday, I want to move the `unused_peekable` lint that was added in this release cycle (1.65) to `nursery`. This lint was already reported twice (https://github.com/rust-lang/rust-clippy/issues/9456, https://github.com/rust-lang/rust-clippy/issues/9462) in a short time, so it is probably a good idea to fix it before it hits beta and then stable. r? `@Manishearth`
2022-09-15Rollup merge of #101828 - aDotInTheVoid:test-101743, r=jshaMatthias Krüger-0/+19
Add test for #101743 The issue was closes as we stopped rendering `const`s like this, but if we move back to doing that, make sure we don't accidently generate tags
2022-09-15Rollup merge of #101820 - notriddle:notriddle/a, r=GuillaumeGomezMatthias Krüger-1/+0
rustdoc: remove no-op rule `a { background: transparent }` The background is transparent by default. It was added in 5a01dbe67b43660bf1df96074f34a635aad50e56 to work around a bug in the JavaScript syntax highlighting engine that rustdoc used at the time.
2022-09-15Rollup merge of #101812 - notriddle:notriddle/titles-button, r=GuillaumeGomezMatthias Krüger-23/+6
rustdoc: clean up CSS `#titles` using flexbox This commit allows it to stop manually specifying pixel heights for the tabs on search result pages. There's less messing with manual breakpoints and less complex CSS selectors. # Before ![image](https://user-images.githubusercontent.com/1593513/190215034-253c0f58-07c6-41c9-8848-0442c0522070.png) # After ![image](https://user-images.githubusercontent.com/1593513/190215065-d2453dca-edf0-4353-8fc8-3a3b31f03892.png)
2022-09-15Rollup merge of #101786 - chenyukang:fix-tidy-for-bootstrap, r=jyn514Matthias Krüger-0/+1
Tidy will not check coding style in bootstrap/target `bootstrap/target` may contains the files generated by `rust-analysis`, which we won't want to be checked.
2022-09-15Rollup merge of #101778 - notriddle:notriddle/docblock-short-p, r=GuillaumeGomezMatthias Krüger-38/+26
rustdoc: clean up DOM by removing `.dockblock-short p` On https://doc.rust-lang.org/nightly/std/ this reduces the number out of `document.querySelectorAll("*").length` from 1278 to 1103. Preview: https://notriddle.com/notriddle-rustdoc-test/docblock-short-p/std/index.html
2022-09-15Rollup merge of #101740 - andrewpollack:add-ignore-fuchsia-ui-tests, r=tmandryMatthias Krüger-0/+6
Adding ignore-fuchsia arg to non-applicable compiler ui tests Adding `ignore-fuchsia` flag to tests involving `std::process::Command` calls, and `execve` calls
2022-09-15Rollup merge of #100415 - WorksButNotTested:be8, r=wesleywiserMatthias Krüger-0/+76
Add BE8 support Built using the following `/config.toml` ``` changelog-seen = 2 [llvm] download-ci-llvm = false skip-rebuild = true optimize = true ninja = true targets = "ARM;X86" clang = false [build] target = ["x86_64-unknown-linux-gnu", "armeb-linux-gnueabi"] docs = false docs-minification = false compiler-docs = false [install] prefix = "/home/user/x-tools/rust/" [rust] debug-logging=true backtrace = true incremental = true [target.x86_64-unknown-linux-gnu] [dist] [target.armeb-linux-gnueabi] cc = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-gcc" cxx = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-g++" ar = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-ar" ranlib = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-ranlib" linker = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-gcc" llvm-config = "/home/user/x-tools/clang/bin/llvm-config" llvm-filecheck = "/home/user/x-tools/clang/bin/FileCheck" ``` The following `.cargo/config` is needed inside any project directory: ``` [build] target = "armeb-linux-gnueabi" [target.armeb-linux-gnueabi] linker = "armeb-linux-gnueabi-gcc" ```
2022-09-15Auto merge of #101830 - nnethercote:streamline-register_res, r=jyn514bors-21/+5
Streamline `register_res`. Turns out it's only ever passed a `Res::Def`. r? `@jyn514`
2022-09-15enclose else block in terminating scopeDing Xiang Fei-2/+1
2022-09-15add test for #99975Ding Xiang Fei-0/+20
2022-09-15reorder nesting scopes and declare bindings without drop scheduleDing Xiang Fei-1/+3
2022-09-15Normalize struct types in confirm_builtin_unsize_candidateMichael Goulet-0/+39
2022-09-15Auto merge of #101620 - cjgillot:compute_lint_levels_by_def, r=oli-obkbors-19/+74
Compute lint levels by definition Lint levels are currently computed once for the whole crate. Any code that wants to emit a lint depends on this single `lint_levels(())` query. This query contains the `Span` for each attribute that participates in the lint level tree, so any code that wants to emit a lint basically depends on the spans in all files in the crate. Contrary to hard errors, we do not clear the incremental session on lints, so this implicit world dependency pessimizes incremental reuse. (And is furthermore invisible for allowed lints.) This PR completes https://github.com/rust-lang/rust/pull/99634 (thanks for the initial work `@fee1-dead)` and includes it in the dependency graph. The design is based on 2 queries: 1. `lint_levels_on(HirId) -> FxHashMap<LintId, LevelAndSource>` which accesses the attributes at the given `HirId` and processes them into lint levels. The `TyCtxt` is responsible for probing the HIR tree to find the user-visible level. 2. `lint_expectations(())` which lists all the `#[expect]` attributes in the crate. This PR also introduces the ability to reconstruct a `HirId` from a `DepNode` by encoding the local part of the `DefPathHash` and the `ItemLocalId` in the two `u64` of the fingerprint. This allows for the dep-graph to directly recompute `lint_levels_on` directly, without having to force the calling query. Closes https://github.com/rust-lang/rust/issues/95094. Supersedes https://github.com/rust-lang/rust/pull/99634.
2022-09-15Streamline `register_res`.Nicholas Nethercote-21/+5
Turns out it's only ever passed a `Res::Def`.
2022-09-14Add test for #101743Nixon Enraght-Moony-0/+19
2022-09-14rustdoc: remove no-op rule `a { background: transparent }`Michael Howell-1/+0
The background is transparent by default. It was added in 5a01dbe67b43660bf1df96074f34a635aad50e56 to work around a bug in the JavaScript syntax highlighting engine that rustdoc used at the time.
2022-09-14Temporarily move clippy::unused_peekable to nurseryPhilipp Krones-3/+2
2022-09-14Auto merge of #101212 - eholk:dyn-star, r=compiler-errorsbors-10/+144
Initial implementation of dyn* This PR adds extremely basic and incomplete support for [dyn*](https://smallcultfollowing.com/babysteps//blog/2022/03/29/dyn-can-we-make-dyn-sized/). The goal is to get something in tree behind a flag to make collaboration easier, and also to make sure the implementation so far is not unreasonable. This PR does quite a few things: * Introduce `dyn_star` feature flag * Adds parsing for `dyn* Trait` types * Defines `dyn* Trait` as a sized type * Adds support for explicit casts, like `42usize as dyn* Debug` * Including const evaluation of such casts * Adds codegen for drop glue so things are cleaned up properly when a `dyn* Trait` object goes out of scope * Adds codegen for method calls, at least for methods that take `&self` Quite a bit is still missing, but this gives us a starting point. Note that this is never intended to become stable surface syntax for Rust, but rather `dyn*` is planned to be used as an implementation detail for async functions in dyn traits. Joint work with `@nikomatsakis` and `@compiler-errors.` r? `@bjorn3`
2022-09-14Changes to rename target and update docsYour Name-13/+14
2022-09-14Bless ui test.Camille GILLOT-11/+66
2022-09-14Compute `lint_levels` by definitionDeadbeef-8/+8
2022-09-14rustdoc: clean up CSS `#titles` using flexboxMichael Howell-23/+6
This commit allows it to stop manually specifying pixel heights for the tabs on search result pages. There's less messing with manual breakpoints and less complex CSS selectors.
2022-09-14Rollup merge of #101779 - eholk:drop-tracking-test-output, r=jyn514Dylan DPC-72/+372
Update test output for drop tracking #97334 has a lot of updates to test outputs that makes the PR larger than it needs to be. This PR pulls those changes out so we can keep the other one as simple as possible. r? `@jyn514`
2022-09-14Rollup merge of #101773 - notriddle:notriddle/content-table, r=GuillaumeGomezDylan DPC-9/+1
rustdoc: remove outdated CSS `.content table` etc # Screenshot before ![image](https://user-images.githubusercontent.com/1593513/189992665-238aab28-d224-4466-901c-6e35e79182fb.png) # Screenshot after ![image](https://user-images.githubusercontent.com/1593513/189992762-35c8efe4-e980-40bd-b72c-3ae4cfd6f830.png) # Description The `.content table` / `.content td` / `.content tr` family of selectors date back to 4fd061c426902b0904c65e64a3780b21f9ab3afb, when module indexes and other parts of rustdoc used `<table>` tags for layout and content presentation. The `.content td h1, .content td h2` has only been changed since then to tweak the font size in dd5ff428edbc7cd4fa600b81f27bbec28589704f. https://github.com/rust-lang/rust/blob/4fd061c426902b0904c65e64a3780b21f9ab3afb/src/rustdoc_ng/html/static/main.css#L155-L162 This CSS would have affected: * search result tables, which were removed in b615c0c85469c94041a5e68b9d8b68dcf799f9f1 * module item tables, which were removed in 6020c79ddeafe8d9760b27c14c39da81bac9b4a6 * docblock tables from markdown, which still exist It may also have affected a few other tables over the last decade, but they've been gradually replaced with grid layouts and flexbox to make layouts that work better on narrow viewports. For example, 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9. These rules have no affect on the appearance of docblock tables --------------------------------------------------------------- .content table { border-spacing: 0 5px; } According to MDN, [border-spacing] only has an effect when `border-collapse` is `separate`. However, `border-collapse: collapse` is set globally for all tables, so this rule does nothing. [border-spacing]: https://developer.mozilla.org/en-US/docs/Web/CSS/border-spacing .content td p:first-child { margin-top: 0; } Tables with paragraphs in them are impossible without dropping down to raw HTML. Also, the rustdoc stylesheet sets paragraphs to have no top margin anyway, so this rule is a no-op. .content td h1, .content td h2 { margin-left: 0; font-size: 1.125rem; } Tables with headers in them are impossible without dropping down to raw HTML. This is considered unlikely, especially since it looks weird right now (`.docblock h2` has an underline that is redundant with the table cell's own border). .content tr:first-child td { border-top: 0; } This has no effect because of border collapsing. This rule is removed, because tables look fine without it --------------------------------------------------------- .content td:first-child { padding-right: 20px; } By removing this rule, the first cell in each row has the same padding as all other cells in the row. This rule is kept, and converted to directly target `.docblock` --------------------------------------------------------------- .content td { vertical-align: top; } Removing this rule would cause it to be aligned to the middle instead.
2022-09-14Rollup merge of #101769 - notriddle:notriddle/out-of-band-span-since, ↵Dylan DPC-1/+0
r=GuillaumeGomez rustdoc: remove redundant CSS `.out-of-band > span.since { position }` At the time this CSS was added, it was just `span.since`, because the version info could be rendered in two different ways: 1. `<div class='since'>` was used for associated items like methods. It was absolutely positioned, and the selector in rustdoc.css that targetted it was just `.since`. https://github.com/rust-lang/rust/blob/a5a2f2b951ea982a666eaf52b1874d8f1b17290b/src/librustdoc/html/static/rustdoc.css#L522-L529 2. `<span class='since'>` was introduced in a5a2f2b951ea982a666eaf52b1874d8f1b17290b for page-global version info, so that it could be laid out alongside the `[-]`/`[+]` button. This CSS rule was added to override the absolute position introduced in (1). https://github.com/rust-lang/rust/blob/a5a2f2b951ea982a666eaf52b1874d8f1b17290b/src/librustdoc/html/static/rustdoc.css#L637-L641 The selector was changed in 8fc6e420d16dc882f2047e6ec1b981cac5ef0d14 so that everything could use a `<span>` tag, but the dichotomy of the absolutely-positioned version info for associated items and the static positioned item version info remained. The absolutely positioned `.since` was changed to one nested below a `<div class="rightside">` container in 5de1391b88007a1d4f7b1517657a86aae352af1e, so the version information is now always statically-positioned, and, as described in the commit message, "their DOM representation is consistent."
2022-09-14Rollup merge of #101433 - jackh726:better-static-placeholder-error, ↵Dylan DPC-0/+200
r=compiler-errors Emit a note that static bounds from HRTBs are a bug This note isn't perfect, but opening this to either 1) land as is or 2) get some feedback on how to improve it Let r? `@compiler-errors` and cc. `@nikomatsakis`
2022-09-14tidy will not check coding style in bootstrap/targetyukang-0/+1
2022-09-14Auto merge of #101709 - nnethercote:simplify-visitors-more, r=cjgillotbors-11/+11
Simplify visitors more A successor to #100392. r? `@cjgillot`
2022-09-13Use Predicate ConstraintCategory when normalizingJack Huey-0/+133
2022-09-13Better errors for implied static boundJack Huey-0/+67
2022-09-13Auto merge of #101776 - weihanglo:update-cargo, r=ehussbors-0/+0
Update cargo 10 commits in 646e9a0b9ea8354cc409d05f10e8dc752c5de78e..082503982ea0fb7a8fd72210427d43a2e2128a63 2022-09-02 14:29:28 +0000 to 2022-09-13 17:49:38 +0000 - Take priority into account within the pending queue (rust-lang/cargo#11032) - fix(add): Clarify which version the features are added for (rust-lang/cargo#11075) - doc: clarify config-relative paths for `--config <path>` (rust-lang/cargo#11079) - Do not add home bin path to PATH if it's already there (rust-lang/cargo#11023) - Don't use `for` loop on an `Option` (rust-lang/cargo#11081) - Remove dead code (rust-lang/cargo#11080) - Change progress indicator for sparse registries (rust-lang/cargo#11068) - chore(ci): Ensure intradoc links are valid (rust-lang/cargo#11055) - Cache index files based on contents hash (rust-lang/cargo#11044) - fix: specifies the max length for crate name (rust-lang/cargo#11051)
2022-09-13rustdoc: clean up DOM by removing `.dockblock-short p`Michael Howell-38/+26
On https://doc.rust-lang.org/nightly/std/ this reduces the number out of `document.querySelectorAll("*").length` from 1278 to 1103.
2022-09-13Update parsing testEric Holk-3/+3
2022-09-13Update must_not_suspend/ref.rsEric Holk-10/+37
2022-09-13Update partial-drop-partial-reinit.rsEric Holk-7/+45
2022-09-13Update issue-65436-raw-ptr-not-send.rsEric Holk-6/+10
2022-09-13Update issue-70935-complex-spans.rsEric Holk-10/+11
2022-09-13Address code review commentsEric Holk-199/+134
2022-09-13Update issue-68114.rsEric Holk-16/+103
2022-09-13Update issue-64130-4-async-move.rsEric Holk-6/+36
2022-09-13Update async-await-let-else for drop trackingEric Holk-17/+130
2022-09-13Auto merge of #101777 - matthiaskrgr:rollup-x2dyaa2, r=matthiaskrgrbors-153/+559
Rollup of 7 pull requests Successful merges: - #101266 (translations(rustc_session): migrates rustc_session to use SessionDiagnostic - Final) - #101737 (rustdoc: remove no-op CSS `.search-results .result-name > span`) - #101752 (Improve Attribute doc methods) - #101754 (Fix doc of log function) - #101759 (:arrow_up: rust-analyzer) - #101765 (Add documentation for TyCtxt::visibility) - #101770 (Rustdoc-Json: Don't loose subitems of foreign traits.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-09-13Rollup merge of #101770 - aDotInTheVoid:rdj-index-clone, r=GuillaumeGomezMatthias Krüger-4/+27
Rustdoc-Json: Don't loose subitems of foreign traits. Previously, we'd clone the index, and extend it with foreign traits. But when doing this, traits would render their subitems without them going into the index being used in the output leading to dangling ID's. r? `@GuillaumeGomez`
2022-09-13Rollup merge of #101759 - lnicola:rust-analyzer-2022-09-13, r=lnicolaMatthias Krüger-143/+529
:arrow_up: rust-analyzer r? `@ghost`
2022-09-13Rollup merge of #101737 - ↵Matthias Krüger-6/+3
notriddle:notriddle/search-results-result-name-span, r=GuillaumeGomez rustdoc: remove no-op CSS `.search-results .result-name > span` The rule `display: inline-block` was added in 5afa52bc7dee683f25f437dddf338dbc6ad32eb8. The `margin: 0` and `font-weight: normal` were added in c01bd560e2f87a9a960ed071213edd70f73171a8. Both seem to have been added to override class-based rules that were targetted at method sections. See <https://github.com/rust-lang/rust/blob/c01bd560e2f87a9a960ed071213edd70f73171a8/src/librustdoc/html/static/rustdoc.css#L140-L148> for an example. The selectors that these were meant to override were changed in a8318e420d19c364b1eec33956a86164941f6df4 and 76a3b609d0b93c5d8da5e4e3db37bd03e5cb1c30 to be more specific, so they no longer need to be overridden.