about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-08-15Rollup merge of #128963 - GuillaumeGomez:output-to-stdout, r=aDotInTheVoidMatthias Krüger-21/+59
Add possibility to generate rustdoc JSON output to stdout Fixes #127165. I think it's likely common to want to get rustdoc json output directly instead of reading it from a file so I added this option to allow it. It's unstable and only works with `--output-format=json`. r? `@aDotInTheVoid`
2024-08-15Rollup merge of #127905 - BKPepe:powerpc-muslspe, r=wesleywiserMatthias Krüger-0/+34
Add powerpc-unknown-linux-muslspe compile target This is almost identical to already existing targets: - powerpc_unknown_linux_musl.rs - powerpc_unknown_linux_gnuspe.rs It has support for PowerPC SPE (muslspe), which can be used with GCC version up to 8. It is useful for Freescale or IBM cores like e500. This was verified to be working with OpenWrt build system for CZ.NIC's Turris 1.x routers, which are using Freescale P2020, e500v2, so add it as a Tier 3 target. Follow-up of https://github.com/rust-lang/rust/pull/100860
2024-08-14Auto merge of #128407 - Oneirical:feline-dotestication, r=jieyouxubors-3/+15
Migrate `min-global-align` and `no-alloc-shim` `run-make` tests to rmake Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). Please try: try-job: aarch64-apple try-job: test-various try-job: armhf-gnu try-job: aarch64-gnu try-job: aarch64-gnu
2024-08-14Ensure that `fn config_path` returns canonicalized paths.Lukasz Anforowicz-2/+9
This commit ensures that `fn config_path` in `rustfmt/src/config/mod.rs` always returns canonicalized paths. This is achieved by canonicalizing both: 1) paths received via `CliOptions` (after checking if the path exists) as well as 2) paths returned via `get_toml_path` (canonicalizing within `fn get_toml_path`). Fixes https://github.com/rust-lang/rustfmt/issues/6178
2024-08-14rust-analyzer: use in-tree pattern_analysis crateNadrieril-2/+4
2024-08-15fix r-aSlanterns-1/+1
2024-08-14update rewrite functions in imports.rsding-young-27/+48
2024-08-14disable download-rustc if CI rustc has unsupported optionsonur-ozkan-19/+38
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-14leave a FIXME note for `--set` flags coverageonur-ozkan-0/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-14improve `config::check_incompatible_options_for_ci_rustc` logsonur-ozkan-6/+11
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-14fix the incorrect `unpack`ing logiconur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-14create `const BUILDER_CONFIG_FILENAME` for builder-config fileonur-ozkan-3/+13
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-14Auto merge of #17882 - ShoyuVanilla:issue-17866, r=lnicolabors-3/+35
fix: Panic while canonicalizing erroneous projection type Fixes #17866 The root cause of #17866 is quite horrifyng 😨 ```rust trait T { type A; } type Foo = <S as T>::A; // note that S isn't defined fn main() { Foo {} } ``` While inferencing alias type `Foo = <S as T>::A`; https://github.com/rust-lang/rust-analyzer/blob/78c2bdce860dbd996a8083224d01a96660dd6a15/crates/hir-ty/src/infer.rs#L1388-L1398 the error type `S` in it is substituted by inference var in L1396 above as below; https://github.com/rust-lang/rust-analyzer/blob/78c2bdce860dbd996a8083224d01a96660dd6a15/crates/hir-ty/src/infer/unify.rs#L866-L869 This new inference var's index is `1`, as the type inferecing procedure here previously inserted another inference var into same `InferenceTable`. But after that, the projection type made from the above then passed to the following function; https://github.com/rust-lang/rust-analyzer/blob/78c2bdce860dbd996a8083224d01a96660dd6a15/crates/hir-ty/src/traits.rs#L88-L96 here, a whole new `InferenceTable` is made, without any inference var and in the L94, this table calls; https://github.com/rust-lang/rust-analyzer/blob/78c2bdce860dbd996a8083224d01a96660dd6a15/crates/hir-ty/src/infer/unify.rs#L364-L370 And while registering `AliasEq` `obligation`, this obligation contains inference var `?1` made from the previous table, but this table has only one inference var `?0` made at L365. So, the chalk panics when we try to canonicalize that obligation to register it, because the obligation contains an inference var `?1` that the canonicalizing table doesn't have. Currently, we are calling `InferenceTable::new()` to do some normalizing, unifying or coercing things to some targets that might contain inference var that the new table doesn't have. I think that this is quite dangerous footgun because the inference var is just an index that does not contain the information which table does it made from, so sometimes this "foreign" index might cause panic like this case, or point at the wrong variable. This PR mitigates such behaviour simply by inserting sufficient number of inference vars to new table to avoid such problem. This strategy doesn't harm current r-a's intention because the inference vars that passed into new tables are just "unresolved" variables in current r-a, so this is just making sure that such "unresolved" variables exist in the new table
2024-08-14Update Cargo.lockEric Huss-7/+22
2024-08-14rewrite no-alloc-shim to rmakeOneirical-1/+0
2024-08-14rewrite min-global-align to rmakeOneirical-2/+15
2024-08-14fix: Panic while canonicalizing erroneous projection typeShoyu Vanilla-3/+35
2024-08-14Auto merge of #129092 - jieyouxu:rollup-z2522nm, r=jieyouxubors-12/+0
Rollup of 6 pull requests Successful merges: - #128570 (Stabilize `asm_const`) - #128828 (`-Znext-solver` caching) - #128954 (Explicitly specify type parameter on FromResidual for Option and ControlFlow.) - #129059 (Record the correct target type when coercing fn items/closures to pointers) - #129071 (Port `run-make/sysroot-crates-are-unstable` to rmake) - #129088 (Make the rendered html doc for rustc better) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-14Rollup merge of #129071 - Zalathar:sysroot-unstable, r=jieyouxu许杰友 Jieyou Xu (Joe)-1/+0
Port `run-make/sysroot-crates-are-unstable` to rmake I already have a more elaborate draft at #126231 that tries to port the underlying Python script to rmake, but there's no need for the removal of Makefiles to be held up on complex tasks like that, so this PR simply takes the trivial Makefile and converts it into a trivial rmake recipe. Part of #121876. r? ``@jieyouxu``
2024-08-14Rollup merge of #128570 - folkertdev:stabilize-asm-const, r=Amanieu许杰友 Jieyou Xu (Joe)-11/+0
Stabilize `asm_const` tracking issue: https://github.com/rust-lang/rust/issues/93332 reference PR: https://github.com/rust-lang/reference/pull/1556 this will probably require some CI wrangling (and a rebase), so let's get that over with even though the final required PR is not merged yet. r? `@ghost`
2024-08-14Auto merge of #3712 - tiif:feat/epoll, r=oli-obkbors-75/+1134
Implement epoll shim This PR: - implemented non-blocking ``epoll`` for #3448 . The design for this PR is documented in https://hackmd.io/`@tiif/SJatftrH0` . - renamed FileDescriptor to FileDescriptionRef - assigned an ID to every file description
2024-08-14Auto merge of #17891 - lnicola:binop-bad-lang-items, r=flodieboldbors-9/+45
internal: Be more resilient to bad language item definitions in binop inference Fixes #16287 Fixes #16286 There's one more in `write_fn_trait_method_resolution`, but I'm not sure if it won't cause further problems in `infer_closures`.
2024-08-14Auto merge of #129054 - lnicola:sync-from-ra, r=lnicolabors-2448/+3807
Subtree update of `rust-analyzer` r? `@ghost` CC `@ShoyuVanilla`
2024-08-14Be more resilient to bad language item definitions in binop inferenceLaurențiu Nicola-9/+45
2024-08-14Implement epoll shimtiif-75/+1134
2024-08-14stabilize `is_none_or`Slanterns-1/+0
2024-08-14Auto merge of #129060 - matthiaskrgr:rollup-s72gpif, r=matthiaskrgrbors-10/+10
Rollup of 7 pull requests Successful merges: - #122884 (Optimize integer `pow` by removing the exit branch) - #127857 (Allow to customize `// TODO:` comment for deprecated safe autofix) - #129034 (Add `#[must_use]` attribute to `Coroutine` trait) - #129049 (compiletest: Don't panic on unknown JSON-like output lines) - #129050 (Emit a warning instead of an error if `--generate-link-to-definition` is used with other output formats than HTML) - #129056 (Fix one usage of target triple in bootstrap) - #129058 (Add mw back to review rotation) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-14Use `impl PartialEq<TokenKind> for Token` more.Nicholas Nethercote-5/+3
This lets us compare a `Token` with a `TokenKind`. It's used a lot, but can be used even more, avoiding the need for some `.kind` uses.
2024-08-14Use `impl PartialEq<TokenKind> for Token` more.Nicholas Nethercote-7/+5
This lets us compare a `Token` with a `TokenKind`. It's used a lot, but can be used even more, avoiding the need for some `.kind` uses.
2024-08-14CI: need nightly toolchain for auto-rustup PRRalf Jung-0/+2
2024-08-14fmtRalf Jung-1/+1
2024-08-14Merge from rustcRalf Jung-3172/+5425
2024-08-14Preparing for merge from rustcRalf Jung-1/+1
2024-08-14Auto merge of #17885 - Wilfred:op_queue_docs, r=lnicolabors-0/+20
minor: Add a doc comment for OpQueue Add an explanatory sentence and some sample code to help readers understand why this struct exists.
2024-08-14do not check incompatibility if `config.toml` isn't presentonur-ozkan-17/+19
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-14print values of incompatible optionsonur-ozkan-6/+9
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-14Auto merge of #129076 - matthiaskrgr:rollup-rg8mi2x, r=matthiaskrgrbors-4/+34
Rollup of 6 pull requests Successful merges: - #128410 (Migrate `remap-path-prefix-dwarf` `run-make` test to rmake) - #128759 (alloc: add ToString specialization for `&&str`) - #128873 (Add windows-targets crate to std's sysroot) - #129001 (chore(lib): Enhance documentation for core::fmt::Formatter's write_fm…) - #129061 (Use `is_lang_item` more) - #129062 (Remove a no-longer-true assert) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-14Rollup merge of #128873 - ChrisDenton:windows-targets, r=Mark-SimulacrumMatthias Krüger-1/+1
Add windows-targets crate to std's sysroot With this PR, when backtrace is used as a crate from crates.io it will (once updated) use the real [windows-targets](https://crates.io/crates/windows-targets) crate. But when used from std it'll use std's replacement version. This allows sharing our customized `windows_tagets::link!` macro between std proper and the backtrace crate when used as part of std, ensuring a consistent linking story. This will be especially important once we move to using [`raw-dylib`](https://doc.rust-lang.org/reference/items/external-blocks.html#dylib-versus-raw-dylib) by default.
2024-08-14Rollup merge of #128410 - Oneirical:dwarf-fortestress, r=jieyouxuMatthias Krüger-3/+33
Migrate `remap-path-prefix-dwarf` `run-make` test to rmake Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). Possibly my proudest branch name yet. try-job: aarch64-apple try-job: armhf-gnu try-job: test-various try-job: x86_64-gnu-llvm-18
2024-08-14Auto merge of #128812 - nnethercote:shrink-TyKind-FnPtr, r=compiler-errorsbors-15/+15
Shrink `TyKind::FnPtr`. By splitting the `FnSig` within `TyKind::FnPtr` into `FnSigTys` and `FnHeader`, which can be packed more efficiently. This reduces the size of the hot `TyKind` type from 32 bytes to 24 bytes on 64-bit platforms. This reduces peak memory usage by a few percent on some benchmarks. It also reduces cache misses and page faults similarly, though this doesn't translate to clear cycles or wall-time improvements on CI. r? `@compiler-errors`
2024-08-14Port `run-make/sysroot-crates-are-unstable` to rmakeZalathar-1/+0
2024-08-14Promote Mac Catalyst targets to tier 2, and ship with rustupMads Marquart-12/+20
- aarch64-apple-ios-macabi - x86_64-apple-ios-macabi
2024-08-13docs: Add a doc comment for OpQueueWilfred Hughes-0/+20
Add an explanatory sentence and some sample code to help readers understand why this struct exists.
2024-08-13Re-update to LLVM 19 rc2Josh Stone-0/+0
The update in #128677 was accidentally reverted in #128962.
2024-08-13Update cargoWeihang Lo-0/+0
2024-08-13stabilize `asm_const`Folkert-11/+0
2024-08-13Rollup merge of #129056 - Kobzol:fix-target-triple, r=onur-ozkanMatthias Krüger-1/+1
Fix one usage of target triple in bootstrap This bug was introduced in https://github.com/rust-lang/rust/pull/128983. In this one case, the `TargetSelection` was also used as `Display` (not just as `Path`), which I did not notice in the original PR. If the target contained a custom file, it would be included in its `Display` formatting, even though only the triple should be used. Found [here](https://github.com/rust-lang/rust/pull/128983#issuecomment-2286601889). r? `@onur-ozkan`
2024-08-13Rollup merge of #129050 - ↵Matthias Krüger-3/+5
GuillaumeGomez:generate-link-to-definition-warning, r=notriddle Emit a warning instead of an error if `--generate-link-to-definition` is used with other output formats than HTML Fixes https://github.com/rust-lang/docs.rs/issues/2581. It's a bit weird to emit an error in this case anyway, a warning is more than enough. r? ``@notriddle``
2024-08-13Rollup merge of #129049 - Zalathar:json-like, r=jieyouxuMatthias Krüger-6/+4
compiletest: Don't panic on unknown JSON-like output lines The `json::extract_rendered` function is called for both compiler output and non-compiler output, so it's inappropriate to panic just because a line starting with `{` didn't contain a compiler output message. It is called from two places: when checking the output of a `ui` test process, and when printing the output of an arbitrary non-passing `ProcRes`. So unfortunately there's currently no easy way to know for sure whether it is seeing compiler output or not. Fortunately, neither call site appears to be relying on this panic; it's just an overzealous internal check. Fixes #126373.
2024-08-13Fix intra-doc linkGuillaume Gomez-3/+2