about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-10-01Implemented FromStr for CString and TryFrom<CString> for StringYoh Deadfall-1/+25
2024-09-19Auto merge of #130406 - arttet:master, r=onur-ozkanbors-3/+12
Bump cc dependency * The [issue](https://github.com/rust-lang/rust/issues/130231) was fixed in the [PR](https://github.com/rust-lang/cc-rs/pull/1207) * The build artifacts of arm64e-apple-darwin can be found [here](https://github.com/arttet/rust-compiler-builder/actions/runs/10902308425)
2024-09-19Auto merge of #130547 - workingjubilee:rollup-tw30khz, r=workingjubileebors-9/+98
Rollup of 3 pull requests Successful merges: - #130531 (Check params for unsafety in THIR) - #130533 (Never patterns constitute a read for unsafety) - #130542 (Stabilize const `MaybeUninit::as_mut_ptr`) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-18Rollup merge of #130542 - ultrabear:stabilize_const_maybeuninit_as_mut_ptr, ↵Jubilee-5/+5
r=workingjubilee Stabilize const `MaybeUninit::as_mut_ptr` This PR stabilizes the following APIs as const stable as of rust `1.83`: ```rs impl<T> MaybeUninit<T> { pub const fn as_mut_ptr(&mut self) -> *mut T; } ``` This is made possible by const_mut_refs being stabilized (yay). FCP: #75251 [(comment)](https://github.com/rust-lang/rust/issues/75251#issuecomment-2356197443)
2024-09-18Rollup merge of #130533 - compiler-errors:never-pat-unsafeck, r=NadrierilJubilee-4/+41
Never patterns constitute a read for unsafety This code is otherwise unsound if we don't emit an unsafety error here. Noticed when fixing #130528, but it's totally unrelated. r? `@Nadrieril`
2024-09-18Rollup merge of #130531 - compiler-errors:thir-unsafeck-param, r=UrgauJubilee-0/+52
Check params for unsafety in THIR Self-explanatory. I'm not surprised this was overlooked, given the way that THIR visitors work. Perhaps we should provide a better entrypoint. Fixes #130528
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-18run `x.py fmt`ultrabear-1/+4
2024-09-18remove feature attributes as const_maybe_uninit_as_mut_ptr is stabilizedultrabear-3/+0
2024-09-18stabilize `const_maybe_uninit_as_mut_ptr`ultrabear-2/+2
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-18Never patterns constitute a read for unsafetyMichael Goulet-4/+41
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-18Check params for unsafety in THIRMichael Goulet-0/+52
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`
2024-09-18Bump cc dependencyArtyom Tetyukhin-3/+12
2024-09-18Auto merge of #130497 - saethlin:alloc-zeroed-is-unstable, r=bjorn3bors-1/+7
read_volatile __rust_no_alloc_shim_is_unstable in alloc_zeroed It was pointed out in https://github.com/rust-lang/rust/issues/128854#issuecomment-2278919897 that the magic volatile read was probably missing from `alloc_zeroed`. I can't find any mention of `alloc_zeroed` on https://github.com/rust-lang/rust/pull/86844, so it looks like this was just missed initially.
2024-09-18Clarify docs for std::fs::File::writeAlexey Shekhirin-1/+1
2024-09-18doc: the source of `LetStmt` can also be `AssignDesugar`Samuel Tardieu-1/+2
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-18llvm-wrapper: adapt for LLVM API changes, second tryKrasimir Georgiev-0/+4
2024-09-18Auto merge of #129491 - StackOverflowExcept1on:master, r=m-ou-sebors-8/+8
Pass `fmt::Arguments` by reference to `PanicInfo` and `PanicMessage` Resolves #129330 For some reason after #115974 and #126732 optimizations applied to panic handler became worse and compiler stopped removing panic locations if they are not used in the panic message. This PR fixes that and maybe we can merge it into beta before rust 1.81 is released. Note: optimization only works with `lto = "fat"`. r? libs-api
2024-09-18Auto merge of #130500 - matthiaskrgr:rollup-lfx3bb4, r=matthiaskrgrbors-4/+127
Rollup of 3 pull requests Successful merges: - #130466 (tests: add repr/transparent test for aarch64) - #130468 (Make sure that def id <=> lang item map is bidirectional) - #130499 (Add myself to the libs review rotation) r? `@ghost` `@rustbot` modify labels: rollup