about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2025-03-13insert braces for closurejnyfah-5/+32
2025-03-12Allow more top-down inlining for single-BB calleesScott McMurray-2/+2
This means that things like `<usize as Step>::forward_unchecked` and `<PartialOrd for f32>::le` will inline even if we've already done a bunch of inlining to find the calls to them.
2025-03-13update error messageTshepang Mbambo-1/+1
[`compile-pass` has since been renamed to `build-pass`](https://github.com/rust-lang/rust/issues/62277)
2025-03-13Auto merge of #138416 - Manishearth:rollup-fejor9p, r=Manishearthbors-78/+67
Rollup of 12 pull requests Successful merges: - #134076 (Stabilize `std::io::ErrorKind::InvalidFilename`) - #137504 (Move methods from Map to TyCtxt, part 4.) - #138175 (Support rmeta inputs for --crate-type=bin --emit=obj) - #138259 (Disentangle `ForwardGenericParamBan` and `ConstParamTy` ribs) - #138280 (fix ICE in pretty-printing `global_asm!`) - #138318 (Rustdoc: remove a bunch of `@ts-expect-error` from main.js) - #138331 (Use `RUSTC_LINT_FLAGS` more) - #138357 (merge `TypeChecker` and `TypeVerifier`) - #138394 (remove unnecessary variant) - #138403 (Delegation: one more ICE fix for `MethodCall` generation) - #138407 (Delegation: reject C-variadics) - #138409 (Use sa_sigaction instead of sa_union.__su_sigaction for AIX) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-12Emit an error when RTN is used in an incorrect placeChayim Refael Friedman-2/+80
We miss one place: associated type bindings aka. `impl Trait<Type(..): Send>`, but we also miss it for Fn-style parenthesizes error so I left it out for now.
2025-03-12Lower Return Type Notation (`Type::method(..): Send`)Chayim Refael Friedman-80/+125
We do it the way rustc does it, by only marking segments with it, and not the whole path. This will allow extending where it is allowed in the future.
2025-03-12Merge pull request #19337 from ChayimFriedman2/salsify-crate-graph-finalChayim Refael Friedman-2511/+3629
Salsify the crate graph
2025-03-12Salsify the crate graphChayim Refael Friedman-2511/+3629
I.e. make it not one giant input but multiple, for incrementality and decreased memory usage for Salsa 3 reasons.
2025-03-12Merge pull request #4185 from geetanshjuneja/abi_checkRalf Jung-7/+161
FnAbi Compatability check
2025-03-12added check_shim_abigeetanshjuneja-7/+161
added input arg mismatch test added detailed ub messages added return type mismatch test
2025-03-12alloc_addresses: use MemoryKind instead of tcx query to determine global ↵Ralf Jung-2/+5
allocations
2025-03-12minor interpret cleanupsRalf Jung-50/+60
2025-03-12Rollup merge of #137504 - nnethercote:remove-Map-4, r=ZalatharManish Goregaokar-78/+67
Move methods from Map to TyCtxt, part 4. A follow-up to https://github.com/rust-lang/rust/pull/137350. r? ```@Zalathar```
2025-03-12bless testtiif-15/+15
2025-03-12Remove testtiif-25/+0
2025-03-12Implement Display by mapping Conv to ExternAbitiif-3/+3
2025-03-12Remove unnecessary asserttiif-1/+0
2025-03-12Add test and change ub message wordingtiif-4/+30
2025-03-12impl Display for Convtiif-2/+1
2025-03-12Update mdbook to 0.4.47Eric Huss-3/+12
2025-03-12intrinsics: remove unnecessary leading underscore from argument namesRalf Jung-28/+28
2025-03-12remove rls source from the repositoryonur-ozkan-116/+0
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-12remove rls specific parts from tidy and build-manifestonur-ozkan-7/+0
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-11Update compiletest's `has_asm_support` to match rustcJosh Stone-1/+9
The list of `ASM_SUPPORTED_ARCHS` was missing a few from the compiler's actual stable list.
2025-03-12Move methods from `Map` to `TyCtxt`, part 4.Nicholas Nethercote-78/+67
Continuing the work from #137350. Removes the unused methods: `expect_variant`, `expect_field`, `expect_foreign_item`. Every method gains a `hir_` prefix.
2025-03-11Auto merge of #138366 - matthiaskrgr:rollup-cn16m7q, r=matthiaskrgrbors-3/+3
Rollup of 10 pull requests Successful merges: - #137715 (Allow int literals for pattern types with int base types) - #138002 (Disable CFI for weakly linked syscalls) - #138051 (Add support for downloading GCC from CI) - #138231 (Prevent ICE in autodiff validation by emitting user-friendly errors) - #138245 (stabilize `ci_rustc_if_unchanged_logic` test for local environments) - #138256 (Do not feed anon const a type that references generics that it does not have) - #138284 (Do not write user type annotation for const param value path) - #138296 (Remove `AdtFlags::IS_ANONYMOUS` and `Copy`/`Clone` condition for anonymous ADT) - #138352 (miri native_calls: ensure we actually expose *mutable* provenance to the memory FFI can access) - #138354 (remove redundant `body` arguments) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-11Auto merge of #128440 - oli-obk:defines, r=lcnrbors-12/+11
Add `#[define_opaques]` attribute and require it for all type-alias-impl-trait sites that register a hidden type Instead of relying on the signature of items to decide whether they are constraining an opaque type, the opaque types that the item constrains must be explicitly listed. A previous version of this PR used an actual attribute, but had to keep the resolved `DefId`s in a side table. Now we just lower to fields in the AST that have no surface syntax, instead a builtin attribute macro fills in those fields where applicable. Note that for convenience referencing opaque types in associated types from associated methods on the same impl will not require an attribute. If that causes problems `#[defines()]` can be used to overwrite the default of searching for opaques in the signature. One wart of this design is that closures and static items do not have generics. So since I stored the opaques in the generics of functions, consts and methods, I would need to add a custom field to closures and statics to track this information. During a T-types discussion we decided to just not do this for now. fixes #131298
2025-03-11Make GenericParamsCollector::type_or_consts not unnecessarily pub(crate)¨Florian-10/+15
2025-03-11miri native_calls: ensure we actually expose *mutable* provenance to the ↵Ralf Jung-3/+3
memory FFI can access
2025-03-11Implement `#[define_opaque]` attribute for functions.Oli Scherer-12/+11
2025-03-11Merge from rustcThe Miri Cronjob Bot-2026/+4913
2025-03-11Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-03-11Auto merge of #136932 - m-ou-se:fmt-width-precision-u16, r=scottmcmbors-1/+1
Reduce formatting `width` and `precision` to 16 bits This is part of https://github.com/rust-lang/rust/issues/99012 This is reduces the `width` and `precision` fields in format strings to 16 bits. They are currently full `usize`s, but it's a bit nonsensical that we need to support the case where someone wants to pad their value to eighteen quintillion spaces and/or have eighteen quintillion digits of precision. By reducing these fields to 16 bit, we can reduce `FormattingOptions` to 64 bits (see https://github.com/rust-lang/rust/pull/136974) and improve the in memory representation of `format_args!()`. (See additional context below.) This also fixes a bug where the width or precision is silently truncated when cross-compiling to a target with a smaller `usize`. By reducing the width and precision fields to the minimum guaranteed size of `usize`, 16 bits, this bug is eliminated. This is a breaking change, but affects almost no existing code. --- Details of this change: There are three ways to set a width or precision today: 1. Directly a formatting string, e.g. `println!("{a:1234}")` 2. Indirectly in a formatting string, e.g. `println!("{a:width$}", width=1234)` 3. Through the unstable `FormattingOptions::width` method. This PR: - Adds a compiler error for 1. (`println!("{a:9999999}")` no longer compiles and gives a clear error.) - Adds a runtime check for 2. (`println!("{a:width$}, width=9999999)` will panic.) - Changes the signatures of the (unstable) `FormattingOptions::[get_]width` methods to use a `u16` instead. --- Additional context for improving `FormattingOptions` and `fmt::Arguments`: All the formatting flags and options are currently: - The `+` flag (1 bit) - The `-` flag (1 bit) - The `#` flag (1 bit) - The `0` flag (1 bit) - The `x?` flag (1 bit) - The `X?` flag (1 bit) - The alignment (2 bits) - The fill character (21 bits) - Whether a width is specified (1 bit) - Whether a precision is specified (1 bit) - If used, the width (a full usize) - If used, the precision (a full usize) Everything except the last two can simply fit in a `u32` (those add up to 31 bits in total). If we can accept a max width and precision of u16::MAX, we can make a `FormattingOptions` that is exactly 64 bits in size; the same size as a thin reference on most platforms. If, additionally, we also limit the number of formatting arguments, we can also reduce the size of `fmt::Arguments` (that is, of a `format_args!()` expression).
2025-03-11Auto merge of #138302 - matthiaskrgr:rollup-an2up80, r=matthiaskrgrbors-6/+34
Rollup of 8 pull requests Successful merges: - #136395 (Update to rand 0.9.0) - #137279 (Make some invalid codegen attr errors structured/translatable) - #137585 (Update documentation to consistently use 'm' in atomic synchronization example) - #137926 (Add a test for `-znostart-stop-gc` usage with LLD) - #138074 (Support `File::seek` for Hermit) - #138238 (Fix dyn -> param suggestion in struct ICEs) - #138270 (chore: Fix some comments) - #138286 (triagebot.toml: Don't label `test/rustdoc-json` as A-rustdoc-search (…) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-10internal: port rust-analyzer to new SalsaDavid Barsky-2298/+3042
2025-03-10internal(config): use `FxIndexMap` for default completion snippetsDavid Barsky-25/+30
2025-03-10Rollup merge of #138305 - lnicola:sync-from-ra, r=lnicolaMatthias Krüger-1880/+4676
Subtree update of `rust-analyzer` r? `@ghost`
2025-03-10Merge pull request #19305 from davidbarsky/davidbarsky/vendor-query-group-macroLukas Wirth-21/+1988
internal: vendor `query-group-macro` in rust-analyzer
2025-03-10internal: vendor `query-group-macro`David Barsky-21/+1988
2025-03-10doc: add doc to proc-macro-apibit-aloo-1/+71
2025-03-10Merge pull request #19334 from Veykril/push-oynrurllmwtkLukas Wirth-5346/+1
internal: Remove generated md book files
2025-03-10Remove generated md book filesLukas Wirth-5346/+1
2025-03-10Merge pull request #19326 from Veykril/push-vovuxzkzrowpLukas Wirth-10/+11
Add missing name-ref parents to syntactic highlighting
2025-03-10Merge pull request #19294 from alibektas/better_build_script_err_msgsLukas Wirth-0/+1
minor: Show build scripts errors in server status
2025-03-10Add missing name-ref parents to syntactic highlightingLukas Wirth-10/+11
2025-03-10Merge pull request #19332 from Veykril/push-trvznlqsvtyqLukas Wirth-84/+53
Make change annotations per text-edit
2025-03-10Fix rust-analyzer for 16-bit fmt width and precision.Mara Bos-1/+1
2025-03-10Make change annotations per text-editLukas Wirth-84/+53
2025-03-10Fix diagnostics being cleared right after being receivedAlex Kirszenberg-1/+3
2025-03-10Merge pull request #19331 from lnicola/sync-from-rustLaurențiu Nicola-1069/+832
minor: Sync from downstream