about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-10-04Rollup merge of #131034 - Urgau:cfg-true-false, r=nnethercoteGuillaume Gomez-58/+284
Implement RFC3695 Allow boolean literals as cfg predicates This PR implements https://github.com/rust-lang/rfcs/pull/3695: allow boolean literals as cfg predicates, i.e. `cfg(true)` and `cfg(false)`. r? `@nnethercote` *(or anyone with parser knowledge)* cc `@clubby789`
2024-10-04Auto merge of #131228 - jdonszelmann:remove-blank-issue, r=m-ou-sebors-4/+0
remove blank issue template r? `@Noratrieb` So there are currently two blank issue templates. One called "Blank Issue" and one called "Blank issue". Wildly different, of course. It seems that one is auto generated by GitHub, while the other one has an explicit template for it. This removes the explicit one so there's only one "Blank [iI]ssue" in the list. Unfortunately, the only way to test if it works is merging this and finding out, but it seems obvious that it would work. ![image](https://github.com/user-attachments/assets/f802ca88-a80f-48e8-9aff-4008ec030dfa)
2024-10-04remove blank issue templateJonathan Dönszelmann-4/+0
2024-10-04Improve non-boolean literal error in cfg predicateUrgau-3/+7
2024-10-04Adjust rustdoc for literal boolean supportUrgau-23/+64
2024-10-04Feature gate boolean lit support in cfg predicatesUrgau-2/+116
2024-10-04Auto merge of #131201 - compiler-errors:unop-not, r=cjgillotbors-0/+111
Disable jump threading `UnOp::Not` for non-bool Fix #131195, where jumpthreading was optimizing `!a == b` into `a != b` for non-bool, where this is definitely not true.
2024-10-04Auto merge of #131191 - nnethercote:lattice_op, r=lcnrbors-403/+231
Merge `glb` and `lub` modules Tons of code is duplicated across them, and it's easy to factor that out. r? `@lcnr`
2024-10-03Auto merge of #131215 - matthiaskrgr:rollup-i021ef7, r=matthiaskrgrbors-258/+433
Rollup of 7 pull requests Successful merges: - #131024 (Don't give method suggestions when method probe fails due to bad implementation of `Deref`) - #131112 (TransmuteFrom: Gracefully handle unnormalized types and normalization errors) - #131176 (.gitignore files for nix) - #131183 (Refactoring to `OpaqueTyOrigin`) - #131187 (Avoid ICE in coverage builds with bad `#[coverage(..)]` attributes) - #131192 (Handle `rustc_query_impl` cases of `rustc::potential_query_instability` lint) - #131197 (Avoid emptiness check in `PeekMut::pop`) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-04Remove `LatticeDir` trait.Nicholas Nethercote-104/+69
It's no longer necessary now that the `glb` and `lub` modules have been merged.
2024-10-04Merge `rustc_infer::infer::relate::{glb,lub}`.Nicholas Nethercote-333/+196
Most of the code in these two modules is duplicated in the other module. This commit eliminates the duplication by replacing them with a new module `lattice_op`. The new `LatticeOpKind` enum is used to distinguish between glb and lub in the few places where the behaviour differs.
2024-10-03Rollup merge of #131197 - EFanZh:avoid-emptyness-check-in-peekmut-pop, r=AmanieuMatthias Krüger-1/+17
Avoid emptiness check in `PeekMut::pop` This PR avoids an unnecessary emptiness check in `PeekMut::pop` by replacing `Option::unwrap` with `Option::unwrap_unchecked`.
2024-10-03Rollup merge of #131192 - ↵Matthias Krüger-1/+1
ismailarilik:handle-potential-query-instability-lint-for-rustc-query-impl, r=compiler-errors Handle `rustc_query_impl` cases of `rustc::potential_query_instability` lint This PR removes `#![allow(rustc::potential_query_instability)]` line from [`compiler/rustc_query_impl/src/lib.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_query_impl/src/lib.rs#L5) <s>and converts `FxHash{Map,Set}` types into `FxIndex{Map,Set}` to suppress lint errors</s> (was not necessary for this PR). A somewhat tracking issue: https://github.com/rust-lang/rust/issues/84447 r? ``@compiler-errors``
2024-10-03Rollup merge of #131187 - Zalathar:bad-attr-ice, r=jieyouxuMatthias Krüger-6/+59
Avoid ICE in coverage builds with bad `#[coverage(..)]` attributes This code can sometimes witness malformed coverage attributes in builds that are going to fail, so use `span_delayed_bug` to avoid an inappropriate ICE in that case. Fixes #127880.
2024-10-03Rollup merge of #131183 - compiler-errors:opaque-ty-origin, r=estebankMatthias Krüger-163/+223
Refactoring to `OpaqueTyOrigin` Pulled out of a larger PR that uses these changes to do cross-crate encoding of opaque origin, so we can use them for edition 2024 migrations. These changes should be self-explanatory on their own, tho 😄
2024-10-03Rollup merge of #131176 - dev-ardi:gitignore, r=NoratriebMatthias Krüger-0/+9
.gitignore files for nix This adds support for direnv and nix flakes / nix shell. I'm not sure if we should have a working nix configuration though. r? ``@noratrieb``
2024-10-03Rollup merge of #131112 - jswrenn:fix-130413, r=compiler-errorsMatthias Krüger-56/+70
TransmuteFrom: Gracefully handle unnormalized types and normalization errors ~~Refactor to share code between `TransmuteFrom`'s trait selection and error reporting code paths. Additionally normalizes the source and destination types, and gracefully handles normalization errors.~~ Fixes #130413 r​? `@compiler-errors`
2024-10-03Rollup merge of #131024 - compiler-errors:deref-sugg, r=estebankMatthias Krüger-31/+54
Don't give method suggestions when method probe fails due to bad implementation of `Deref` If we have a bad `Deref` impl, we used to bail with `MethodError::NoMatch`, which makes the error reporting code think that there was no applicable method (and thus try to suggest importing something, even if it's in scope). Suppress this error, which fixes #131003.
2024-10-03Auto merge of #131145 - ↵bors-15/+14
ismailarilik:handle_potential_query_instability_lint_for_rustc_metadata, r=compiler-errors Handle `rustc_metadata` cases of `rustc::potential_query_instability` lint This PR removes `#![allow(rustc::potential_query_instability)]` line from [`compiler/rustc_metadata/src/lib.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_metadata/src/lib.rs#L3) and converts `FxHash{Map,Set}` types into `FxIndex{Map,Set}` to suppress lint errors. A somewhat tracking issue: https://github.com/rust-lang/rust/issues/84447
2024-10-03Disable jump threading UnOp::Not for non-boolMichael Goulet-2/+55
2024-10-03Remove crashes, add commentMichael Goulet-54/+2
2024-10-03Auto merge of #131205 - flip1995:clippy-subtree-update, r=Manishearthbors-848/+2484
Clippy subtree update r? `@Manishearth`
2024-10-03Merge commit 'aa0d551351a9c15d8a95fdb3e2946b505893dda8' into ↵Philipp Krones-848/+2484
clippy-subtree-update
2024-10-03Avoid emptiness check in `PeekMut::pop`EFanZh-1/+17
2024-10-03Auto merge of #131196 - matthiaskrgr:rollup-3it3zqp, r=matthiaskrgrbors-38/+44
Rollup of 3 pull requests Successful merges: - #130419 (Streamline `HirCollector`) - #131163 (Add `get_line` confusable to `Stdin::read_line()`) - #131173 (Fix `target_abi` in SOLID targets) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-03Failing diff testMichael Goulet-0/+58
2024-10-03Auto merge of #13492 - flip1995:rustup, r=flip1995bors-33/+23
Rustup r? `@ghost` changelog: none
2024-10-03Bump nightly version -> 2024-10-03Philipp Krones-1/+1
2024-10-03Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-865/+2531
2024-10-03Rollup merge of #131173 - madsmtm:target-info-solid_asp3-abi, r=lcnrMatthias Krüger-0/+2
Fix `target_abi` in SOLID targets The `armv7a-kmc-solid_asp3-eabi` and `armv7a-kmc-solid_asp3-eabihf` targets clearly have the ABI in their name, so it should also be exposed in Rust's `target_abi` cfg variable. CC target maintainer `@kawadakk.`
2024-10-03Rollup merge of #131163 - JakenHerman:master, r=NadrierilMatthias Krüger-1/+17
Add `get_line` confusable to `Stdin::read_line()` This pull request resolves https://github.com/rust-lang/rust/issues/131091 --- I've updated tests for `tests/ui/attributes/rustc_confusables_std_cases` in order to verify this change is working as intended. Before I submitted this pull request, I had a pull request to my local fork. If you're interested in seeing the conversation on that PR, go to https://github.com/JakenHerman/rust/pull/1. --- **Testing**: Run `./x.py test tests/ui/attributes/rustc_confusables_std_cases.rs`
2024-10-03Rollup merge of #130419 - nnethercote:streamline-HirCollector, r=GuillaumeGomezMatthias Krüger-37/+25
Streamline `HirCollector` r? `@GuillaumeGomez`
2024-10-03Avoid ICE in coverage builds with bad `#[coverage(..)]` attributesZalathar-6/+59
This code can sometimes witness malformed coverage attributes in builds that are going to fail, so use `span_delayed_bug` to avoid an inappropriate ICE in that case.
2024-10-03Handle `rustc_query_impl` cases of `rustc::potential_query_instability` lintismailarilik-1/+1
2024-10-03add nix files to gitignoreOrion Gonzalez-0/+5
2024-10-03add direnv to gitignoreOrion Gonzalez-0/+4
2024-10-03Auto merge of #128711 - clarfonthey:default-iters-hash, r=dtolnaybors-0/+80
impl `Default` for `HashMap`/`HashSet` iterators that don't already have it This is a follow-up to #128261 that isn't included in that PR because it depends on: * [x] rust-lang/hashbrown#542 (`Default`) * [x] `hashbrown` release containing above It also wasn't included in #128261 initially and should have its own FCP, since these are also insta-stable. Changes added: * `Default for hash_map::{Iter, IterMut, IntoIter, IntoKeys, IntoValues, Keys, Values, ValuesMut}` * `Default for hash_set::{Iter, IntoIter}` Changes that were added before FCP, but are being deferred to later: * `Clone for hash_map::{IntoIter, IntoKeys, IntoValues} where K: Clone, V: Clone` * `Clone for hash_set::IntoIter where K: Clone`
2024-10-03Auto merge of #131185 - workingjubilee:rollup-wkcqe2j, r=workingjubileebors-41/+488
Rollup of 3 pull requests Successful merges: - #126930 (Add unstable support for outputting file checksums for use in cargo) - #130725 (Parser: better error messages for ``@`` in struct patterns) - #131166 (Fix `target_vendor` for `aarch64-nintendo-switch-freestanding`) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-03Handle `rustc_metadata` cases of `rustc::potential_query_instability` lintismailarilik-15/+14
2024-10-02Rollup merge of #131166 - madsmtm:target-info-switch-vendor, r=jieyouxuJubilee-0/+1
Fix `target_vendor` for `aarch64-nintendo-switch-freestanding` Previously set to `target_vendor = "unknown"`, but Nintendo is clearly the vendor of the Switch, and is also reflected in the target name itself. CC target maintainers `@leo60228` and `@jam1garner`
2024-10-02Rollup merge of #130725 - GrigorenkoPV:@-in-struct-patterns, r=NadrierilJubilee-13/+150
Parser: better error messages for `@` in struct patterns
2024-10-02Rollup merge of #126930 - Xaeroxe:file-checksum-hint, r=chenyukangJubilee-28/+337
Add unstable support for outputting file checksums for use in cargo Adds an unstable option that appends file checksums and expected lengths to the end of the dep-info file such that `cargo` can read and use these values as an alternative to file mtimes. This PR powers the changes made in this cargo PR https://github.com/rust-lang/cargo/pull/14137 Here's the tracking issue for the cargo feature https://github.com/rust-lang/cargo/issues/14136.
2024-10-02Add `get_line` confusable to `Stdin::read_line()`Jaken Herman-1/+17
Add tests for addition of `#[rustc_confusables("get_line")]`
2024-10-02impl Default for Hash{Map,Set} iterators that don't already have itltdk-0/+80
2024-10-03Auto merge of #127912 - joboet:tls_dtor_thread_current, r=cuviperbors-139/+536
std: make `thread::current` available in all `thread_local!` destructors ... and thereby allow the panic runtime to always print the right thread name. This works by modifying the TLS destructor system to schedule a runtime cleanup function after all other TLS destructors registered by `std` have run. Unfortunately, this doesn't affect foreign TLS destructors, `thread::current` will still panic there. Additionally, the thread ID returned by `current_id` will now always be available, even inside the global allocator, and will not change during the lifetime of one thread (this was previously the case with key-based TLS). The mechanisms I added for this (`local_pointer` and `thread_cleanup`) will also allow finally fixing #111272 by moving the signal stack to a similar runtime-cleanup TLS variable.
2024-10-02Visit in embargo visitor if trait method has bodyMichael Goulet-10/+38
2024-10-02Move in_trait into OpaqueTyOriginMichael Goulet-125/+146
2024-10-02Use named fields for OpaqueTyOriginMichael Goulet-40/+53
2024-10-02Remove redundant in_trait from hir::TyKind::OpaqueDefMichael Goulet-20/+18
2024-10-03Auto merge of #131148 - Urgau:hashbrown-0.15, r=Amanieubors-130/+70
Update hashbrown to 0.15 and adjust some methods This PR updates `hashbrown` to 0.15 in the standard library and adjust some methods as well as removing some as they no longer exists in Hashbrown it-self. - `HashMap::get_many_mut` change API to return array-of-Option - `HashMap::{replace_entry, replace_key}` are removed, FCP close [already finished](https://github.com/rust-lang/rust/issues/44286#issuecomment-2293825619) - `HashSet::get_or_insert_owned` is removed as it no longer exists in hashbrown Closes https://github.com/rust-lang/rust/issues/44286 r? `@Amanieu`