about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-06-26rewrite lto-dylib-dep to rmakeOneirical-1/+0
2024-06-26rewrite overwrite-input to rmakeOneirical-1/+0
2024-06-26Auto merge of #120924 - xFrednet:rfc-2383-stabilization-party, r=Urgau,blyxyasbors-577/+606
Let's `#[expect]` some lints: Stabilize `lint_reasons` (RFC 2383) Let's give this another try! The [previous stabilization attempt](https://github.com/rust-lang/rust/pull/99063) was stalled by some unresolved questions. These have been discussed in a [lang team](https://github.com/rust-lang/lang-team/issues/191) meeting. The last open question, regarding the semantics of the `#[expect]` attribute was decided on in https://github.com/rust-lang/rust/issues/115980 I've just updated the [stabilization report](https://github.com/rust-lang/rust/issues/54503#issuecomment-1179563964) with the discussed questions and decisions. Luckily, the decision is inline with the current implementation. This hopefully covers everything. Let's hope that the CI will be green like the spring. fixes #115980 fixes #54503 --- r? `@wesleywiser` Tacking Issue: https://github.com/rust-lang/rust/issues/54503 Stabilization Report: https://github.com/rust-lang/rust/issues/54503#issuecomment-1179563964 Documentation Update: https://github.com/rust-lang/reference/pull/1237 <!-- For Clippy: changelog: [`allow_attributes`]: Is now available on stable, since the `lint_reasons` feature was stabilized changelog: [`allow_attributes_without_reason`]: Is now available on stable, since the `lint_reasons` feature was stabilized --> --- Roses are red, Violets are blue, Let's expect lints, With reason clues
2024-06-26rewrite use-suggestions-rust-2018 to rmakeOneirical-1/+0
2024-06-26rewrite pretty-print-to-file to rmakeOneirical-2/+0
2024-06-26rewrite pretty-print-with-dep-file to rmakeOneirical-1/+0
2024-06-26Add clang-format to the external tool checkDianQK-12/+123
2024-06-26do not normalize `use foo::{self}` to `use foo`Harry Sarson-4/+79
It changes behaviour and can cause collisions. E.g. for the following snippet ```rs mod foo { pub mod bar {} pub const bar: i32 = 8; } // tranforming the below to `use foo::bar;` causes the error: // // the name `bar` is defined multiple times use foo::bar::{self}; const bar: u32 = 99; fn main() { let local_bar = bar; } ``` we still normalize ```rs use foo::bar; use foo::bar::{self}; ``` to `use foo::bar;` because this cannot cause collisions. See: https://github.com/rust-lang/rust-analyzer/pull/17140#issuecomment-2079189725
2024-06-26Rollup merge of #126971 - DianQK:bump, r=KobzolMatthias Krüger-61/+60
Bump black, ruff and platformdirs Mainly because I encountered the following error, and we have no reason to prevent our upgrade. ``` ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. virtualenv 20.25.3 requires platformdirs<5,>=3.9.1, but you have platformdirs 3.6.0 which is incompatible. ``` r? `@Kobzol`
2024-06-26Rollup merge of #126964 - Oneirical:total-catestrophe, r=KobzolMatthias Krüger-3/+0
Migrate `lto-empty`, `invalid-so` and `issue-20626` `run-make` tests to rmake.rs Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).
2024-06-26Rollup merge of #126938 - RalfJung:link_section, r=compiler-errorsMatthias Krüger-0/+17
miri: make sure we can find link_section statics even for the local crate Miri needs some way to iterate all the exported functions and "used" statics of all crates. For dependency crates, this already works fine since we can overwrite the query resonsible for computing `exported_symbols`, but it turns out for local binary crates this does not work: for binaries, `reachable_set` skips a lot of its logic and only checks `contains_extern_indicator()` and `RUSTC_STD_INTERNAL_SYMBOL`. Other flags like `CodegenFnAttrFlags::USED` are entirely ignored. This PR proposes to use the same check, `has_custom_linkage`, in binaries that we already use to drive the main workqueue of the reachability recursive traversal. I have no idea why binaries used a slightly different check that ignores `USED` -- was that deliberate or does it just not matter most of the time?
2024-06-26Auto merge of #126955 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 10 commits in bc89bffa5987d4af8f71011c7557119b39e44a65..4ed7bee47f7dd4416b36fada1909e9a62c546246 2024-06-22 00:36:36 +0000 to 2024-06-25 16:28:22 +0000 - test: omit target-dir name (rust-lang/cargo#14142) - test: migrate offline, open_namespaces and owner to snapbox (rust-lang/cargo#14138) - docs: remove stray comment (rust-lang/cargo#14133) - Change tests to support `rustc` wording changes (rust-lang/cargo#14135) - deps: dont use tracing-attributes for workspace, use for cargo only (rust-lang/cargo#14122) - Include vcs_info even if workspace is dirty (rust-lang/cargo#13960) - test: migrate profile* to snapbox (rust-lang/cargo#14128) - test: migrate path and paths to snapbox (rust-lang/cargo#14109) - test: migrate rustflags, rustup and script to snapbox (rust-lang/cargo#14126) - test: migrate rename_deps, replace, required_features and run to snapbox (rust-lang/cargo#14127)
2024-06-25Merge from rustcBen Kimock-311/+350
2024-06-25Preparing for merge from rustcBen Kimock-1/+1
2024-06-26Add clang-format to requirements.txt in tidyDianQK-0/+18
2024-06-26Bump black, ruff and platformdirsDianQK-61/+60
Mainly because I encountered the following error, and we have no reason to prevent our upgrade. ``` ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. virtualenv 20.25.3 requires platformdirs<5,>=3.9.1, but you have platformdirs 3.6.0 which is incompatible. ```
2024-06-25rewrite and rename issue-20626 to rmakeOneirical-1/+0
2024-06-25Improve error message in tidyJakub Beránek-4/+3
2024-06-25rewrite invalid-so to rmakeOneirical-1/+0
2024-06-25rewrite lto-empty to rmakeOneirical-1/+0
2024-06-25Bump actions/download-artifact and upload-artifactLaurențiu Nicola-11/+11
2024-06-25Update cargoWeihang Lo-0/+0
2024-06-25pass cargo extra args when debugAndrei Listochkin-2/+3
fixes #17128
2024-06-25rewrite mingw-export-call-convention to rmakeOneirical-1/+0
2024-06-25`sudo CI=green` && Review changes <3xFrednet-11/+2
2024-06-25Rollup merge of #126893 - dtolnay:prec, r=compiler-errorsMatthias Krüger-5/+5
Eliminate the distinction between PREC_POSTFIX and PREC_PAREN precedence level I have been tangling with precedence as part of porting some pretty-printer improvements from syn back to rustc (related to parenthesization of closures, returns, and breaks by the AST pretty-printer). As far as I have been able to tell, there is no difference between the 2 different precedence levels that rustc identifies as `PREC_POSTFIX` (field access, square bracket index, question mark, method call) and `PREC_PAREN` (loops, if, paths, literals). There are a bunch of places that look at either `prec < PREC_POSTFIX` or `prec >= PREC_POSTFIX`. But there is nothing that needs to distinguish PREC_POSTFIX and PREC_PAREN from one another. https://github.com/rust-lang/rust/blob/d49994b060684af423339b55769439b2f444a7b9/compiler/rustc_ast/src/util/parser.rs#L236-L237 https://github.com/rust-lang/rust/blob/d49994b060684af423339b55769439b2f444a7b9/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs#L2829 https://github.com/rust-lang/rust/blob/d49994b060684af423339b55769439b2f444a7b9/compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs#L1290 In the interest of eliminating a distinction without a difference, this PR collapses these 2 levels down to 1. There is exactly 1 case where an expression with PREC_POSTFIX precedence needs to be parenthesized in a location that an expression with PREC_PAREN would not, and that's when the receiver of ExprKind::MethodCall is ExprKind::Field. `x.f()` means a different thing than `(x.f)()`. But this does not justify having separate precedence levels because this special case in the grammar is not governed by precedence. Field access does not have "lower precedence than" method call syntax &mdash; you can tell because if it did, then `x.f[0].f()` wouldn't be able to have its unparenthesized field access in the receiver of a method call. Because this Field/MethodCall special case is not governed by precedence, it already requires special handling and is not affected by eliminating the PREC_POSTFIX precedence level. https://github.com/rust-lang/rust/blob/d49994b060684af423339b55769439b2f444a7b9/compiler/rustc_ast_pretty/src/pprust/state/expr.rs#L217-L221
2024-06-25RFC 2383: Stabilize `lint_reasons` in MirixFrednet-1/+1
2024-06-25RFC 2383: Stabilize `lint_reasons` in Clippy :paperclips:xFrednet-573/+611
2024-06-25RFC 2383: Stabilize `lint_reasons` :tada:xFrednet-3/+3
2024-06-25miri: make sure we can find link_section statics even for the local crateRalf Jung-0/+17
2024-06-25Auto merge of #125741 - petrochenkov:atvisord, r=davidtwcobors-61/+61
ast: Standardize visiting order for attributes and node IDs This should only affect `macro_rules` scopes and order of diagnostics. Also add a deprecation lint for `macro_rules` called outside of their scope, like in https://github.com/rust-lang/rust/issues/124535.
2024-06-25Auto merge of #126813 - compiler-errors:SliceLike, r=lcnrbors-9/+9
Add `SliceLike` to `rustc_type_ir`, use it in the generic solver code (+ some other changes) First, we split out `TraitRef::new_from_args` which takes *just* `ty::GenericArgsRef` from `TraitRef::new` which takes `impl IntoIterator<Item: Into<GenericArg>>`. I will explain in a minute why. Second, we introduce `SliceLike`, which allows us to be generic over `List<T>` and `[T]`. This trait has an `as_slice()` and `into_iter()` method, and some other convenience functions. However, importantly, since types like `I::GenericArgs` now implement `SliceLike` rather than `IntoIter<Item = I::GenericArg>`, we can't use `TraitRef::new` on this directly. That's where `new_from_args` comes in. Finally, we adjust all the code to use these slice operators. Some things get simpler, some things get a bit more annoying since we need to use `as_slice()` in a few places. 🤷 r? lcnr
2024-06-24Rollup merge of #126413 - matthiaskrgr:crshmsg, r=oli-obkMichael Goulet-4/+5
compiletest: make the crash test error message abit more informative r? ```@oli-obk```
2024-06-25feat: add bool_to_enum assist for parameterswinstxnhdw-16/+20
2024-06-25tests: add test for param transformationwinstxnhdw-1/+92
2024-06-24Auto merge of #126523 - joboet:the_great_big_tls_refactor, r=Mark-Simulacrumbors-3/+3
std: refactor the TLS implementation As discovered by Mara in #110897, our TLS implementation is a total mess. In the past months, I have simplified the actual macros and their expansions, but the majority of the complexity comes from the platform-specific support code needed to create keys and register destructors. In keeping with #117276, I have therefore moved all of the `thread_local_key`/`thread_local_dtor` modules to the `thread_local` module in `sys` and merged them into a new structure, so that future porters of `std` can simply mix-and-match the existing code instead of having to copy the same (bad) implementation everywhere. The new structure should become obvious when looking at `sys/thread_local/mod.rs`. Unfortunately, the documentation changes associated with the refactoring have made this PR rather large. That said, this contains no functional changes except for two small ones: * the key-based destructor fallback now, by virtue of sharing the implementation used by macOS and others, stores its list in a `#[thread_local]` static instead of in the key, eliminating one indirection layer and drastically simplifying its code. * I've switched over ZKVM (tier 3) to use the same implementation as WebAssembly, as the implementation was just a way worse version of that Please let me know if I can make this easier to review! I know these large PRs aren't optimal, but I couldn't think of any good intermediate steps. `@rustbot` label +A-thread-locals
2024-06-24Replace Deref bounds on Interner in favor of a SliceLike traitMichael Goulet-1/+1
2024-06-24Split out IntoIterator and non-Iterator constructors for ↵Michael Goulet-8/+8
AliasTy/AliasTerm/TraitRef/projection
2024-06-24compiletest: make the crash test error message abit more informativeMatthias Krüger-4/+5
2024-06-24ast: Standardize visiting order for attributes and node IDsVadim Petrochenkov-61/+61
2024-06-24Auto merge of #17489 - Veykril:tt-iter, r=Veykrilbors-319/+332
minro: move tt-iter into tt crate
2024-06-24move tt-iter into tt crateLukas Wirth-319/+332
2024-06-24clarify the status of Tree BorrowsRalf Jung-2/+6
2024-06-24clarify the warning shown when optimizations are enabledRalf Jung-4/+3
2024-06-24Auto merge of #17488 - alibektas:17485/duplicate_snippets, r=alibektasbors-0/+3
minor : Fix duplicate snippets showing up on hover. With each `config::apply_change` duplicate configs were being added. Now we first drain the vec that holds these and then start adding. This fixes #17485
2024-06-24Apply minor changesAli Bektas-1/+1
2024-06-24minor : Fix duplicate snippets showing up on hover.Ali Bektas-0/+3
With each `config::apply_change` duplicate configs were being added. Now we first drain the vec that holds these and then start adding.
2024-06-24Auto merge of #17487 - Veykril:ty-perf-stuff, r=Veykrilbors-260/+340
internal: Some more small memory optimizations Not a big impact on metrics, though there are some more savings in queries mainly used by the IDE layer from this
2024-06-24Fix tidy issue for rustdoc tests commandsGuillaume Gomez-0/+5
2024-06-24Remove commands duplication between `compiletest` and `tests/rustdoc`Guillaume Gomez-230/+234