about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-09-19[Clippy] Swap `iter_over_hash_type` to use diagnostic items instead of pathsGnomedDev-32/+30
2024-09-19[Clippy] Swap `non_octal_unix_permissions` to use diagnostic item instead of ↵GnomedDev-4/+3
path
2024-09-19[Clippy] Swap `unnecessary_owned_empty_strings` to use diagnostic item ↵GnomedDev-3/+3
instead of path
2024-09-19[Clippy] Swap `manual_strip` to use diagnostic items instead of pathsGnomedDev-8/+11
2024-09-19[Clippy] Swap `unnecessary_to_owned` to use diagnostic item instead of pathGnomedDev-3/+4
2024-09-19[Clippy] Swap `instant_subtraction` to use diagnostic item instead of pathGnomedDev-2/+3
2024-09-19[Clippy] Swap `waker_clone_wake` to use diagnostic item instead of pathGnomedDev-3/+4
2024-09-19[Clippy] Swap `filter_map_bool_then` to use diagnostic item instead of pathGnomedDev-4/+4
2024-09-19[Clippy] Swap `manual_while_let_some` to use diagnostic items instead of pathsGnomedDev-11/+15
2024-09-19[Clippy] Swap `repeat_vec_with_capacity` to use diagnostic item instead of pathGnomedDev-7/+8
2024-09-19[Clippy] Swap `VecArgs::hir` to use diagnostic items instead of pathsGnomedDev-8/+11
2024-09-19[Clippy] Swap `single_char_add_str`/`format_push_string` to use diagnostic ↵GnomedDev-7/+9
items instead of paths
2024-09-19[Clippy] Swap `manual_main_separator_str` to use diagnostic item instead of pathGnomedDev-3/+4
2024-09-19[Clippy] Swap `redundant_clone` to use diagnostic items instead of pathsGnomedDev-5/+7
2024-09-19[Clippy] Swap `float_equality_without_abs` to use diagnostic items instead ↵GnomedDev-5/+7
of paths
2024-09-19[Clippy] Swap `option_as_ref_deref` to use diagnostic items instead of pathsGnomedDev-19/+26
2024-09-19[Clippy] Swap `lines_filter_map_ok` to use a diagnostic item instead of pathGnomedDev-3/+4
2024-09-19[Clippy] Swap `map_entry` to use diagnostic items instead of pathsGnomedDev-10/+14
2024-09-19Auto merge of #130511 - bjoernager:const-char-encode-utf8, r=dtolnaybors-18/+15
Support `char::encode_utf8` in const scenarios. This PR implements [`rust-lang/rfcs#3696`](https://github.com/rust-lang/rfcs/pull/3696/). This assumes [`const_slice_from_raw_parts_mut`](https://github.com/rust-lang/rust/issues/67456/).
2024-09-19Auto merge of #123877 - ShE3py:expr-in-pats-2, r=fmeasebors-412/+1813
Further improve diagnostics for expressions in pattern position Follow-up of #118625, see #121697. ```rs fn main() { match 'b' { y.0.0.1.z().f()? as u32 => {}, } } ``` Before: ``` error: expected one of `=>`, ``@`,` `if`, or `|`, found `.` --> src/main.rs:3:10 | 3 | y.0.0.1.z().f()? as u32 => {}, | ^ expected one of `=>`, ``@`,` `if`, or `|` ``` After: ``` error: expected a pattern, found an expression --> src/main.rs:3:9 | 3 | y.0.0.1.z().f()? as u32 => {}, | ^^^^^^^^^^^^^^^^^^^^^^^ arbitrary expressions are not allowed in patterns | help: consider moving the expression to a match arm guard | 3 | val if val == y.0.0.1.z().f()? as u32 => {}, | ~~~ +++++++++++++++++++++++++++++++++ help: consider extracting the expression into a `const` | 2 + const VAL: /* Type */ = y.0.0.1.z().f()? as u32; 3 ~ match 'b' { 4 ~ VAL => {}, | help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`) | 3 | const { y.0.0.1.z().f()? as u32 } => {}, | +++++++ + ``` --- r? fmease `@rustbot` label +A-diagnostics +A-parser +A-patterns +C-enhancement
2024-09-18Mark and implement 'char::encode_utf8' as const.Gabriel Bjørnager Jensen-18/+15
2024-09-18Auto merge of #130534 - workingjubilee:rollup-furaug4, r=workingjubileebors-485/+686
Rollup of 9 pull requests Successful merges: - #97524 (Add `Thread::{into_raw, from_raw}`) - #127988 (Do not ICE with incorrect empty suggestion) - #129422 (Gate `repr(Rust)` correctly on non-ADT items) - #129934 (Win: Open dir for sync access in remove_dir_all) - #130450 (Reduce confusion about `make_indirect_byval` by renaming it) - #130476 (Implement ACP 429: add `Lazy{Cell,Lock}::get[_mut]` and `force_mut`) - #130487 (Update the minimum external LLVM to 18) - #130513 (Clarify docs for std::fs::File::write) - #130522 ([Clippy] Swap `manual_retain` to use diagnostic items instead of paths) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-18Rollup merge of #130522 - GnomedDev:clippy-manual-retain-paths, ↵Jubilee-26/+35
r=compiler-errors [Clippy] Swap `manual_retain` to use diagnostic items instead of paths Part of https://github.com/rust-lang/rust-clippy/issues/5393, just a chore.
2024-09-18Rollup merge of #130513 - shekhirin:fs-write-doc-comment, r=cuviperJubilee-1/+1
Clarify docs for std::fs::File::write This PR fixes the doc comment for `std::fs::File::write` method.
2024-09-18Rollup merge of #130487 - cuviper:min-llvm-18, r=nikicJubilee-403/+89
Update the minimum external LLVM to 18 With this change, we'll have stable support for LLVM 18 and 19. For reference, the previous increase to LLVM 17 was #122649. cc `@rust-lang/wg-llvm` r? nikic
2024-09-18Rollup merge of #130476 - workingjubilee:more-lazy-methods-take-2, r=AmanieuJubilee-11/+312
Implement ACP 429: add `Lazy{Cell,Lock}::get[_mut]` and `force_mut` Tracking issue for `lazy_get`: https://github.com/rust-lang/rust/issues/129333
2024-09-18Rollup merge of #130450 - workingjubilee:these-names-are-indirect, r=bjorn3Jubilee-39/+14
Reduce confusion about `make_indirect_byval` by renaming it As part of doing so, remove the incorrect handling of the wasm target's `make_indirect_byval` (i.e. using it at all).
2024-09-18Rollup merge of #129934 - ChrisDenton:remove-dir-all3, r=AmanieuJubilee-3/+12
Win: Open dir for sync access in remove_dir_all A small follow up to #129800. We should explicitly open directories for synchronous access. We ultimately use `GetFileInformationByHandleEx` to read directories which should paper over any issues caused by using async directory reads (or else return an error) but it's better to do the right thing in the first place. Note though that `delete` does not read or write any data so it's not necessary there.
2024-09-18Rollup merge of #129422 - compiler-errors:repr-rust, r=fmeaseJubilee-1/+73
Gate `repr(Rust)` correctly on non-ADT items #114201 added `repr(Rust)` but didn't add any attribute validation to it like `repr(C)` has, to only allow it on ADT items. I consider this code to be nonsense, for example: ``` #[repr(Rust)] fn foo() {} ``` Reminder that it's different from `extern "Rust"`, which *is* valid on function items. But also this now disallows `repr(Rust)` on modules, impls, traits, etc. I'll crater it, if it looks bad then I'll add an FCW. --- https://github.com/rust-lang/rust/labels/relnotes: Compatibility (minor breaking change).
2024-09-18Rollup merge of #127988 - estebank:dupe-derive-params, r=fmeaseJubilee-1/+102
Do not ICE with incorrect empty suggestion When we have two types with the same name, one without type parameters and the other with type parameters and a derive macro, we were before incorrectly suggesting to remove type parameters from the former, which ICEd because we were suggesting to remove nothing. We now gate against this. The output is still not perfect. E0107 should explicitly detect this case and provide better context, but for now let's avoid the ICE. Fix #108748.
2024-09-18Rollup merge of #97524 - ibraheemdev:thread-raw, r=ibraheemdevJubilee-0/+48
Add `Thread::{into_raw, from_raw}` Public API: ```rust #![unstable(feature = "thread_raw", issue = "97523")] impl Thread { pub fn into_raw(self) -> *const (); pub unsafe fn from_raw(ptr: *const ()) -> Thread; } ``` ACP: https://github.com/rust-lang/libs-team/issues/200
2024-09-18Revert "Add a hack to prevent proc_macro misopt in CI"Josh Stone-3/+1
This reverts commit da8ac73d910a446e796f511c0dda97e49d14f044.
2024-09-18Update the minimum external LLVM to 18Josh Stone-400/+88
2024-09-18tests: Move wasm32 to transparent-opaque-ptr.rs testJubilee Young-4/+4
2024-09-18tests: Remove test for wrong wasm codegenJubilee Young-26/+2
2024-09-18compiler: s/make_indirect_byval/pass_by_stack_offset/Jubilee Young-8/+7
The previous name is just an LLVMism, which conveys almost nothing about what is actually meant by the function relative to the ABI. In doing so, remove an already-addressed FIXME.
2024-09-18compiler: Use make_indirect for the wasm ABIJubilee Young-1/+1
This is ignored by LLVM, but is still incorrect.
2024-09-18library: Call it really_init_mut to avoid name collisionsJubilee Young-4/+4
2024-09-18library: Destabilize Lazy{Cell,Lock}::{force,deref}_mutJubilee Young-28/+9
2024-09-18Add suggestions for expressions in patternsLieselotte-72/+1122
2024-09-18Recover more expressions in patternsLieselotte-282/+633
2024-09-18Auto merge of #130519 - matthiaskrgr:rollup-l1hok4x, r=matthiaskrgrbors-231/+294
Rollup of 5 pull requests Successful merges: - #130457 (Cleanup codegen traits) - #130471 (Add zlib to musl dist image so rust-lld will support zlib compression for debug info there.) - #130507 (Improve handling of raw-idents in check-cfg) - #130509 (llvm-wrapper: adapt for LLVM API changes, second try) - #130510 (doc: the source of `LetStmt` can also be `AssignDesugar`) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-18Explicitly mark a hack as a HACK and elaborate its commentLeón Orell Valerian Liehr-17/+20
2024-09-18Do not ICE with incorrect empty suggestionEsteban Küber-1/+99
When we have two types with the same name, one without type parameters and the other with type parameters and a derive macro, we were before incorrectly suggesting to remove type parameters from the former, which ICEd because we were suggesting to remove nothing. We now gate against this. The output is still not perfect. E0107 should explicitly detect this case and provide better context, but for now let's avoid the ICE.
2024-09-18[Clippy] Swap `manual_retain` to use diagnostic items instead of pathsGnomedDev-26/+35
2024-09-18Rollup merge of #130510 - samueltardieu:doc-letstmt-assign-desugar, ↵Matthias Krüger-1/+2
r=compiler-errors doc: the source of `LetStmt` can also be `AssignDesugar` For example, the two following statements are desugared into a block whose `LetStmt` source is `AssignDesugar`: ```rust _ = ignoring_some_result(); (a, b) = (b, a); ```
2024-09-18Rollup merge of #130509 - krasimirgg:llvm-20-2, r=nikicMatthias Krüger-0/+4
llvm-wrapper: adapt for LLVM API changes, second try This is a re-work of https://github.com/rust-lang/rust/pull/129749 after LLVM brought back the APIs used by rust. No functional changes intended. `@rustbot` label: +llvm-main r? `@nikic` cc: `@tmandry`
2024-09-18Rollup merge of #130507 - Urgau:check-cfg-raw-keywords, r=jieyouxuMatthias Krüger-4/+133
Improve handling of raw-idents in check-cfg This PR improves the handling of raw-idents in the check-cfg diagnostics. In particular the list of expected names and the suggestion now correctly take into account the "keyword-ness" of the ident, and correctly prefix the ident with `r#` when necessary. `@rustbot` labels +F-check-cfg
2024-09-18Rollup merge of #130471 - khuey:zlib-musl, r=KobzolMatthias Krüger-0/+1
Add zlib to musl dist image so rust-lld will support zlib compression for debug info there. Fixes #130063. r? `@Kobzol`
2024-09-18Rollup merge of #130457 - nnethercote:cleanup-codegen-traits, r=bjorn3Matthias Krüger-226/+154
Cleanup codegen traits The traits governing codegen are quite complicated and hard to follow. This PR cleans them up a bit. r? `@bjorn3`