about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-09-06Check if the `libgccjit.so.0` file exists before creating a symlink to itGuillaume Gomez-4/+4
2024-09-06Update to new `Builder` APIGuillaume Gomez-1/+1
2024-09-06Make gcc `root` absoluteGuillaume Gomez-2/+2
2024-09-06Add `gcc` to the `build` commands listGuillaume Gomez-2/+3
2024-09-06Clean code and move check for GCC backend build in `dist.rs` directlyGuillaume Gomez-89/+6
2024-09-06Move HashStamp to helpersGuillaume Gomez-42/+41
2024-09-06Update to new bootstrap APIGuillaume Gomez-17/+15
2024-09-06Update code comments to mention GCC and not LLVMGuillaume Gomez-9/+6
2024-09-06Update GCC versionGuillaume Gomez-0/+0
2024-09-06Correctly generate stamp for gccGuillaume Gomez-2/+6
2024-09-06Ignore gcc submodule for tidy checksGuillaume Gomez-1/+5
2024-09-06Add libgccjit dist generationGuillaume Gomez-7/+248
2024-09-06Add GCC submoduleGuillaume Gomez-0/+0
2024-09-06fix: Properly prevent mir building with unknown types presentLukas Wirth-5/+14
2024-09-06fix: Always explicitly set trait ref self types when loweringLukas Wirth-64/+80
2024-09-06Bump lsp-serverLukas Wirth-7/+7
2024-09-06Fix comment in mutex_id_offsetKonstantinos Andrikopoulos-1/+0
We no longer store the kind inside the pthread_mutex_t, so this comment is outdated.
2024-09-06Auto merge of #129176 - EnzymeAD:enzyme-backend, r=albertlarsan68bors-0/+152
Autodiff Upstreaming - enzyme backend Tracking issue: https://github.com/rust-lang/rust/issues/124509 Part of https://github.com/rust-lang/rust/pull/129175 This PR should allow building Enzyme from source on Tier 1 targets (when also building LLVM), except MSVC. It's only a small fraction (~200 lines) of the whole upstream PR, but due to bootstrapping and the number of configurations in which rustc can be build I assume that this will be the hardest to merge, so I'm starting with it. Happy to hear what changes are required to be able to upstream this code. **Content:** It contains a new configure flag `--enable-llvm-enzyme`, and will build the new Enzyme submodule when it is set. **Discussion:** Apparently Rust CI isn't able to clone repositories outside the rust-lang org? At least I'm seeing this error in CI: ``` git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ``` Does that mean we would need to mirror github.com/EnzymeAD/Enzyme in rust-lang, until LLVM upgrades Enzyme from an Incubator project to something that ships as part of the monorepo? Tracking: - https://github.com/rust-lang/rust/issues/124509
2024-09-06Auto merge of #18066 - Veykril:lsp-server-no-panic, r=Veykrilbors-13/+11
fix: Don't panic lsp writer thread on dropped receiver Should reduce the noise a bit (https://github.com/rust-lang/rust-analyzer/issues/18055). This removes the panic (and a follow up panic) when the server incorrectly shuts down, turning it into a proper late exit error.
2024-09-06fix: Don't panic lsp writer thread on dropped receiverLukas Wirth-13/+11
2024-09-06Auto merge of #3864 - RalfJung:miri-bat-nightly, r=RalfJungbors-2/+2
miri.bat: use nightly toolchain Hopefully fixes https://github.com/rust-lang/miri/issues/3863 (but I can't test that)
2024-09-06miri.bat: use nightly toolchainRalf Jung-2/+2
2024-09-06Auto merge of #18065 - Veykril:catchy-diagnostics, r=Veykrilbors-12/+23
fix: Catch panics from diagnostics computation
2024-09-06fix: Catch panics from diagnostics computationLukas Wirth-12/+23
2024-09-06Rollup merge of #129969 - GrigorenkoPV:boxed-ty, r=compiler-errorsMatthias Krüger-13/+11
Make `Ty::boxed_ty` return an `Option` Looks like a good place to use Rust's type system. --- Most of https://github.com/rust-lang/rust/blob/4ac7bcbaad8d6fd7a51bdf1b696cbc3ba4c796cf/compiler/rustc_middle/src/ty/sty.rs#L971-L1963 looks like it could be moved to `TyKind` (then I guess `Ty` should be made to deref to `TyKind`).
2024-09-06Rollup merge of #129781 - Veykril:lw-x-py-compiler-features, r=albertlarsan68Matthias Krüger-12/+30
Make `./x.py <cmd> compiler/<crate>` aware of the crate's features Does not fix https://github.com/rust-lang/rust/issues/129727 on its own as the way the parallel-compiler cfg and feature flags are setup being generally incompatible with `resolver = 2` but it progresses on the issue. But this should in theory allow compiler crates to work that do not depend on the parallel compiler stuff (so some leaf crates).
2024-09-06Merge from rustcThe Miri Cronjob Bot-379/+1074
2024-09-06Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-09-06Auto merge of #129999 - matthiaskrgr:rollup-pzr9c8p, r=matthiaskrgrbors-11/+43
Rollup of 11 pull requests Successful merges: - #128919 (Add an internal lint that warns when accessing untracked data) - #129472 (fix ICE when `asm_const` and `const_refs_to_static` are combined) - #129653 (clarify that addr_of creates read-only pointers) - #129775 (bootstrap: Try to track down why `initial_libdir` sometimes fails) - #129939 (explain why Rvalue::Len still exists) - #129942 (copy rustc rustlib artifacts from ci-rustc) - #129943 (use the bootstrapped compiler for `test-float-parse` test) - #129944 (Add compat note for trait solver change) - #129947 (Add digit separators in `Duration` examples) - #129955 (Temporarily remove fmease from the review rotation) - #129957 (forward linker option to lint-docs) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-05Enzyme backendManuel Drehwald-0/+152
Co-authored-by: Lorenz Schmidt <bytesnake@mailbox.org>
2024-09-05rustdoc-search: allow trailing `Foo ->` arg searchMichael Howell-5/+6
2024-09-05fix: Updating settings should not clobber discovered projectsWilfred Hughes-61/+85
`linkedProjects` is owned by the user's configuration, so when users update this setting, `linkedProjects` is reset. This is problematic when `linkedProjects` also contains projects discovered with `discoverCommand`. The buggy behaviour occurred when: (1) The user configures `discoverCommand` and loads a Rust project. (2) The user changes any setting in VS Code, so rust-analyzer receives `workspace/didChangeConfiguration`. (3) `handle_did_change_configuration` ultimately calls `Client::apply_change_with_sink()`, which updates `config.user_config` and discards any items we added in `linkedProjects`. Instead, separate out `discovered_projects_from_filesystem` and `discovered_projects_from_command` from user configuration, so user settings cannot affect any type of discovered project. This fixes the subtle issue mentioned here: https://github.com/rust-lang/rust-analyzer/pull/17246#issuecomment-2185259122
2024-09-06Make `Ty::boxed_ty` return an `Option`Pavel Grigorenko-13/+11
2024-09-05bootstrap: pass long options to curlbinarycat-16/+21
2024-09-05Rollup merge of #129957 - chenx97:lint-docs-linker-opt, r=albertlarsan68Matthias Krüger-0/+16
forward linker option to lint-docs This fixes an error found when building the doc for a cross-built toolchain. ``` warning: the code example in lint `unstable_syntax_pre_expansion` in /buildroots/chenx97/rustc-1.80.1-src/compiler/rustc_lint_defs/src/builtin.rs failed to generate the expected output: did not find lint `unstable_syntax_p re_expansion` in output of example, got: error: linking with `cc` failed: exit status: 1 ... ``` Closes: #129956
2024-09-05Rollup merge of #129943 - onur-ozkan:test-float-parse-compiler, r=KobzolMatthias Krüger-2/+4
use the bootstrapped compiler for `test-float-parse` test Fixes https://github.com/rust-lang/rust/pull/122709#issuecomment-2327259336. Blocker for https://github.com/rust-lang/rust/pull/122709
2024-09-05Rollup merge of #129942 - onur-ozkan:building-rustc-tools, r=KobzolMatthias Krüger-1/+6
copy rustc rustlib artifacts from ci-rustc We recently (since https://github.com/rust-lang/rust/pull/129311) had an issue because some rustlib files were missing (like: "error[E0463]: can't find crate for rustc_ast") when building tools that rely on rustc. This patch fixes that by copying those files as required. r? Kobzol Blocker for https://github.com/rust-lang/rust/pull/122709
2024-09-05Rollup merge of #129775 - Zalathar:initial-libdir, r=albertlarsan68Matthias Krüger-8/+14
bootstrap: Try to track down why `initial_libdir` sometimes fails When I try to run `x` commands from the command-line, I occasionally see a mysterious failure that looks something like this: ```text thread 'main' panicked at src/lib.rs:341:14: called `Result::unwrap()` on an `Err` value: StripPrefixError(()) ``` It happens often enough to be annoying, but rarely enough that I can't reproduce it at will. The error message points to a particular `unwrap` call, but doesn't include enough context to determine *why* the failure occurs. Re-running the command almost always works, so I suspect some kind of filesystem race condition (possibly involving VSCode invoking bootstrap at the same time), but there's not much I can do with the information I currently have. So this PR includes some relevant information in the panic message when the failure occurs, in the hope that doing so will make the cause easier to track down when the failure occurs again.
2024-09-05Rollup merge of #128919 - Nadrieril:lint-query-leaks, r=cjgillotMatthias Krüger-0/+3
Add an internal lint that warns when accessing untracked data Some methods access data that is not tracked by the query system and should be used with caution. As suggested in https://github.com/rust-lang/rust/pull/128815#issuecomment-2275488683, in this PR I propose a lint (modeled on the `potential_query_instability` lint) that warns when using some specially-annotatted functions. I can't tell myself if this lint would be that useful, compared to renaming `Steal::is_stolen` to `is_stolen_untracked`. This would depend on whether there are other functions we'd want to lint like this. So far it seems they're called `*_untracked`, which may be clear enough. r? ``@oli-obk``
2024-09-05Add command to report unresolved referencesDavid Richey-0/+200
2024-09-05Rollup merge of #129973 - jieyouxu:rework-rmake-stdio, r=KobzolMatthias Krüger-23/+83
run_make_support: rename `Command::stdin` to `stdin_buf` and add `std{in,out,err}` config helpers Previously `Command::stdin` was actually just a stdin buffer helper, but this is different from `std::process::Command::stdin`. This is needlessly confusing, and blocks support to add `std{in,out,err}` config helpers that tests may want to use to e.g. redirect to `/dev/ptmx`.
2024-09-05Rollup merge of #129796 - GuillaumeGomez:unify-code-examples, r=notriddleMatthias Krüger-135/+172
Unify scraped examples with other code examples Fixes #129763. This first PR both fixes #129763 but also unifies buttons display for code examples: ![image](https://github.com/user-attachments/assets/c8475945-dcc3-4c25-8d7d-1659f85301c8) You can test it [here](https://rustdoc.crud.net/imperio/unify-code-examples/doc/scrape_examples/fn.test.html) and [here](https://rustdoc.crud.net/imperio/unify-code-examples/doc/scrape_examples/fn.test_many.html). I'm planning to send a follow-up to make the buttons generated in JS directly (or I can do it in this PR directly if you prefer). cc ```@willcrichton``` r? ```@notriddle```
2024-09-05update cfgsBoxy-7/+0
2024-09-05fix: Fix parser panicking on invalid asm optionsLukas Wirth-0/+6
2024-09-05Use a `Vec` in `rustc_interface::Config::locale_resources`arnaudgolfouse-2/+2
This allows a third-party tool to injects its own resources, when receiving the config via `rustc_driver::Callbacks::config`.
2024-09-05asm! parsing and lowering fixesLukas Wirth-18/+106
2024-09-05Fix name fetching being incorrect for asm operandsLukas Wirth-93/+107
2024-09-05Add missing doc commentsLukas Wirth-0/+1
2024-09-05Support more IDE features for asm operandsLukas Wirth-40/+180
2024-09-05Give InlineAsmOperand a HIR representationLukas Wirth-217/+409