about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2025-03-13Rollup merge of #126856 - onur-ozkan:remove-rls, r=clubby789Matthias Krüger-123/+0
remove deprecated tool `rls` This tool has been deprecated for two years and now it only gives warning without doing anything useful. Zulip discussion: https://rust-lang.zulipchat.com/#narrow/stream/241545-t-release/topic/excluding.20rls.20from.20the.20release try-job: x86_64-gnu-distcheck
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-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-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-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-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-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-10Rollup merge of #138305 - lnicola:sync-from-ra, r=lnicolaMatthias Krüger-1880/+4676
Subtree update of `rust-analyzer` r? `@ghost`
2025-03-10Fix rust-analyzer for 16-bit fmt width and precision.Mara Bos-1/+1
2025-03-10Merge pull request #19331 from lnicola/sync-from-rustLaurențiu Nicola-1069/+832
minor: Sync from downstream
2025-03-10Format codeLaurențiu Nicola-35/+43
2025-03-10Merge pull request #19328 from Veykril/push-umwykvoskvypLukas Wirth-25/+45
internal: Run proc-macro server tests as separate CI job
2025-03-10Fix simd layout testLaurențiu Nicola-1/+1
2025-03-10Bump rustc cratesLaurențiu Nicola-25/+20
2025-03-10Run proc-macro server tests are separate CI jobLukas Wirth-25/+45
Touch tt
2025-03-10Merge pull request #19330 from ChayimFriedman2/normalize-projectionLukas Wirth-503/+869
fix: Normalize projections in evaluated const display and layout calculation
2025-03-10Merge pull request #19079 from ChayimFriedman2/rename-conflictLukas Wirth-59/+509
feat: Warn the user when a rename will change the meaning of the program
2025-03-10Merge pull request #19327 from Veykril/push-qyyvkulltzpzLukas Wirth-2/+6
Fix `path` macro hygiene
2025-03-10Merge from rust-lang/rustLaurențiu Nicola-1018/+778
2025-03-10Preparing for merge from rust-lang/rustLaurențiu Nicola-1/+1
2025-03-10Auto merge of #138200 - weihanglo:update-cargo, r=weihanglobors-1/+0
Update cargo 22 commits in 2622e844bc1e2e6123e54e94e4706f7b6195ce3d..ab1463d632528e39daf35f263e10c14cbe590ce8 2025-02-28 12:33:57 +0000 to 2025-03-08 01:45:05 +0000 - test: redact host target when comparing CARGO_ENV path (rust-lang/cargo#15279) - feat: add completions for install --path (rust-lang/cargo#15266) - fix(package): report lockfile / workspace manifest is dirty (rust-lang/cargo#15276) - feat(tree): Add `--depth public` behind `-Zunstable-options` (rust-lang/cargo#15243) - Don't use `$CARGO_BUILD_TARGET` in `cargo metadata` (rust-lang/cargo#15271) - feat: show extra build description from bootstrap (rust-lang/cargo#15269) - Upgrade to `rustc-stable-hash v0.1.2` (rust-lang/cargo#15268) - fix: Respect --frozen everywhere --offline or --locked is accepted (rust-lang/cargo#15263) - feat(tree): Color the output (rust-lang/cargo#15242) - fix(vendor): dont remove non-cached source (rust-lang/cargo#15260) - docs: lockfile is always included since 1.84 (rust-lang/cargo#15257) - Remove `Cargo.toml` from `package.include` in example (rust-lang/cargo#15253) - Small cleanup: remove unneeded result (rust-lang/cargo#15256) - Fix typo in build-scripts.md (rust-lang/cargo#15254) - chore(deps): update rust crate pulldown-cmark to 0.13.0 (rust-lang/cargo#15250) - chore(deps): update compatible (rust-lang/cargo#15249) - feat(cli): forward bash completions of third party subcommands (rust-lang/cargo#15247) - feat: add completions for `--lockfile-path` (rust-lang/cargo#15238) - fix: reset $CARGO if the running program is real `cargo[.exe]` (rust-lang/cargo#15208) - Get all members as `available targets` even though default-members was specified. (rust-lang/cargo#15199) - refactor: control byte display precision with std::fmt options (rust-lang/cargo#15246) - fix(package): Ensure we can package directories ending with '.rs' (rust-lang/cargo#15240)
2025-03-10Fix `path` macro hygieneLukas Wirth-2/+6
2025-03-10Merge pull request #19311 from aibaars/log-build-script-errorLukas Wirth-0/+8
Log build script error output in `load_cargo::load_workspace_at`
2025-03-10Merge pull request #19314 from snprajwal/variantdef-implLukas Wirth-1/+68
fix(hir): `VariantDef` is `impl HasSource`
2025-03-10Merge pull request #19316 from snprajwal/git-commit-ecLukas Wirth-0/+3
fix: do not apply editorconfig to git commit msg
2025-03-10Merge pull request #19252 from flodiebold/fix-fixup-delimitersLukas Wirth-88/+105
Fix syntax fixup producing invalid punctuation
2025-03-10Merge pull request #19232 from ShoyuVanilla/issue-19196Lukas Wirth-12/+59
Bump chalk for built-in supports of async closures
2025-03-10Support locking versions in permitted rustc depsChris Denton-7/+34
2025-03-10Allow wit-bindgen-rt as compiler dependencyChris Denton-0/+1
2025-03-09Rollup merge of #138233 - smmalis37:no-advapi32, r=ChrisDentonMatthias Krüger-10/+14
Windows: Don't link std (and run-make) against advapi32, except on win7 Std no longer depends on any functionality provided by advapi32, so we can remove it from the list of external libraries we link against. Except, the win7 targets do still rely on advapi32-provided functionality. This PR therefore moves linking against it to only occur on win7 targets, so that no new uses of it slip in without being noticed.
2025-03-09Rollup merge of #137650 - thaliaarchi:move-fs-pal, r=NoratriebMatthias Krüger-11/+11
Move `fs` into `sys` Move platform definitions of `fs` into `std::sys`, as part of https://github.com/rust-lang/rust/issues/117276. cc `@joboet`
2025-03-09Rank ADT constructors as constructors for completion scoringLukas Wirth-12/+102
2025-03-09fix: Prevent wrong invocations of `needs_parens_in` with non-ancestral "parent"sShoyu Vanilla-17/+120
2025-03-09Rollup merge of #138158 - moulins:move-layout-to-rustc_abi, r=workingjubileeMatthias Krüger-117/+27
Move more layouting logic to `rustc_abi` Move all `LayoutData`-constructing code to `rustc_abi`: - Infaillible operations get a new `LayoutData` constructor method; - Faillible ones get a new method on `LayoutCalculator`.
2025-03-09Rollup merge of #137885 - klensy:tidy-triagebot, r=jieyouxuMatthias Krüger-0/+97
tidy: add triagebot checks Validates triagebot.toml to have existing paths: `[mentions."*"]` sections, i.e. ```toml [mentions."compiler/rustc_const_eval/src/"] ``` or ```toml [assign.owners] "/.github/workflows" = ["infra-ci"] ``` or ```toml trigger_files = [ "src/librustdoc/html/static/js/search.js", "tests/rustdoc-js", "tests/rustdoc-js-std", ] ``` Looked at #137876 and implemented check.
2025-03-09internal: Migrate `inline_local_variable` to `SyntaxEditor`Shoyu Vanilla-32/+55
2025-03-09Bump chalk for built-in supports of async closuresShoyu Vanilla-14/+61
2025-03-08Move fs into sysThalia Archibald-9/+9
2025-03-08Erase non-pal sys platform pathsThalia Archibald-2/+2
2025-03-08Don't link against advapi32, except on win7.Steven Malis-10/+14
2025-03-08Generated doc update¨Florian-2/+2
2025-03-08Fix syntax fixup producing invalid punctuation¨Florian-88/+105
Fixes #19206. Fixes #18244.
2025-03-08Use `rustc_abi` code for SIMD layout in rust-analyzerMoulins-39/+7
2025-03-08Remove most manual LayoutData creations and move them to `rustc_abi`Moulins-78/+20
...either as: - methods on LayoutCalculator, for faillible operations; - constructors on LayoutData, for infaillible ones.