about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-02-09Rollup merge of #107655 - notriddle:notriddle/small-url-encode, r=GuillaumeGomezDylan DPC-64/+54
rustdoc: use the same URL escape rules for fragments as for examples Carries over improvements from #107284
2023-02-09rustdoc: remove unused fn parameter `tab`Michael Howell-7/+5
2023-02-09Introduce `-Zterminal-urls` to use OSC8 for error codesEsteban Küber-0/+1
Terminals supporting the OSC8 Hyperlink Extension can support inline anchors where the text is user defineable but clicking on it opens a browser to a specified URLs, just like `<a href="URL">` does in HTML. https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
2023-02-09Introduce `-Zterminal-urls` to use OSC8 for error codesEsteban Küber-3/+12
Terminals supporting the OSC8 Hyperlink Extension can support inline anchors where the text is user defineable but clicking on it opens a browser to a specified URLs, just like `<a href="URL">` does in HTML. https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
2023-02-09Patch `build/rustfmt/lib/*.so` for NixOSDeadbeef-2/+8
fixes #107676.
2023-02-09Change to `ReError(ErrorGuaranteed)`Esteban Küber-1/+1
2023-02-09Introduce `ReError`Esteban Küber-0/+1
CC #69314
2023-02-09Handled snap curl issue inside Rust #107722Tharun Suresh-2/+2
2023-02-09Rollup merge of #107834 - zephaniahong:issue-107547-fix, r=albertlarsan68Matthias Krüger-12/+17
create symlink for legacy rustfmt path Fixes #107547 . Main change is in the `download.rs` file. Created a symlink for the legacy rustfmt path to the new rustfmt path. Other file changes are simply as a result of porting over the symlink_file function from the Build struct to the config Struct
2023-02-09Rollup merge of #107808 - kadiwa4:built-unsuccessfully, r=albertlarsan68Matthias Krüger-1/+3
bootstrap.py: fix build-failure message A small mistake I did. Corrects #107470, fixes #107804 r? `@albertlarsan68` (since you reviewed the last one)
2023-02-09don't waste half the address space on AVR targetsRalf Jung-5/+11
2023-02-09Merge from rustcRalf Jung-124/+236
2023-02-09Preparing for merge from rustcRalf Jung-1/+1
2023-02-09port over symlink_file function from Build to Config and create symlink for ↵Zephaniah Ong-12/+17
legacy rustfmt path
2023-02-09Remove `QueryContext`.Nicholas Nethercote-2/+2
There is a type `QueryCtxt`, which impls the trait `QueryContext`. Confusingly, there is another type `QueryContext`. The latter is (like `TyCtxt`) just a pointer to a `GlobalContext`. It's not used much, e.g. its `impl` block has a single method. This commit removes `QueryContext`, replacing its use with direct `GlobalCtxt` use.
2023-02-08Rollup merge of #107819 - clubby789:x-py-root, r=jyn514Michael Goulet-3/+7
Set `rust-analyzer.check.invocationLocation` to `root` Add ```json "rust-analyzer.check.invocationLocation": "root", "rust-analyzer.check.invocationStrategy": "once", ``` to the bundled VS code config. This prevents an error with r-a invoking `python3 x.py` in `src/bootstrap` where `x.py` does not exist. r? ``@jyn514``
2023-02-08Rollup merge of #107817 - notriddle:notriddle/wheel-svg, r=GuillaumeGomezMichael Goulet-1/+1
rustdoc: use svgo to shrink `wheel.svg` use [svgo] to shrink `wheel.svg` [svgo]: https://github.com/svg/svgo $ du -bs src/librustdoc/html/static/images/wheel.svg wheel-old.svg 2972 src/librustdoc/html/static/images/wheel.svg 3764 wheel-old.svg 100*((2972-3764)/3764) = -21.04%
2023-02-08Rollup merge of #107790 - tharunsuresh-code:snap_curl, r=jyn514Michael Goulet-8/+10
x.py fails all downloads that use a tempdir with snap curl #107722 Have used the open() library from python to capture the binary output of the curl command and write it to a file using stdout of the subprocess. Added a single-line comment mentioning the redirect operator.
2023-02-08Rollup merge of #107429 - tgross35:from-bytes-until-null-stabilization, ↵Michael Goulet-1/+0
r=dtolnay Stabilize feature `cstr_from_bytes_until_nul` This PR seeks to stabilize `cstr_from_bytes_until_nul`. Partially addresses #95027 This function has only been on nightly for about 10 months, but I think it is simple enough that there isn't harm discussing stabilization. It has also had at least a handful of mentions on both the user forum and the discord, so it seems like it's already in use or at least known. This needs FCP still. Comment on potential discussion points: - eventual conversion of `CStr` to be a single thin pointer: this function will still be useful to provide a safe way to create a `CStr` after this change. - should this return a length too, to address concerns about the `CStr` change? I don't see it as being particularly useful, and it seems less ergonomic (i.e. returning `Result<(&CStr, usize), FromBytesUntilNulError>`). I think users that also need this length without the additional `strlen` call are likely better off using a combination of other methods, but this is up for discussion - `CString::from_vec_until_nul`: this is also useful, but it doesn't even have a nightly implementation merged yet. I propose feature gating that separately, as opposed to blocking this `CStr` implementation on that Possible alternatives: A user can use `from_bytes_with_nul` on a slice up to `my_slice[..my_slice.iter().find(|c| c == 0).unwrap()]`. However; that is significantly less ergonomic, and is a bit more work for the compiler to optimize compared the direct `memchr` call that this wraps. ## New stable API ```rs // both in core::ffi pub struct FromBytesUntilNulError(()); impl CStr { pub const fn from_bytes_until_nul( bytes: &[u8] ) -> Result<&CStr, FromBytesUntilNulError> } ``` cc ```@ericseppanen``` original author, ```@Mark-Simulacrum``` original reviewer, ```@m-ou-se``` brought up some issues on the thin pointer CStr ```@rustbot``` modify labels: +T-libs-api +needs-fcp
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-08Set `rust-analyzer.check.invocationLocation` to `root`clubby789-3/+7
2023-02-08rustdoc: use [svgo] to shrink `wheel.svg`Michael Howell-1/+1
[svgo]: https://github.com/svg/svgo $ du -bs src/librustdoc/html/static/images/wheel.svg wheel-old.svg 2972 src/librustdoc/html/static/images/wheel.svg 3764 wheel-old.svg 100*((2972-3764)/3764) = -21.04%
2023-02-08bootstrap.py: fix build-failure messageKaDiWa-1/+3
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-08 x.py fails all downloads that use a tempdir with snap curl #107722Tharun Suresh-8/+10
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-07rustdoc: simplify DOM for `.item-table`Michael Howell-17/+19
This switches from using `<div>` to the more semantic `<ul>`, and using class names that rhyme with the classes the search results table uses.
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-07fmtRalf Jung-2/+1
2023-02-07Merge from rustcRalf Jung-642/+681