about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-12-30bootstrap: extract --check-cfg arg generation and add unit tests for itUrgau-19/+35
2023-12-30Simplify bootstrap check-cfg argumentsUrgau-10/+15
2023-12-30apply bootstrap lock unconditionallyonur-ozkan-32/+23
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-12-30bootstrap: bump fd-lockonur-ozkan-37/+34
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-12-29Auto merge of #119373 - Kobzol:missing-tools-bootstrap, r=onur-ozkanbors-134/+98
Remove usage of deprecated `missing-tools` bootstrap flag This PR removes the usage of `--enable-missing-tools` in CI, as this config option is no longer used. It also removes `dist.missing-tools` config completely. Let me know which commits should I remove (if any). Fixes: https://github.com/rust-lang/rust/issues/79249 r? `@onur-ozkan`
2023-12-29Auto merge of #119387 - flip1995:clippy-subtree-sync, r=matthiaskrgrbors-321/+2531
Clippy subtree update r? `@Manishearth`
2023-12-29Enable profiler in dist-powerpc-linuxQiu Chaofan-1/+1
2023-12-29Auto merge of #119378 - onur-ozkan:utilize-llvm-tools, r=albertlarsan68bors-8/+10
utilize the unused `llvm-tools` option This field was not functioning as described in its comment in `config.example.toml`. Also, updated the default value to `true` to keep the bootstrapping behavior as it was before. cc `@Zalathar`
2023-12-28Auto merge of #119174 - compiler-errors:movability, r=cjgillotbors-1/+1
Remove movability from `TyKind::Coroutine` There's no reason to store movability in the generator struct directly. It is computed from the HIR, and can be pulled into a query to access when necessary.
2023-12-28Remove `is_optional_tool` from `ToolBuild`Jakub Beránek-128/+92
2023-12-28Add change tracker entryJakub Beránek-1/+6
2023-12-28Merge commit 'ac4c2094a6030530661bee3876e0228ddfeb6b8b' into clippy-subtree-syncPhilipp Krones-321/+2531
2023-12-28Rollup merge of #119331 - notriddle:notriddle/maxpatheditdistance, ↵Matthias Krüger-17/+30
r=GuillaumeGomez rustdoc-search: count path edits with separate edit limit Avoids strange-looking results like this one, where the path component seems to be ignored: ![image](https://github.com/rust-lang/rust/assets/1593513/f0ef077a-6e09-4d67-a29d-8cabc1495f66) Since the two are counted separately elsewhere, they should get their own limits, too. The biggest problem with combining them is that paths are loosely checked by not requiring every component to match, which means that if they are short and matched loosely, they can easily find "drunk typist" matches that make no sense, like this old result: std::collections::btree_map::itermut matching slice::itermut maxEditDistance = ("slice::itermut".length) / 3 = 14 / 3 = 4 editDistance("std", "slice") = 4 editDistance("itermut", "itermut") = 0 4 + 0 <= 4 PASS Of course, `slice::itermut` should not match stuff from btreemap. `slice` should not match `std`. The new result counts them separately: maxPathEditDistance = "slice".length / 3 = 5 / 3 = 1 maxEditDistance = "itermut".length / 3 = 7 / 3 = 2 editDistance("std", "slice") = 4 4 <= 1 FAIL Effectively, this makes path queries less "typo-resistant". It's not zero, but it means `vec` won't match the `v1` prelude. This commit also adds substring matching to paths. It's stricter than the substring matching in the main part, but loose enough that what I expect to match does. Queries without parent paths are unchanged.
2023-12-28Remove movability from TyKind::CoroutineMichael Goulet-1/+1
2023-12-28Remove `--enable-missing-tools` from `configure.py`Jakub Beránek-1/+0
2023-12-28Remove `--enable-missing-tools` usage in CIJakub Beránek-4/+0
2023-12-28utilize the unused `llvm-tools` optiononur-ozkan-8/+10
This field was not functioning as described in its comment in `config.example.toml`. Also, updated the default value to `true` to keep the bootstrapping behavior as it was before. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-12-27Auto merge of #119099 - fmease:always-const-trait-bounds, r=fee1-deadbors-2/+5
Introduce `const Trait` (always-const trait bounds) Feature `const_trait_impl` currently lacks a way to express “always const” trait bounds. This makes it impossible to define generic items like fns or structs which contain types that depend on const method calls (\*). While the final design and esp. the syntax of effects / keyword generics isn't set in stone, some version of “always const” trait bounds will very likely form a part of it. Further, their implementation is trivial thanks to the `effects` backbone. Not sure if this needs t-lang sign-off though. (\*): ```rs #![feature(const_trait_impl, effects, generic_const_exprs)] fn compute<T: const Trait>() -> Type<{ T::generate() }> { /*…*/ } struct Store<T: const Trait> where Type<{ T::generate() }>:, { field: Type<{ T::generate() }>, } ``` Lastly, “always const” trait bounds are a perfect fit for `generic_const_items`. ```rs #![feature(const_trait_impl, effects, generic_const_items)] const DEFAULT<T: const Default>: T = T::default(); ``` Previously, we (oli, fee1-dead and I) wanted to reinterpret `~const Trait` as `const Trait` in generic const items which would've been quite surprising and not very generalizable. Supersedes #117530. --- cc `@oli-obk` As discussed r? fee1-dead (or compiler)
2023-12-27Introduce `const Trait` (always-const trait bounds)León Orell Valerian Liehr-2/+5
2023-12-27Auto merge of #119327 - notriddle:notriddle/plusencoding, r=GuillaumeGomezbors-1/+2
rustdoc: treat query string `+` as space Fixes #119219
2023-12-26Update cargoWeihang Lo-0/+0
2023-12-26rustdoc-search: count path edits with separate edit limitMichael Howell-17/+30
Since the two are counted separately elsewhere, they should get their own limits, too. The biggest problem with combining them is that paths are loosely checked by not requiring every component to match, which means that if they are short and matched loosely, they can easily find "drunk typist" matches that make no sense, like this old result: std::collections::btree_map::itermut matching slice::itermut maxEditDistance = ("slice::itermut".length) / 3 = 14 / 3 = 4 editDistance("std", "slice") = 4 editDistance("itermut", "itermut") = 0 4 + 0 <= 4 PASS Of course, `slice::itermut` should not match stuff from btreemap. `slice` should not match `std`. The new result counts them separately: maxPathEditDistance = "slice".length / 3 = 5 / 3 = 1 maxEditDistance = "itermut".length / 3 = 7 / 3 = 2 editDistance("std", "slice") = 4 4 <= 1 FAIL Effectively, this makes path queries less "typo-resistant". It's not zero, but it means `vec` won't match the `v1` prelude. Queries without parent paths are unchanged.
2023-12-26rustdoc: treat query string `+` as spaceMichael Howell-1/+2
Fixes #119219
2023-12-26Rollup merge of #119240 - compiler-errors:lang-item-more, r=petrochenkovMichael Goulet-0/+4
Make some non-diagnostic-affecting `QPath::LangItem` into regular `QPath`s The rest of 'em affect diagnostics, so leave them alone... for now. cc #115178
2023-12-26Auto merge of #119129 - jyn514:verbose, r=compiler-errors,estebankbors-1/+1
rework `-Zverbose` implements the changes described in https://github.com/rust-lang/compiler-team/issues/706 the first commit is only a name change from `-Zverbose` to `-Zverbose-internals` and does not change behavior. the second commit changes diagnostics. possible follow up work: - `ty::pretty` could print more info with `--verbose` than it does currently. `-Z verbose-internals` shows too much info in a way that's not helpful to users. michael had ideas about this i didn't fully understand: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/uplift.20some.20-Zverbose.20calls.20and.20rename.20to.E2.80.A6.20compiler-team.23706/near/408984200 - `--verbose` should imply `-Z write-long-types-to-disk=no`. the code in `ty_string_with_limit` should take `--verbose` into account (apparently this affects `Ty::sort_string`, i'm not familiar with this code). writing a file to disk should suggest passing `--verbose`. r? `@compiler-errors` cc `@estebank`
2023-12-26Auto merge of #119315 - RalfJung:miri, r=RalfJungbors-150/+155
Miri subtree update r? `@ghost`
2023-12-26Rollup merge of #119303 - GuillaumeGomez:update-sysinfo, r=onur-ozkanMatthias Krüger-3/+3
Update sysinfo A small bugfix was released for sysinfo so updating once again. r? ``@onur-ozkan``
2023-12-26Merge from rustcThe Miri Conjob Bot-46/+49
2023-12-26Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-12-26Auto merge of #119258 - compiler-errors:closure-kind, r=eholkbors-73/+119
Make closures carry their own ClosureKind Right now, we use the "`movability`" field of `hir::Closure` to distinguish a closure and a coroutine. This is paired together with the `CoroutineKind`, which is located not in the `hir::Closure`, but the `hir::Body`. This is strange and redundant. This PR introduces `ClosureKind` with two variants -- `Closure` and `Coroutine`, which is put into `hir::Closure`. The `CoroutineKind` is thus removed from `hir::Body`, and `Option<Movability>` no longer needs to be a stand-in for "is this a closure or a coroutine". r? eholk
2023-12-26Make some non-diagnostic-affecting QPath::LangItem into regular qpathsMichael Goulet-0/+4
2023-12-26Auto merge of #119146 - nnethercote:rm-DiagCtxt-api-duplication, ↵bors-45/+45
r=compiler-errors Remove `DiagCtxt` API duplication `DiagCtxt` defines the internal API for creating and emitting diagnostics: methods like `struct_err`, `struct_span_warn`, `note`, `create_fatal`, `emit_bug`. There are over 50 methods. Some of these methods are then duplicated across several other types: `Session`, `ParseSess`, `Parser`, `ExtCtxt`, and `MirBorrowckCtxt`. `Session` duplicates the most, though half the ones it does are unused. Each duplicated method just calls forward to the corresponding method in `DiagCtxt`. So this duplication exists to (in the best case) shorten chains like `ecx.tcx.sess.parse_sess.dcx.emit_err()` to `ecx.emit_err()`. This API duplication is ugly and has been bugging me for a while. And it's inconsistent: there's no real logic about which methods are duplicated, and the use of `#[rustc_lint_diagnostic]` and `#[track_caller]` attributes vary across the duplicates. This PR removes the duplicated API methods and makes all diagnostic creation and emission go through `DiagCtxt`. It also adds `dcx` getter methods to several types to shorten chains. This approach scales *much* better than API duplication; indeed, the PR adds `dcx()` to numerous types that didn't have API duplication: `TyCtxt`, `LoweringCtxt`, `ConstCx`, `FnCtxt`, `TypeErrCtxt`, `InferCtxt`, `CrateLoader`, `CheckAttrVisitor`, and `Resolver`. These result in a lot of changes from `foo.tcx.sess.emit_err()` to `foo.dcx().emit_err()`. (You could do this with more types, but it gets into diminishing returns territory for types that don't emit many diagnostics.) After all these changes, some call sites are more verbose, some are less verbose, and many are the same. The total number of lines is reduced, mostly because of the removed API duplication. And consistency is increased, because calls to `emit_err` and friends are always preceded with `.dcx()` or `.dcx`. r? `@compiler-errors`
2023-12-25Update sysinfo version to 0.30.1Guillaume Gomez-3/+3
2023-12-25Fix clippy's usage of Body's coroutine_kindMichael Goulet-73/+119
Also fixes a bug where we weren't peeling blocks from async bodies
2023-12-25Auto merge of #119292 - onur-ozkan:share-make-with-rustdoc, r=albertlarsan68bors-5/+0
bootstrap: use same make flags with rustdoc Keeping same `MAKEFLAGS` and `MFLAGS` for rustdoc should allow rustdoc to use the same jobserver.
2023-12-25bootstrap: use same make flags with rustdoconur-ozkan-5/+0
Keeping same `MAKEFLAGS` and `MFLAGS` for rustdoc should allow rustdoc to use the same jobserver. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-12-25Auto merge of #119283 - GuillaumeGomez:warning-block-pos, r=notriddlebors-1/+4
Fix display of warning block if it is first element of the top doc block It fixes the display of the warning block "i" element in case it is the first element: ![Screenshot from 2023-12-23 11-15-48](https://github.com/rust-lang/rust/assets/3050060/99b6796e-2a09-4053-813e-84288ce76c4c) It now looks like this: ![image](https://github.com/rust-lang/rust/assets/3050060/306b4cf1-3a7d-4681-b0cf-3e721186bfe8) The update for the `browser-ui-test` framework is because it didn't detect correctly pseudo elements if they ended with a digit or a dash. r? `@notriddle`
2023-12-24Fix display of warning block if it is first element of the top doc blockGuillaume Gomez-0/+3
2023-12-24Update browser-ui-test version to 0.16.11Guillaume Gomez-1/+1
2023-12-24Merge from rustcThe Miri Conjob Bot-504/+838
2023-12-24Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-12-24Rollup merge of #119165 - onur-ozkan:update-container-entrypoint, r=KobzolMatthias Krüger-4/+21
improve container runner script First commit fixes #118930 Second commit is mostly for development purposes. In read-only mode submodules cannot be initialized due to access limitations (see the log below), which means that tools cannot be built. ```sh Updating submodule src/tools/cargo error: could not lock config file .git/config: Read-only file system error: could not lock config file .git/config: Read-only file system fatal: Failed to register url for submodule path 'src/tools/cargo' error: could not lock config file .git/config: Read-only file system error: could not lock config file .git/config: Read-only file system fatal: Failed to register url for submodule path 'src/tools/cargo' Build completed unsuccessfully in 0:00:00 ```
2023-12-24allow devs to turn-off read-only modeonur-ozkan-1/+9
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-12-24Remove more `Session` methods that duplicate `DiagCtxt` methods.Nicholas Nethercote-3/+3
2023-12-24Remove `Session` methods that duplicate `DiagCtxt` methods.Nicholas Nethercote-42/+42
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access.
2023-12-23Rollup merge of #119246 - GuillaumeGomez:trait-is_object_safe-json, ↵Matthias Krüger-1/+4
r=aDotInTheVoid [rustdoc] Add `is_object_safe` information for traits in JSON output As asked by `@obi1kenobi` [here](https://github.com/rust-lang/rust/pull/113241#issuecomment-1868213677). cc `@aDotInTheVoid` r? `@notriddle`
2023-12-23Rollup merge of #112936 - Toasterson:illumos-aarch64-target, r=jackh726Matthias Krüger-0/+1
Add illumos aarch64 target for rust. This adds the newly being developed illumos aarch64 target to the rust compiler. `@rmustacc` `@citrus-it` `@richlowe` As promissed before my hiatus :)
2023-12-23Rollup merge of #119248 - lukas-code:purge-unused-outlives-test, r=cjgillotMatthias Krüger-1/+1
remove dead inferred outlives testing code The `test_inferred_outlives` function was never run, because the code that's actually used for the tests was part of the `inferred_outlives_of` query, which ran before `test_inferred_outlives` during type collecting. This PR separates the test code from the query and moves it inside the dedicated function.
2023-12-23Rollup merge of #119245 - GuillaumeGomez:improve-docs, r=fmeaseMatthias Krüger-0/+16
Improve documentation for using warning blocks in documentation From [this comment](https://github.com/rust-lang/rust/issues/79710#issuecomment-1868225357), I think markdown can be surprising sometimes so better explain a bit better how to use it correctly. r? `@notriddle`
2023-12-23Rollup merge of #119232 - Takashiidobe:fix-doc-typos, r=JohnTitorMatthias Krüger-7/+7
Fix doc typos This PR fixes some typos I found while trawling through the rust source.