about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-02-09Test XRay only for supported targetsOleksii Lozovskyi-0/+15
Now that the compiler accepts "-Z instrument-xray" option only when targeting one of the supported targets, make sure to not run the codegen tests where the compiler will fail. Like with other compiletests, we don't have access to internals, so simply hardcode a list of supported architectures here.
2023-02-09UI tests for -Z instrument-xrayOleksii Lozovskyi-1/+1
I'm tired of testing it manually, just codify my expectations in tests. They're pretty low-maintenance.
2023-02-09Parse "-Z instrument-xray" codegen optionOleksii Lozovskyi-0/+39
Recognize all bells and whistles that LLVM's XRay pass is capable of. The always/never settings are a bit dumb without attributes but they're still there. The default instruction count is chosen by the compiler, not LLVM pass. We'll do it later.
2023-02-08Rollup merge of #107807 - GuillaumeGomez:fix-small-debug-typo, r=notriddleMatthias Krüger-1/+1
Fix small debug typo r? ``@notriddle``
2023-02-08Fix small debug typoGuillaume Gomez-1/+1
2023-02-08Auto merge of #107788 - matthiaskrgr:rollup-mw10sli, r=matthiaskrgrbors-43/+175
Rollup of 8 pull requests Successful merges: - #107656 (Bump rust-installer) - #107757 (Allow automatically creating vscode `settings.json` with `x setup`) - #107769 (Rename `PointerSized` to `PointerLike`) - #107770 (rustdoc: use a newline instead of `<br>` to format code headers) - #107771 (Tweak ICE message) - #107773 (Clearly signal purpose of the yaml template) - #107776 (Docs: Fix format of headings in String::reserve) - #107779 (Remove astconv usage in diagnostic) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-02-08Rollup merge of #107770 - notriddle:notriddle/br2nl, r=GuillaumeGomezMatthias Krüger-17/+14
rustdoc: use a newline instead of `<br>` to format code headers Since these elements now use `white-space: pre-wrap` since #107615, it's fine to use newlines for formatting, which is smaller and a bit less complicated.
2023-02-08Rollup merge of #107757 - clubby789:setup-settings-json, r=jyn514Matthias Krüger-26/+161
Allow automatically creating vscode `settings.json` with `x setup` Closes #107703
2023-02-08Rollup merge of #107656 - jonhoo:bump-rust-installer, r=Mark-SimulacrumMatthias Krüger-0/+0
Bump rust-installer Makes generation of `manifest.in` deterministic: https://github.com/rust-lang/rust-installer/pull/120
2023-02-08Auto merge of #107778 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 12 commits in e84a7928d93a31f284b497c214a2ece69b4d7719..82c3bb79e3a19a5164e33819ef81bfc2c984bc56 2023-01-31 22:18:09 +0000 to 2023-02-04 22:52:16 +0000 - util toml targets: Do not infer directory as a file (rust-lang/cargo#11678) - Add more guidance on how to implement unstable features (rust-lang/cargo#11675) - Fix unstable chapter layout for codegen-backend (rust-lang/cargo#11676) - refactor: mod.rs over "name".rs for consistency (rust-lang/cargo#11673) - Verify source before recompile (rust-lang/cargo#11672) - doc: more doc comments and intra-doc links (rust-lang/cargo#11669) - Turn off debuginfo for build dependencies v2 (rust-lang/cargo#11252) - config: Deny CARGO_HOME in [env] table (fixes rust-lang/cargo#11590) (rust-lang/cargo#11644) - Fix the wrong comment (rust-lang/cargo#11651) - Add partial support for SSH known hosts markers (rust-lang/cargo#11635) - Replace `winapi` with `windows-sys` crate. (rust-lang/cargo#11656) - Handle .cargo-ok being truncated (rust-lang/cargo#11665) r? `@ghost`
2023-02-07Update cargoWeihang Lo-0/+0
12 commits in e84a7928d93a31f284b497c214a2ece69b4d7719..82c3bb79e3a19a5164e33819ef81bfc2c984bc56 2023-01-31 22:18:09 +0000 to 2023-02-04 22:52:16 +0000 - util toml targets: Do not infer directory as a file (rust-lang/cargo#11678) - Add more guidance on how to implement unstable features (rust-lang/cargo#11675) - Fix unstable chapter layout for codegen-backend (rust-lang/cargo#11676) - refactor: mod.rs over "name".rs for consistency (rust-lang/cargo#11673) - Verify source before recompile (rust-lang/cargo#11672) - doc: more doc comments and intra-doc links (rust-lang/cargo#11669) - Turn off debuginfo for build dependencies v2 (rust-lang/cargo#11252) - config: Deny CARGO_HOME in [env] table (fixes rust-lang/cargo#11590) (rust-lang/cargo#11644) - Fix the wrong comment (rust-lang/cargo#11651) - Add partial support for SSH known hosts markers (rust-lang/cargo#11635) - Replace `winapi` with `windows-sys` crate. (rust-lang/cargo#11656) - Handle .cargo-ok being truncated (rust-lang/cargo#11665)
2023-02-07Auto merge of #107768 - matthiaskrgr:rollup-9u4cal4, r=matthiaskrgrbors-17/+35
Rollup of 8 pull requests Successful merges: - #107719 (Remove `arena_cache` modifier from `upstream_monomorphizations_for`) - #107740 (Avoid locking the global context across the `after_expansion` callback) - #107746 (Split fn_ctxt/adjust_fulfillment_errors from fn_ctxt/checks) - #107749 (allow quick-edit convenience) - #107750 (make more readable) - #107755 (remove binder from query constraints) - #107756 (miri: fix ICE when running out of address space) - #107764 (llvm-16: Use Triple.h from new header location.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-02-07rustdoc: use a newline instead of `<br>` to format code headersMichael Howell-17/+14
Since these elements now use `white-space: pre-wrap` since 784665d4ce59c5239791f1f96fa2137e47ca1817, it's fine to use newlines for formatting, which is smaller and a bit less complicated.
2023-02-07Auto merge of #107767 - matthiaskrgr:rollup-9m1qfso, r=matthiaskrgrbors-39/+4
Rollup of 8 pull requests Successful merges: - #100599 (Add compiler error E0523 long description and test) - #107471 (rustdoc: do not include empty default-settings tag in HTML) - #107555 (Modify existing bounds if they exist) - #107662 (Turn projections into copies in CopyProp.) - #107695 (Add test for Future inflating arg size to 3x ) - #107700 (Run the tools builder on all PRs) - #107706 (Mark 'atomic_mut_ptr' methods const) - #107709 (Fix problem noticed in PR106859 with char -> u8 suggestion) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-02-07Allow automatically creating vscode `settings.json` from bootstrapclubby789-26/+161
2023-02-07Rollup merge of #107756 - RalfJung:miri-out-of-addresses, r=oli-obkMatthias Krüger-16/+33
miri: fix ICE when running out of address space Fixes https://github.com/rust-lang/miri/issues/2769 r? `@oli-obk` I didn't add a test since that requires https://github.com/oli-obk/ui_test/issues/38 (host must be 64bit and target 32bit). Also the test takes ~30s, so I am not sure if we want to have it in the test suite?
2023-02-07Rollup merge of #107750 - tshepang:readability, r=GuillaumeGomezMatthias Krüger-1/+1
make more readable
2023-02-07Rollup merge of #107749 - tshepang:editing-convenience, r=michaelwoeristerMatthias Krüger-0/+1
allow quick-edit convenience
2023-02-07Rollup merge of #107700 - jyn514:tools-builder, r=Mark-SimulacrumMatthias Krüger-38/+1
Run the tools builder on all PRs 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 affected). r? ``@Mark-Simulacrum`` cc ``@pietroalbini`` ``@flip1995`` ``@m-ou-se``
2023-02-07Rollup merge of #107471 - notriddle:notriddle/default-settings, r=GuillaumeGomezMatthias Krüger-0/+2
rustdoc: do not include empty default-settings tag in HTML
2023-02-07Rollup merge of #100599 - MatthewPeterKelly:add-E0523-description-and-test, ↵Matthias Krüger-1/+1
r=compiler-errors,GuillaumeGomez Add compiler error E0523 long description and test This PR is one step towards addressing: https://github.com/rust-lang/rust/issues/61137.
2023-02-07Auto merge of #107671 - CastilloDel:master, r=estebankbors-1/+1
Fix suggestions rendering when the diff span is multiline Fixes #92741 cc `@estebank` I think, I finally fixed. I still want to go back and try to clean up the code a bit. I'm open to suggestions. Some examples of the new suggestions: ``` help: consider removing the borrow | 2 - & | ``` ``` help: consider removing the borrow | 2 - & 3 - mut | ``` ``` help: consider removing the borrow | 2 - & 3 - mut if true { true } else { false } 2 + if true { true } else { false } | ``` Should we add a test to ensure this behavior doesn't disappear in the future?
2023-02-07miri: fix ICE when running out of address spaceRalf Jung-16/+33
2023-02-07Auto merge of #107704 - jyn514:tidy-ci, r=Mark-Simulacrumbors-4/+6
Run `expand-yaml-anchors` in `x test tidy` 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-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-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-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-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-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.