about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-02-07Preparing for merge from rustcRalf Jung-1/+1
2023-02-07Auto merge of #106180 - RalfJung:dereferenceable-generators, r=nbdd0121bors-76/+95
make &mut !Unpin not dereferenceable, and Box<!Unpin> not noalias See https://github.com/rust-lang/unsafe-code-guidelines/issues/381 and [this LLVM discussion](https://discourse.llvm.org/t/interaction-of-noalias-and-dereferenceable/66979). The exact semantics of how `noalias` and `dereferenceable` interact are unclear, and `@comex` found a case of LLVM actually exploiting that ambiguity for optimizations. I think for now we should treat LLVM `dereferenceable` as implying a "fake read" to happen immediately at the top of the function (standing in for the spurious reads that LLVM might introduce), and that fake read is subject to all the usual `noalias` restrictions. This means we cannot put `dereferenceable` on `&mut !Unpin` references as those references can alias with other references that are being read and written inside the function (e.g. for self-referential generators), meaning the fake read introduces aliasing conflicts with those other accesses. For `&` this is already not a problem due to https://github.com/rust-lang/rust/pull/98017 which removed the `dereferenceable` attribute for other reasons. Regular `&mut Unpin` references are unaffected, so I hope the impact of this is going to be tiny. The first commit does some refactoring of the `PointerKind` enum since I found the old code very confusing each time I had to touch it. It doesn't change behavior. Fixes https://github.com/rust-lang/miri/issues/2714 EDIT: Turns out our `Box<!Unpin>` treatment was incorrect, too, so the PR also fixes that now (in codegen and Miri): we do not put `noalias` on these boxes any more.
2023-02-07make more readableTshepang Mbambo-1/+1
2023-02-07allow quick-edit convenienceTshepang Mbambo-0/+1
2023-02-06Rollup merge of #107725 - GuillaumeGomez:turn-markdownwithtoc-into-struct, ↵Matthias Krüger-10/+17
r=notriddle Turn MarkdownWithToc into a struct with named fields Extracted the commit from https://github.com/rust-lang/rust/pull/107640. r? `@notriddle`
2023-02-06Rollup merge of #107596 - Kobzol:stage-build-timer, r=Mark-SimulacrumMatthias Krüger-49/+123
Add nicer output to PGO build timer This PR modifies the timer used in the PGO build script to contain nicer, hierarchical output of the individual build steps. It's not trivial to test locally, so I'll fire up a dist build right away. r? ``@Mark-Simulacrum``
2023-02-06Turn MarkdownWithToc into a struct with named fieldsGuillaume Gomez-10/+17
2023-02-06Add `run-rustfix` to tests/ui/issues/issue-92741.rsCastilloDel-1/+1
2023-02-06Rollup merge of #107669 - notriddle:notriddle/ayu-smaller, r=GuillaumeGomezDylan DPC-34/+14
rustdoc: combine duplicate rules in ayu CSS
2023-02-06Add extended error message for E0523Matthew Kelly-1/+1
Adds the extended error documentation for E0523 to indicate that the error is no longer produced by the compiler. Update the E0464 documentation to include example code that produces the error. Remove the error message E0523 from the compiler and replace it with an internal compiler error.
2023-02-06also do not add noalias on not-Unpin BoxRalf Jung-16/+71
2023-02-06make &mut !Unpin not dereferenceableRalf Jung-60/+24
See https://github.com/rust-lang/unsafe-code-guidelines/issues/381 for discussion.
2023-02-06Auto merge of #107141 - notriddle:notriddle/max-lev-distance-2023, ↵bors-65/+84
r=GuillaumeGomez rustdoc: compute maximum Levenshtein distance based on the query Preview: https://notriddle.com/notriddle-rustdoc-demos/search-lev-distance-2023/std/index.html?search=regex The heuristic is pretty close to the name resolver, maxLevDistance = `Math.floor(queryLen / 3)`. Fixes #103357 Fixes #82131 Similar to https://github.com/rust-lang/rust/pull/103710, but following the suggestion in https://github.com/rust-lang/rust/pull/103710#issuecomment-1296360267 to use `floor` instead of `ceil`, and unblocked now that https://github.com/rust-lang/rust/pull/105796 made it so that setting the max lev distance to `0` doesn't cause substring matches to be removed.
2023-02-05Run `expand-yaml-anchors` in `x test tidy`Joshua Nelson-4/+6
Previously, the pre-commit hook which runs `x test tidy` could pass only to have CI fail within the first 30 seconds. This adds about 30 seconds to `test tidy` (for an initial run, much less after the tool is built the first time) in exchange for catching errors in `.github/workflows/ci.yml` before they're pushed.
2023-02-05Run the tools builder on all PRsJoshua Nelson-38/+1
Previously, it would only run on changes to subtrees, submodules, or select directories. That made it so that changes to the compiler that broke tools would only be detected on a full bors merge. This makes it so the tools builder runs by default, making it easier to catch breaking changes to clippy (which was the most effected).
2023-02-05Add UI test for issue #92741CastilloDel-1/+1
2023-02-05Auto merge of #102842 - rol1510:issue-85566-fix, r=notriddlebors-12/+21
rustdoc: change trait bound formatting Fixes #85566 Before <img width="268" alt="image" src="https://user-images.githubusercontent.com/29011024/208326689-cc9b4bae-529c-473c-81e2-fc5ddb738f07.png"> Now <img width="268" alt="image" src="https://user-images.githubusercontent.com/29011024/216216918-d7923787-3e3b-486d-9735-4cecd2988dba.png">
2023-02-04Rollup merge of #107116 - ozkanonur:consolidate-bootstrap-docs, r=jyn514Matthias Krüger-248/+38
consolidate bootstrap docs With this diff, I tried to consolidate bootstrap documentations and remove the duplicated informations. Coupled with https://github.com/rust-lang/rustc-dev-guide/pull/1563 Resolves #90686 Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-02-04rustdoc: trait bound formattingRoland Strasser-12/+21
rustdoc: fix item-spacer rustdoc: use proper comment style rustdoc: change formatting where clauses for traits rustdoc: remove semicolon from provided methods update provided methods formatting
2023-02-04consolidate bootstrap docsozkanonur-248/+38
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-02-04rustdoc: combine duplicate rules in ayu CSSMichael Howell-34/+14
2023-02-03Bump rust-installerJon Gjengset-0/+0
Makes generation of `manifest.in` deterministic: https://github.com/rust-lang/rust-installer/pull/120
2023-02-03rustdoc: use the same URL escape rules for fragments as for examplesMichael Howell-64/+54
2023-02-04Bump tokio from 1.23.1 to 1.24.2 in /test_dependenciesdependabot[bot]-3/+3
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.23.1 to 1.24.2. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](https://github.com/tokio-rs/tokio/commits) --- updated-dependencies: - dependency-name: tokio dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
2023-02-03Rollup merge of #107615 - notriddle:notriddle/nbsp, r=GuillaumeGomezMichael Goulet-12/+14
Replace nbsp in all rustdoc code blocks Based on #106125 by `@dtolnay` — this PR fixes the line wrapping bug. Fixes #106098. This makes code copyable from rustdoc rendered documentation into a Rust source file.
2023-02-03Auto merge of #2764 - DebugSteven:sleep, r=oli-obkbors-4/+111
Implement epoll_wait This PR continues working on https://github.com/rust-lang/miri/issues/602. This is an implementation for `sleep`, though admittedly not a good one. It just does busy waiting.
2023-02-03Rollup merge of #107544 - nnethercote:improve-TokenCursor, r=petrochenkovDylan DPC-4/+4
Improve `TokenCursor`. Some small improvements, for things that were bugging me. Best reviewed one commit at a time. r? ``@petrochenkov``
2023-02-03re-enable mir-opt testsRalf Jung-2/+1
2023-02-03Replace nbsp in all rustdoc code blocksMichael Howell-12/+14
Co-Authored-By: David Tolnay <dtolnay@gmail.com>
2023-02-03Auto merge of #107625 - matthiaskrgr:rollup-xr9oldy, r=matthiaskrgrbors-29/+24
Rollup of 6 pull requests Successful merges: - #106575 (Suggest `move` in nested closure when appropriate) - #106805 (Suggest `{var:?}` when finding `{?:var}` in inline format strings) - #107500 (Add tests to assert current behavior of large future sizes) - #107598 (Fix benchmarks in library/core with black_box) - #107602 (Parse and recover from type ascription in patterns) - #107608 (Use triple rather than arch for fuchsia test-runner) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-02-03Fix `x fix` on the standard library itselfJoshua Nelson-0/+4
2023-02-03Rollup merge of #107608 - P1n3appl3:master, r=tmandryMatthias Krüger-29/+24
Use triple rather than arch for fuchsia test-runner This allows the user of the test-runner script to specify a full triple rather than just an architecture which helps with the transition from the two component to three component target triples for fuchsia.
2023-02-03Auto merge of #107543 - ehuss:protocol-sparse, r=jyn514bors-0/+3
Enable Cargo's sparse protocol in CI This enables the sparse protocol in CI in order to exercise and dogfood it. This is intended test the production server in a real-world situation. Closes #107342
2023-02-03Auto merge of #107241 - clubby789:bootstrap-lto-off, r=simulacrumbors-1/+17
Add `rust.lto=off` to bootstrap and set as compiler/library default Closes #107202 The issue mentions `embed-bitcode=on`, but here https://github.com/rust-lang/rust/blob/c8e6a9e8b6251bbc8276cb78cabe1998deecbed7/src/bootstrap/compile.rs#L379-L381 it appears that this is always set for std stage 1+, so I'm unsure if changes are needed here. `@rustbot` label +A-bootstrap
2023-02-03Rename `Cursor`/`CursorRef` as `TokenTreeCursor`/`RefTokenTreeCursor`.Nicholas Nethercote-4/+4
This makes it clear they return token trees, and makes for a nice comparison against `TokenCursor` which returns tokens.
2023-02-02Merge from rustcRalf Jung-12/+93
2023-02-02Preparing for merge from rustcRalf Jung-1/+1
2023-02-02Use triple rather than arch for fuchsia test runnerJoseph Ryan-29/+24
2023-02-02Auto merge of #107000 - GuillaumeGomez:fix-items-in-doc-hidden-block, ↵bors-103/+228
r=notriddle,petrochenkov Fix handling of items inside a `doc(hidden)` block Fixes #106373. cc `@aDotInTheVoid` r? `@notriddle`
2023-02-02Make timer hierarchicalJakub Beránek-54/+104
2023-02-02Rollup merge of #107531 - GuillaumeGomez:inline-images-in-css, r=notriddleMatthias Krüger-10/+13
Inline CSS background images directly into the CSS A nice advantage of this is that it removes a few entries in the list of static files. r? ``@notriddle``
2023-02-02Rollup merge of #107312 - calebcartwright:style-let-else, r=joshtriplettMatthias Krüger-0/+78
Add Style Guide rules for let-else statements cc `@rust-lang/style` `@rust-lang/rustfmt` [rendered](https://github.com/calebcartwright/rust/blob/c694d07c6413ba55caa10b9f8b853df7a7792e7c/src/doc/style-guide/src/statements.md#else-blocks-let-else-statements)
2023-02-01docs(style-guide): add rules for let-else statementsCaleb Cartwright-0/+78
2023-02-01Auto merge of #107574 - compiler-errors:back-to-old-mac-builders-pls, ↵bors-1/+1
r=pietroalbini Revert "switch to the macos-12-xl builder" This reverts commit fcbae989ae790d5b9a0a23ceba242d0b0d4e6c5b. This should fix the bors failures in https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/Every.20rust-lang.2Frust.20PR.20is.20failing.20bors
2023-02-01Revert "switch to the macos-12-xl builder"Michael Goulet-1/+1
This reverts commit fcbae989ae790d5b9a0a23ceba242d0b0d4e6c5b.
2023-02-01Print total duration in human timeJakub Beránek-2/+17
2023-02-01Dynamically align values in staged build timer table to avoid overflowJakub Beránek-5/+14
2023-02-01fmtRalf Jung-1/+1
2023-02-01Inline CSS background images directly into the CSSGuillaume Gomez-10/+13
2023-02-01Merge from rustcRalf Jung-917/+935