about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-07-26Rollup merge of #127989 - Oneirical:testricted-area, r=jieyouxuTrevor Gross-4/+25
Migrate `interdependent-c-libraries`, `compiler-rt-works-on-mingw` and `incr-foreign-head-span` `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). try-job: aarch64-apple try-job: armhf-gnu try-job: test-various try-job: x86_64-mingw try-job: x86_64-msvc try-job: x86_64-gnu-llvm-18
2024-07-26Rollup merge of #127523 - Oneirical:treasure-test, r=jieyouxuTrevor Gross-2/+0
Migrate `dump-ice-to-disk` and `panic-abort-eh_frame` `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: x86_64-msvc try-job: i686-mingw
2024-07-26Merge from rustcThe Miri Cronjob Bot-179/+70
2024-07-26Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-07-26Auto merge of #128193 - flip1995:clippy-subtree-update, r=matthiaskrgrbors-5161/+4846
Clippy subtree update r? `@Manishearth` Updates Cargo.lock due to the Clippy version update and the ui_test bump to v0.24
2024-07-26Auto merge of #128213 - matthiaskrgr:rollup-v40q1j3, r=matthiaskrgrbors-1/+14
Rollup of 7 pull requests Successful merges: - #126090 (Fix supertrait associated type unsoundness) - #127220 (Graciously handle `Drop` impls introducing more generic parameters than the ADT) - #127950 (Use `#[rustfmt::skip]` on some `use` groups to prevent reordering.) - #128085 (Various notes on match lowering) - #128150 (Stop using `unsized_const_parameters` in core/std) - #128194 (LLVM: LLVM-20.0 removes MMX types) - #128211 (fix: compilation issue w/ refactored type) r? `@ghost` `@rustbot` modify labels: rollup
2024-07-26Globals too are asking for sourcerootidAli Bektas-86/+93
2024-07-25Integrate mdbook-spec for the reference.Eric Huss-1/+35
This updates the reference which is now using a new mdbook plugin. This requires a little extra work than a normal book because the plugin uses `rustdoc` to generate links to the standard library. It also ensures that the submodule is available for *any* command that uses rustbook, since it is now part of the rustbook workspace.
2024-07-26Turn root_ratoml into workspace_ratomlsAli Bektas-74/+83
2024-07-26Rollup merge of #128150 - BoxyUwU:std_only_sized_const_params, r=workingjubileeMatthias Krüger-1/+14
Stop using `unsized_const_parameters` in core/std `feature(unsized_const_parameters)` is an incomplete feature and should not be used by core/std as it makes it can make it significantly harder to evolve the feature. It also just generally opens the possibility of introducing bugs on stable through std's backdoor. The only usage of this feature in std is the `simd_shuffle_intrinsic` added in #119213. It doesn't seem to be used anywhere as far as I can tell so it is removed in this PR. All tests and codegen logic etc have been kept however. r? `@workingjubilee`
2024-07-25Auto merge of #127042 - GrigorenkoPV:derivative, r=compiler-errorsbors-1/+1
Switch from `derivative` to `derive-where` This is a part of the effort to get rid of `syn 1.*` in compiler's dependencies: #109302 Derivative has not been maintained in nearly 3 years[^1]. It also depends on `syn 1.*`. This PR replaces `derivative` with `derive-where`[^2], a not dead alternative, which uses `syn 2.*`. A couple of `Debug` formats have changed around the skipped fields[^3], but I doubt this is an issue. [^1]: https://github.com/mcarton/rust-derivative/issues/117 [^2]: https://lib.rs/crates/derive-where [^3]: See the changes in `tests/ui`
2024-07-25Stop using `unsized_const_parameters` in core/stdBoxy-1/+14
2024-07-25Auto merge of #128195 - matthiaskrgr:rollup-195dfdf, r=matthiaskrgrbors-0/+19
Rollup of 6 pull requests Successful merges: - #126908 (Use Cow<'static, str> for InlineAsmTemplatePiece::String) - #127999 (Inject arm32 shims into Windows metadata generation) - #128137 (CStr: derive PartialEq, Eq; add test for Ord) - #128185 (Fix a span error when parsing a wrong param of function.) - #128187 (Fix 1.80.0 version in RELEASES.md) - #128189 (Turn an unreachable code path into an ICE) r? `@ghost` `@rustbot` modify labels: rollup
2024-07-25Support ?Trait bounds in supertraits and dyn Trait under a feature gateBryanskiy-12/+16
2024-07-25Rollup merge of #127999 - ChrisDenton:arm32, r=AmanieuMatthias Krüger-0/+19
Inject arm32 shims into Windows metadata generation I had been keen to eventually move to using windows-sys as a normal Cargo dependency. But for linking, compile times and other reasons that's unlikely to ever happen. So if we're sticking with generated bindings then injecting any necessary missing type definitions (i.e. for the MS unsupported arm32) is simpler than defining whole functions ourselves just because we need to manually implement those types on a tier 3 platform. This also reduces the places we need to change when making changes to how we use `#[link]`. r? libs
2024-07-25Merge commit '37f4fbb92913586b73a35772efd00eccd1cbbe13' into ↵Philipp Krones-5161/+4846
clippy-subtree-update
2024-07-25clean up rmake testbinarycat-1/+0
2024-07-25rewrite panic-abort-eh_frame to rmakeOneirical-1/+0
2024-07-25rewrite dump-ice-to-disk to rmakeOneirical-1/+0
2024-07-25rewrite incr-foreign-head-span to rmakeOneirical-1/+3
2024-07-25rewrite compiler-rt-works-on-mingw to rmakeOneirical-2/+22
2024-07-25rewrite interdependent-c-libraries to rmakeOneirical-1/+0
2024-07-25Rollup merge of #121364 - Urgau:unary_precedence, r=compiler-errorsMatthias Krüger-156/+4
Implement lint against ambiguous negative literals This PR implements a lint against ambiguous negative literals with a literal and method calls right after it. ## `ambiguous_negative_literals` (deny-by-default) The `ambiguous_negative_literals` lint checks for cases that are confusing between a negative literal and a negation that's not part of the literal. ### Example ```rust,compile_fail -1i32.abs(); // equals -1, while `(-1i32).abs()` equals 1 ``` ### Explanation Method calls take precedence over unary precedence. Setting the precedence explicitly makes the code clearer and avoid potential bugs. <details> <summary>Old proposed lint</summary> ## `ambiguous_unary_precedence` (deny-by-default) The `ambiguous_unary_precedence` lint checks for use the negative unary operator with a literal and method calls. ### Example ```rust -1i32.abs(); // equals -1, while `(-1i32).abs()` equals 1 ``` ### Explanation Unary operations take precedence on binary operations and method calls take precedence over unary precedence. Setting the precedence explicitly makes the code clearer and avoid potential bugs. </details> ----- Note: This is a strip down version of https://github.com/rust-lang/rust/pull/117161, without the binary op precedence. Fixes https://github.com/rust-lang/rust/issues/117155 `@rustbot` labels +I-lang-nominated cc `@scottmcm` r? compiler
2024-07-25Auto merge of #128102 - Oneirical:real-testate, r=Kobzolbors-3/+0
Migrate `extern-diff-internal-name`, `extern-multiple-copies` and `extern-multiple-copies2` `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: test-various
2024-07-25Remove unused trace moduleLukas Wirth-127/+46
2024-07-25Auto merge of #17676 - winstxnhdw:precise-capturing, r=Veykrilbors-89/+237
feat: add preliminary support for `+ use<..>` `precise_capturing` syntax ## Summary This PR adds basic support for the following syntax. ```rs fn captures<'a: 'a, 'b: 'b, T>() -> impl Sized + use<'b, T> {} // ~~~~~~~~~~~~~~~~~~~~~~~ // This opaque type does not capture `'a`. fn outlives<'o, T: 'o>(_: T) {} fn caller<'o, 'a, 'b: 'o, T: 'o>() { // ~~ // ^ Note that we don't need `'a: 'o`. outlives::<'o>(captures::<'a, 'b, T>()); } ``` Related to #17598
2024-07-25fix: handle new `TypeBoundKind` variantWinston H.-0/+1
2024-07-25Auto merge of #17697 - Veykril:cargo-env, r=Veykrilbors-2/+14
fix: Support new cargo config get env format Fixes https://github.com/rust-lang/rust-analyzer/issues/17686
2024-07-25fix: Support new cargo config get env formatLukas Wirth-2/+14
2024-07-25Make legacy_const_generics_indices thin by double boxing as its seldom usedLukas Wirth-8/+9
2024-07-25Reduce size of TypeRef by 8 bytesLukas Wirth-9/+9
2024-07-25Fix incorrect handling of cfg'd varargsLukas Wirth-16/+37
2024-07-25Remove Params and Fields from AstIdMapLukas Wirth-449/+494
2024-07-25Generate From impls for Any* nodesLukas Wirth-19/+634
2024-07-25fix: temporarily use `ast::GenericParamList`winstxnhdw-0/+4
2024-07-25Fix and enable unsafe_op_in_unsafe_fnLaurențiu Nicola-30/+29
2024-07-25Merge from rustcThe Miri Cronjob Bot-40/+67
2024-07-25Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-07-25Rollup merge of #127872 - Oneirical:antestral-traditions, r=jieyouxuMatthias Krüger-7/+50
Migrate `pointer-auth-link-with-c`, `c-dynamic-rlib` and `c-dynamic-dylib` `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: x86_64-msvc try-job: i686-mingw try-job: aarch64-apple
2024-07-25Rollup merge of #127054 - compiler-errors:bound-ordering, r=fmeaseMatthias Krüger-11/+1
Reorder trait bound modifiers *after* `for<...>` binder in trait bounds This PR suggests changing the grammar of trait bounds from: ``` [CONSTNESS] [ASYNCNESS] [?] [BINDER] [TRAIT_PATH] const async ? for<'a> Sized ``` to ``` ([BINDER] [CONSTNESS] [ASYNCNESS] | [?]) [TRAIT_PATH] ``` i.e., either ``` ? Sized ``` or ``` for<'a> const async Sized ``` (but not both) ### Why? I think it's strange that the binder applies "more tightly" than the `?` trait polarity. This becomes even weirder when considering that we (or at least, I) want to have `async` trait bounds expressed like: ``` where T: for<'a> async Fn(&'a ()) -> i32, ``` and not: ``` where T: async for<'a> Fn(&'a ()) -> i32, ``` ### Fallout No crates on crater use this syntax, presumably because it's literally useless. This will require modifying the reference grammar, though. ### Alternatives If this is not desirable, then we can alternatively keep parsing `for<'a>` after the `?` but deprecate it with either an FCW (or an immediate hard error), and begin parsing `for<'a>` *before* the `?`.
2024-07-24show warning when Stacked Borrows skips a reborrow due to 'extern type'Ralf Jung-27/+83
2024-07-24Rollup merge of #127733 - GrigorenkoPV:don't-forget, r=AmanieuMatthias Krüger-3/+3
Replace some `mem::forget`'s with `ManuallyDrop` > but I would like to see a larger effort to replace all uses of `mem::forget`. _Originally posted by `@saethlin` in https://github.com/rust-lang/rust/issues/127584#issuecomment-2226087767_ So, r? `@saethlin` Sorry, I have finished writing all of this before I got your response.
2024-07-24Rollup merge of #127457 - donno2048:master, r=albertlarsan68Matthias Krüger-31/+35
Make tidy fast without compromising case alternation Fixes tidy speed issue but still catches case-alternation, enabled for other `style.rs` files, and also detects test files better. r? `@albertlarsan68` `@Nilstrieb`
2024-07-24Auto merge of #17674 - ↵bors-0/+7
davidbarsky:david/add-more-information-to-status-command, r=Veykril internal: add more output to the status command Bit of a lazy change, but this is was pretty handy. I think I should clean up the configuration into something a bit more legible (maybe serialize as JSON?), but I think this is a good enough starting point that we might as well start asking people for it in issue reports.
2024-07-24Allow getpid in isolation mode, add gettid supportKonstantinos Andrikopoulos-7/+60
In order to support gettid when isolation is enabled and when it is disabled, and satisfy its requirement that: In a single-threaded process, the thread ID is equal to the process ID (PID, as returned by getpid(2)). we define the thread ID to be getpid() + <miri internal thread id>. Since the internal thread id of the main thread is zero, this will satisfy that requirement. However, getpid for now was only supported when isolation was disabled. To support getpid in isolation mode, we return a hardcoded value (1000) and return that instead of the real PID.
2024-07-24Auto merge of #17610 - regexident:impl-all_in_module, r=Veykrilbors-0/+4
Add method `Impl::all_in_module(…)` for allowing more localized querying This PR is motivated by an [outside use](https://github.com/regexident/cargo-modules) of the `ra_ap_hir` crate that would benefit from being able to more efficiently query for all impls of a given module (instead of having to query for its parent crate's impls and then filtering on `impl_hir.module(db) == module_hir`). I have the suspicion that the code as is won't quite work for file-level modules, since those don't have a block, afaict, but with all the crate-rename and version shenanigans around the `ra_ap_` release process I haven't yet been able to figure out how to patch a `ra_ap_` dependency from a third-party crate (let alone how to test this from inside of `rust-analyzer`), so haven't been able to actually run and test this. 😔 Any hints on how to make this (i.e. the code itself, as well as the testing) work are more than welcome!
2024-07-24Auto merge of #17661 - alibektas:read_ratoml_on_startup, r=Veykrilbors-8/+42
minor: Read workspace root ratomls on startup
2024-07-24fix: `use` cannot have optional genericsWinston H.-1/+1
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2024-07-24Auto merge of #127524 - oli-obk:feed_item_attrs2, r=petrochenkovbors-4/+4
Make ast `MutVisitor` have the same method name and style as `Visitor` It doesn't map 100% because some `MutVisitor` methods can filter or even expand to multiple items, but consistency seems nicer. tracking issue: https://github.com/rust-lang/rust/issues/127615
2024-07-24Make unused states of Reserved unrepresentableNeven Villani-134/+200