about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-08-22Make Tree Borrows Provenance GC no longer produce stack overflowsJohannes Hostert-47/+74
2024-08-22Auto merge of #129338 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 12 commits in ba8b39413c74d08494f94a7542fe79aa636e1661..8f40fc59fb0c8df91c97405785197f3c630304ea 2024-08-16 22:48:57 +0000 to 2024-08-21 22:37:06 +0000 - Tests rely on absence of RUST_BACKTRACE (rust-lang/cargo#14441) - fix: -Cmetadata includes whether extra rustflags is same as host (rust-lang/cargo#14432) - [mdman] Normalize newlines when rendering options (rust-lang/cargo#14428) - fix: doctest respects Cargo's color options (rust-lang/cargo#14425) - Be more permissive while packaging unpublishable crates. (rust-lang/cargo#14408) - fix: Limiting pre-release match semantics to use only on `OptVersionReq::Req` (rust-lang/cargo#14412) - test: add a regression test for Issue 14409 (rust-lang/cargo#14430) - chore: update label trigger for Command-info (rust-lang/cargo#14422) - doc: add lockfile-path unstable doc section (rust-lang/cargo#14423) - doc: update lockfile-path tracking issue (rust-lang/cargo#14424) - fix: remove list owners feature of info subcommand (rust-lang/cargo#14418) - Lockfile path tests (follow-up) (rust-lang/cargo#14417)
2024-08-22Drop MacroInputKindLukas Wirth-74/+24
2024-08-22Remove DescendPreference::SameTextLukas Wirth-229/+304
2024-08-22stabilize const_fn_floating_point_arithmeticRalf Jung-35/+29
2024-08-22Update cargoWeihang Lo-0/+0
2024-08-22Auto merge of #129365 - matthiaskrgr:rollup-ebwx6ya, r=matthiaskrgrbors-25/+2
Rollup of 9 pull requests Successful merges: - #127279 (use old ctx if has same expand environment during decode span) - #127945 (Implement `debug_more_non_exhaustive`) - #128941 ( Improve diagnostic-related lints: `untranslatable_diagnostic` & `diagnostic_outside_of_impl`) - #129070 (Point at explicit `'static` obligations on a trait) - #129187 (bootstrap: fix clean's remove_dir_all implementation) - #129231 (improve submodule updates) - #129264 (Update `library/Cargo.toml` in weekly job) - #129284 (rustdoc: animate the `:target` highlight) - #129302 (compiletest: use `std::fs::remove_dir_all` now that it is available) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-21Rollup merge of #129363 - Urgau:run-make-lc_all-c, r=jieyouxuMatthias Krüger-0/+2
Force `LC_ALL=C` for all run-make tests This PR adds `LC_ALL=C` for all run-make tests so that they become locale independent. Fixes #129362 r? `@jieyouxu`
2024-08-21epoll test: avoid some subtly dangling pointersRalf Jung-24/+4
2024-08-21Rollup merge of #129302 - jieyouxu:compiletest-RAGEY, r=compiler-errorsMatthias Krüger-25/+2
compiletest: use `std::fs::remove_dir_all` now that it is available It turns out `aggressive_rm_rf` is not sufficiently aggressive (RAGEY) on Windows and obviously handles Windows symlinks incorrectly. Instead of rolling our own version, let's use `std::fs::remove_dir_all` now that it's available (well, it's been available for a good while, but probably wasn't available when this helper was written). cc #129187 since basically this is failing due to similar problems. Blocker for #128562. Fixes #129155. Fixes #126334.
2024-08-21Force `LC_ALL=C` for all run-make testsUrgau-0/+2
2024-08-22fix: Wrong `Sized` predicate for `generic_predicates_for_param`Shoyu Vanilla-0/+4
2024-08-21add a test for zero-sized protectorsRalf Jung-4/+72
2024-08-21internal: Implement `module_path` macroLukas Wirth-71/+279
2024-08-21Run flycheck only on crate if target is binary.Ali Bektas-27/+58
2024-08-20Rollup merge of #128932 - bvanjoi:issue-128813, r=petrochenkovMatthias Krüger-2/+1
skip updating when external binding is existed Fixes #128813 For following code: ```rs extern crate core; fn f() { use ::core; } macro_rules! m { () => { extern crate std as core; }; } m!(); fn main() {} ``` - In the first loop, we define `extern crate core` and `use ::core` will be referred to `core` (yes, it does not consider if there are some macros that are not expanded. Ideally, this should be delayed if there are some unexpanded macros in the root, but I didn't change it like that because it seems like a huge change). - Then `m` is expanded, which makes `extern_prelude('core')` return `std` rather than `core`, causing the inconsistency. r? `@petrochenkov`
2024-08-21lint on tail expr drop order change in Edition 2024Ding Xiang Fei-0/+1
2024-08-20supress niches in coroutinesRalf Jung-0/+66
2024-08-20Auto merge of #3752 - Kixunil:simd-sha256, r=RalfJungbors-0/+497
Implement SHA256 SIMD intrinsics on x86 Disclaimer: this is my first contribution to `miri`'s code. It's quite possible I'm missing something. This code works but may not be the cleanest/best possible. It'd be useful to be able to verify code implementing SHA256 using SIMD since such code is a bit more complicated and at some points requires use of pointers. Until now `miri` didn't support x86 SHA256 intrinsics. This commit implements them.
2024-08-20Implement SHA256 SIMD intrinsics on x86Martin Habovstiak-0/+497
It'd be useful to be able to verify code implementing SHA256 using SIMD since such code is a bit more complicated and at some points requires use of pointers. Until now `miri` didn't support x86 SHA256 intrinsics. This commit implements them.
2024-08-20skip updating when external binding is existedbohan-2/+1
2024-08-20Auto merge of #17913 - alibektas:ratoml_improvements, r=alibektasbors-113/+164
fix: Add workspace level config to ratoml
2024-08-20Auto merge of #17930 - Veykril:config-user-config, r=alibektasbors-65/+75
Remove the ability to configure the user config path Being able to do this makes little sense as this is effectively a cyclic dependency (and we do not want to fixpoint this really).
2024-08-20Old configs are backAli Bektas-0/+61
2024-08-20Next up : generating configs for workspace level configsAli Bektas-110/+48
2024-08-20Define workspace level configs.Ali Bektas-90/+142
2024-08-20readdir_r shim: assume FreeBSD v12+Ralf Jung-10/+10
needs a libc version bump
2024-08-20compiletest: use `std::fs::remove_dir_all` now that it is available许杰友 Jieyou Xu (Joe)-25/+2
2024-08-20fix: Fix panics for semantic highlighting at startupLukas Wirth-4/+14
2024-08-20Merge from rustcThe Miri Cronjob Bot-85/+36
2024-08-20Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-08-19ServerStatusParams should consider 'prime caches' in quiescent statusWilfred Hughes-4/+19
Priming caches is a performance win, but it takes a lock on the salsa database and prevents rust-analyzer from responding to e.g. go-to-def requests. This causes confusion for users, who see the spinner next to rust-analyzer in the VS Code footer stop, so they start attempting to navigate their code. Instead, set the `quiescent` status in LSP to false during cache priming, so the VS Code spinner persists until we can respond to any LSP request.
2024-08-19fix: Panic when a TAIT exists in a RPITShoyu Vanilla-11/+85
2024-08-19Allow user config to not existLukas Wirth-15/+10
2024-08-19Remove the ability to configure the user config pathLukas Wirth-66/+81
2024-08-19Improve documentation for `InvocationStrategy`Lukas Wirth-23/+29
2024-08-19Auto merge of #129218 - saethlin:gdb-supports-rust-now, r=jieyouxubors-69/+19
Delete debuginfo test suite infra for gdb without Rust support and lldb with Rust support Implements https://github.com/rust-lang/rust/issues/128953 I also deleted all the `min-lldb-version: 310` comments, because the oldest compatible distro I can find is Ubuntu 16.04 which ships lldb 3.8, though of course the package that the Ubuntu maintainers put together for that is broken. Rocky Linux 8 amusingly ships lldb 17, even though it has a similar glibc and kernel version. This PR is multiple highly mechanical changes. Some of the commits were created by just running `sed`. You may find it easier to review each commit separately.
2024-08-19Auto merge of #17928 - roife:fix-issue-17869, r=Veykrilbors-8/+89
fix: keep comments in convert_while_to_loop Fix #17869.
2024-08-19Auto merge of #128722 - tgross35:new-resolver-root, r=Mark-Simulacrumbors-8/+2
Switch to using the v2 resolver in most workspaces Pinning the resolver to v1 was done in 5abff3753a7c ("Explicit set workspace.resolver ...") in order to suppress warnings. Since there is no specific reason not to use the new resolver and since it fixes issues, change to `resolver = "2"` everywhere except library.
2024-08-19fix: keep comments in convert_while_to_looproife-8/+89
2024-08-19Auto merge of #17888 - Tyrubias:remove-invocation-location, r=Veykrilbors-173/+33
chore(config): remove `invocationLocation` in favor of `invocationStrategy` These flags were added to help rust-analyzer integrate with repos requiring non-Cargo invocations. The consensus is that having two independent settings are no longer needed. This change removes `invocationLocation` in favor of `invocationStrategy` and changes the internal representation of `InvocationStrategy::Once` to hold the workspace root. Closes #17848.
2024-08-19chore(config): remove `invocationLocation` in favor of `invocationStrategy`Victor Song-173/+33
These flags were added to help rust-analyzer integrate with repos requiring non-Cargo invocations. The consensus is that having two independent settings are no longer needed. This change removes `invocationLocation` in favor of `invocationStrategy` and changes the internal representation of `InvocationStrategy::Once` to hold the workspace root.
2024-08-19make the cleanup functions privateRalf Jung-25/+25
also move "is there a borrow tracker" check out of the loop
2024-08-19provenance_gc: fix commentRalf Jung-1/+3
2024-08-18Rollup merge of #127679 - RalfJung:raw_ref_op, r=jieyouxuTrevor Gross-7/+1
Stabilize `raw_ref_op` (RFC 2582) This stabilizes the syntax `&raw const $expr` and `&raw mut $expr`. It has existed unstably for ~4 years now, and has been exposed on stable via the `addr_of` and `addr_of_mut` macros since Rust 1.51 (released more than 3 years ago). I think it has become clear that these operations are here to stay. So it is about time we give them proper primitive syntax. This has two advantages over the macro: - Being macros, `addr_of`/`addr_of_mut` could in theory do arbitrary magic with the expression on which they work. The only "magic" they actually do is using the argument as a place expression rather than as a value expression. Place expressions are already a subtle topic and poorly understood by many programmers; having this hidden behind a macro using unstable language features makes this even worse. Conversely, people do have an idea of what happens below `&`/`&mut`, so we can make the subtle topic a lot more approachable by connecting to existing intuition. - The name `addr_of` is quite unfortunate from today's perspective, given that we have accepted provenance as a reality, which means that a pointer is *not* just an address. Strict provenance has a method, `addr`, which extracts the address of a pointer; using the term `addr` in two different ways is quite unfortunate. That's why this PR soft-deprecates `addr_of` -- we will wait a long time before actually showing any warning here, but we should start telling people that the "addr" part of this name is somewhat misleading, and `&raw` avoids that potential confusion. In summary, this syntax improves developers' ability to conceptualize the operational semantics of Rust, while making a fundamental operation frequently used in unsafe code feel properly built in. Possible questions to consider, based on the RFC and [this](https://github.com/rust-lang/rust/issues/64490#issuecomment-1163802912) great summary by `@CAD97:` - Some questions are entirely about the semantics. The semantics are the same as with the macros so I don't think this should have any impact on this syntax PR. Still, for completeness' sake: - Should `&raw const *mut_ref` give a read-only pointer? - Tracked at: https://github.com/rust-lang/unsafe-code-guidelines/issues/257 - I think ideally the answer is "no". Stacked Borrows says that pointer is read-only, but Tree Borrows says it is mutable. - What exactly does `&raw const (*ptr).field` require? Answered in [the reference](https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html): the arithmetic to compute the field offset follows the rules of `ptr::offset`, making it UB if it goes out-of-bounds. Making this a safe operation (using `wrapping_offset` rules) is considered too much of a loss for alias analysis. - Choose a different syntax? I don't want to re-litigate the RFC. The only credible alternative that has been proposed is `&raw $place` instead of `&raw const $place`, which (IIUC) could be achieved by making `raw` a contextual keyword in a new edition. The type is named `*const T`, so the explicit `const` is consistent in that regard. `&raw expr` lacks the explicit indication of immutability. However, `&raw const expr` is quite a but longer than `addr_of!(expr)`. - Shouldn't we have a completely new, better raw pointer type instead? Yes we all want to see that happen -- but I don't think we should block stabilization on that, given that such a nicer type is not on the horizon currently and given the issues with `addr_of!` mentioned above. (If we keep the `&raw $place` syntax free for this, we could use it in the future for that new type.) - What about the lint the RFC talked about? It hasn't been implemented yet. Given that the problematic code is UB with or without this stabilization, I don't think the lack of the lint should block stabilization. - I created an issue to track adding it: https://github.com/rust-lang/rust/issues/127724 - Other points from the "future possibilites of the RFC - "Syntactic sugar" extension: this has not been implemented. I'd argue this is too confusing, we should stick to what the RFC suggested and if we want to do anything about such expressions, add the lint. - Encouraging / requiring `&raw` in situations where references are often/definitely incorrect: this has been / is being implemented. On packed fields this already is a hard error, and for `static mut` a lint suggesting raw pointers is being rolled out. - Lowering of casts: this has been implemented. (It's also an invisible implementation detail.) - `offsetof` woes: we now have native `offset_of` so this is not relevant any more. To be done before landing: - [x] Suppress `unused_parens` lint around `&raw {const|mut}` expressions - See bottom of https://github.com/rust-lang/rust/pull/127679#issuecomment-2264073752 for rationale - Implementation: https://github.com/rust-lang/rust/pull/128782 - [ ] Update the Reference. - https://github.com/rust-lang/reference/pull/1567 Fixes https://github.com/rust-lang/rust/issues/64490 cc `@rust-lang/lang` `@rust-lang/opsem` try-job: x86_64-msvc try-job: test-various try-job: dist-various-1 try-job: armhf-gnu try-job: aarch64-apple
2024-08-18Auto merge of #125854 - beetrees:zst-arg-abi, r=estebankbors-0/+5
Move ZST ABI handling to `rustc_target` Currently, target specific handling of ZST function call ABI (specifically passing them indirectly instead of ignoring them) is handled in `rustc_ty_utils`, whereas all other target specific function call ABI handling is located in `rustc_target`. This PR moves the ZST handling to `rustc_target` so that all the target-specific function call ABI handling is in one place. In the process of doing so, this PR fixes #125850 by ensuring that ZST arguments are always correctly ignored in the x86-64 `"sysv64"` ABI; any code which would be affected by this fix would have ICEd before this PR. Tests are also added using `#[rustc_abi(debug)]` to ensure this behaviour does not regress. Fixes #125850
2024-08-18Clean up compiletestBen Kimock-59/+19
2024-08-18Include generics when lowering extern typeDavid Richey-5/+21
2024-08-18Adjust licensing exceptions for WASM componentsTrevor Gross-7/+1
Recent versions of wasm-tools are now Apache-2.0 or MIT or Apache-2.0 with the LLVM exception, rather than strictly Apache-2.0 with the LLVM exception. The only component with the exception has moved to a new dependency `wasi-preview1-component-adapter-provider`.
2024-08-18Update some dependency versions that allow better licensingTrevor Gross-1/+1
With the new resolver, a few dependencies get brought in twice with different licenses. For example, all dependencies from `wasm-tools` gained Apache-2.0 and MIT options, and with the v2 resolver we were using one version from before and one version from after this change. This made tidy's license check difficult. Update some minimum versions to remove duplicate dependencies and smooth out license checking.