about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-12-06Auto merge of #133950 - matthiaskrgr:rollup-b7g5p73, r=matthiaskrgrbors-113/+821
Rollup of 5 pull requests Successful merges: - #130777 (rust_for_linux: -Zreg-struct-return commandline flag for X86 (#116973)) - #133211 (Extend Miri to correctly pass mutable pointers through FFI) - #133790 (Improve documentation for Vec::extend_from_within) - #133930 (rustbook: update to use new mdbook-trpl package from The Book) - #133931 (Only allow PassMode::Direct for aggregates on wasm when using the C ABI) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-06Rollup merge of #133931 - bjorn3:even_stricter_fn_abi_sanity_checking, ↵Matthias Krüger-10/+20
r=nnethercote Only allow PassMode::Direct for aggregates on wasm when using the C ABI For the Rust ABI we don't have any ABI compat reasons to allow PassMode::Direct for aggregates.
2024-12-06Rollup merge of #133930 - chriskrycho:mdbook-trpl-package, r=ehussMatthias Krüger-29/+32
rustbook: update to use new mdbook-trpl package from The Book Updates to the latest merge from `rust-lang/book` and simplifies the dependency chain there. There are now three preprocessors, but only one package, so everything is a lot nicer to deal with from the consuming POV (i.e. here).
2024-12-06Rollup merge of #133790 - HypheX:improve-vec-docs, r=harudagondi,workingjubileeMatthias Krüger-11/+14
Improve documentation for Vec::extend_from_within This closes #104762. It rephrases some of the explanations, and greatly improves the clarity of the example. Based on this PR and its discussions: https://github.com/rust-lang/rust/pull/105030/files#r1059808792
2024-12-06Rollup merge of #133211 - Strophox:miri-correct-state-update-ffi, r=RalfJungMatthias Krüger-59/+476
Extend Miri to correctly pass mutable pointers through FFI Based off of https://github.com/rust-lang/rust/pull/129684, this PR further extends Miri to execute native calls that make use of pointers to *mutable* memory. We adapt Miri's bookkeeping of internal state upon any FFI call that gives external code permission to mutate memory. Native code may now possibly write and therefore initialize and change the pointer provenance of bytes it has access to: Such memory is assumed to be *initialized* afterwards and bytes are given *arbitrary (wildcard) provenance*. This enables programs that correctly use mutating FFI calls to run Miri without errors, at the cost of possibly missing Undefined Behaviour caused by incorrect usage of mutating FFI. > <details> > > <summary> Simple example </summary> > > ```rust > extern "C" { > fn init_int(ptr: *mut i32); > } > > fn main() { > let mut x = std::mem::MaybeUninit::<i32>::uninit(); > let x = unsafe { > init_int(x.as_mut_ptr()); > x.assume_init() > }; > > println!("C initialized my memory to: {x}"); > } > ``` > ```c > void init_int(int *ptr) { > *ptr = 42; > } > ``` > should now show `C initialized my memory to: 42`. > > </details> r? ``@RalfJung``
2024-12-06Rollup merge of #130777 - azhogin:azhogin/reg-struct-return, r=workingjubileeMatthias Krüger-4/+279
rust_for_linux: -Zreg-struct-return commandline flag for X86 (#116973) Command line flag `-Zreg-struct-return` for X86 (32-bit) for rust-for-linux. This flag enables the same behavior as the `abi_return_struct_as_int` target spec key. - Tracking issue: https://github.com/rust-lang/rust/issues/116973
2024-12-06Only allow PassMode::Direct for aggregates on wasm when using the C ABIbjorn3-10/+20
For the Rust ABI we don't have any ABI compat reasons to allow PassMode::Direct for aggregates.
2024-12-06Auto merge of #133559 - ↵bors-50/+62
compiler-errors:structurally-resolve-adjust-for-branch, r=lcnr Structurally resolve in `adjust_for_branches` r? lcnr
2024-12-05Auto merge of #133940 - GuillaumeGomez:rollup-nm1cz5j, r=GuillaumeGomezbors-1158/+2774
Rollup of 8 pull requests Successful merges: - #132155 (Always display first line of impl blocks even when collapsed) - #133256 (CI: use free runners for i686-gnu jobs) - #133607 (implement checks for tail calls) - #133821 (Replace black with ruff in `tidy`) - #133827 (CI: rfl: move job forward to Linux v6.13-rc1) - #133910 (Normalize target-cpus.rs stdout test for LLVM changes) - #133921 (Adapt codegen tests for NUW inference) - #133936 (Avoid fetching the anon const hir node that is already available) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-05Rollup merge of #133936 - oli-obk:push-qmvqsmwqrtqr, r=lqdGuillaume Gomez-16/+10
Avoid fetching the anon const hir node that is already available
2024-12-05Rollup merge of #133921 - TimNN:nuw-infer, r=nikicGuillaume Gomez-15/+15
Adapt codegen tests for NUW inference These were broken by https://github.com/llvm/llvm-project/commit/462cb3cd6cecd0511ecaf0e3ebcaba455ece587d Let me know if you think we should have a FIXME / tracking issue to update the tests after the LLVM 20 upgrade to make these required. `@rustbot` label: +llvm-main r? `@nikic`
2024-12-05Rollup merge of #133910 - TimNN:llvm-target-cpus, r=jieyouxuGuillaume Gomez-0/+6
Normalize target-cpus.rs stdout test for LLVM changes LLVM has recently added support for the `lime1` CPU in https://github.com/llvm/llvm-project/commit/35cce408eef1a253df12c0023c993d78b180b1f3, so the `target-cpus.rs` test currently produces different output depending on the LLVM version. This CL adds a normalization directive, to remove the new CPU from the output list. Alternatives fixes I can think of: * Add two revisions of the test (one per LLVM version) * Ignore the test on one of the LLVM versions * I dislike this, because it's possible that the test won't get updated for the next LLVM version. I don't think the exact list of target CPUs is relevant for this test, so it shouldn't be too bad if the normalization sticks around longer than necessary. `@rustbot` label: +llvm-main
2024-12-05Rollup merge of #133827 - ojeda:ci-rfl, r=lqdGuillaume Gomez-2/+2
CI: rfl: move job forward to Linux v6.13-rc1 Linux v6.13-rc1 contains commit 28e848386b92 ("rust: block: fix formatting of `kernel::block::mq::request` module"), which in turn contains commit c95bbb59a9b2 ("rust: enable arbitrary_self_types and remove `Receiver`"), which is why we had a hash rather than a tag. r? ```@Kobzol``` ```@lqd``` try-job: x86_64-rust-for-linux ```@rustbot``` label A-rust-for-linux ```@bors``` try
2024-12-05Rollup merge of #133821 - Kobzol:replace-black-with-ruff, r=onur-ozkanGuillaume Gomez-1029/+1563
Replace black with ruff in `tidy` `ruff` can both lint and format Python code (in fact, it should be a mostly drop-in replacement for `black` in terms of formatting), so it's not needed to use `black` anymore. This PR removes `black` and replaces it with `ruff`, to get rid of one Python dependency, and also to make Python formatting faster (although that's a small thing). If we decide to merge this, we'll need to "reformat the world" - `ruff` is not perfectly compatible with `black`, and it also looks like `black` was actually ignoring some files before. I tried it locally (`./x test tidy --extra-checks=py:fmt --bless`) and it also reformatted some code in subtrees (e.g. `clippy` or `rustc_codegen_gcc`) - I'm not sure how to handle that.
2024-12-05Rollup merge of #133607 - WaffleLapkin:tail-call-checks, r=compiler-errorsGuillaume Gomez-12/+859
implement checks for tail calls Quoting the [RFC draft](https://github.com/phi-go/rfcs/blob/guaranteed-tco/text/0000-explicit-tail-calls.md): > The argument to become is a function (or method) call, that exactly matches the function signature and calling convention of the callee. The intent is to ensure a matching ABI. Note that lifetimes may differ as long as they pass borrow checking, see [below](https://github.com/phi-go/rfcs/blob/guaranteed-tco/text/0000-explicit-tail-calls.md#return-type-coercion) for specifics on the return type. > Tail calling closures and tail calling from closures is not allowed. This is due to the high implementation effort, see below, this restriction can be lifted by a future RFC. > Invocations of operators were considered as valid targets but were rejected on grounds of being too error-prone. In any case, these can still be called as methods. > Tail calling [variadic functions](https://doc.rust-lang.org/beta/unstable-book/language-features/c-variadic.html) and tail calling from variadic functions is not allowed. As support for variadic function is stabilized on a per target level, support for tail-calls regarding variadic functions would need to follow a similar approach. To avoid this complexity and to minimize implementation effort for backends, this interaction is currently not allowed but support can be added with a future RFC. ----- The checks are implemented as a query, similarly to `check_unsafety`. The code is cherry-picked straight out of #112657 which was written more than a year ago, so I expect we might need to change some things ^^"
2024-12-05Rollup merge of #133256 - MarcoIeni:use-linux-free-runners, r=KobzolGuillaume Gomez-26/+77
CI: use free runners for i686-gnu jobs try-job: i686-gnu-1 try-job: i686-gnu-2 try-job: i686-gnu-nopt-1 try-job: i686-gnu-nopt-2
2024-12-05Rollup merge of #132155 - GuillaumeGomez:impl-block-doc, r=rustdocGuillaume Gomez-58/+242
Always display first line of impl blocks even when collapsed Fixes https://github.com/rust-lang/rust/issues/130612. It the line is too long, only the beginning will be visible: ![Screenshot from 2024-10-25 17-21-41](https://github.com/user-attachments/assets/dd2d912c-ad55-4410-8195-1d66a0a99ad4) Otherwise, it looks like this: ![image](https://github.com/user-attachments/assets/1f40b9e0-2143-4b9d-a4b0-338a0cd740df) Can be tested [here](https://rustdoc.crud.net/imperio/impl-block-doc/foo/struct.ImplDoc.html). r? `@notriddle`
2024-12-05Update GUI test after rebaseGuillaume Gomez-7/+3
2024-12-05Improve positioning of "..." in collapsed impl blockGuillaume Gomez-5/+41
2024-12-05Use text ellipsis instead of bottom blurringGuillaume Gomez-11/+16
2024-12-05Turn `markdown_split_summary_and_content` into a method of `Markdown`Guillaume Gomez-49/+52
2024-12-05Update GUI testsGuillaume Gomez-2/+2
2024-12-05Add GUI test for impl block doc displayGuillaume Gomez-0/+50
2024-12-05Update browser-ui-test version to 0.18.2Guillaume Gomez-1/+1
2024-12-05Always display first line of impl blocks even when collapsedGuillaume Gomez-47/+141
2024-12-05extend Miri to correctly pass mutable pointers through FFIStrophox-59/+476
Co-authored-by: Ralf Jung <post@ralfj.de>
2024-12-05rustbook: update to use new mdbook-trpl package from The BookChris Krycho-29/+32
2024-12-05Auto merge of #133905 - jhpratt:rollup-iho8sl1, r=jhprattbors-78/+199
Rollup of 6 pull requests Successful merges: - #127565 (Teach rustc about the Xtensa VaListImpl) - #133844 (clarify simd_relaxed_fma non-determinism) - #133867 (Fix "std" support status of some tier 3 targets) - #133882 (Improve comments for the default backtrace printer) - #133888 (Improve bootstrap job objects) - #133898 (skip `setup::Hook` on non-git sources) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-05Improve documentationXelph-11/+14
Fix missing newlines that rustfmt removed. fix trailing whitespace Fix duplicate word. Reformat panic reasons into a list remove trailing whitespace 2 electric boogaloo Change verbe tense. Integrate suggestions
2024-12-05Adapt codegen tests for NUW inferenceTim Neumann-15/+15
2024-12-05Normalize target-cpus.rs stdout test for LLVM changesTim Neumann-0/+6
2024-12-05Rollup merge of #133898 - onur-ozkan:ignore-git-hook-on-dist-sources, r=jieyouxuJacob Pratt-4/+6
skip `setup::Hook` on non-git sources Running `setup::Hook` (with `x setup`) leads tarball sources to panic and this PR resolves that problem by skipping `Hook` step on non-git sources.
2024-12-05Rollup merge of #133888 - ChrisDenton:job, r=jieyouxuJacob Pratt-26/+17
Improve bootstrap job objects This attempts to fix a few comments on bootstrap job objects. I also fixed an issue where if duplicating the job object handle into the python process failed, it would close the job object. This would then result in the job object closing all attached processes, which at that point includes the current process. The fix is to simply never close the job object handle at any point after the current process is assigned to it.
2024-12-05Rollup merge of #133882 - jyn514:doc-backtraces, r=saethlinJacob Pratt-14/+12
Improve comments for the default backtrace printer The existing comments were misleading, confusing, and outdated. Take this comment for example: ``` // Any frames between `__rust_begin_short_backtrace` and `__rust_end_short_backtrace` // are omitted from the backtrace in short mode, `__rust_end_short_backtrace` will be // called before the panic hook, so we won't ignore any frames if there is no // invoke of `__rust_begin_short_backtrace`. ``` this is just wrong. here is an example (full) backtrace: <details> ``` Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.01s Running `/home/jyn/.local/lib/cargo/target/debug/example` called `Option::unwrap()` on a `None` value stack backtrace: 0: 0x56499698c595 - std::backtrace_rs::backtrace::libunwind::trace::h5ef2cc16e9a7415a 1: 0x56499698c595 - std::backtrace_rs::backtrace::trace_unsynchronized::h9b5e016e9075f714 2: 0x56499698c595 - std::sys_common::backtrace::_print_fmt::h2f62c7f9ff224e93 3: 0x56499698c595 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hbe51682735731910 4: 0x5649969aa26b - core::fmt::rt::Argument::fmt::h1994ab2b310d665e 5: 0x5649969aa26b - core::fmt::write::hade58a36d63468d7 6: 0x56499698a43f - std::io::Write::write_fmt::h16145587d801a9ab 7: 0x56499698c36e - std::sys_common::backtrace::_print::ha8082e56201dadb4 8: 0x56499698c36e - std::sys_common::backtrace::print::he30f96b4e7f6cbfd 9: 0x56499698d709 - std::panicking::default_hook::{{closure}}::hf0801f6b18a968d3 10: 0x56499698d4ac - std::panicking::default_hook::hd2defec7eda5aeb0 11: 0x56499698dc31 - std::panicking::rust_panic_with_hook::hde93283600065c53 12: 0x56499698daf3 - std::panicking::begin_panic_handler::{{closure}}::h5e151adbdb7ec0c1 13: 0x56499698ca59 - std::sys_common::backtrace::__rust_end_short_backtrace::he36a1407e0f77700 14: 0x56499698d7d4 - rust_begin_unwind 15: 0x5649969a9503 - core::panicking::panic_fmt::h2380d41365f95412 16: 0x5649969a958c - core::panicking::panic::h38cf8db80e8c6e67 17: 0x5649969a93e9 - core::option::unwrap_failed::he72696e53ff29a05 18: 0x5649969722b6 - core::option::Option<T>::unwrap::hb574dc0dc1703062 19: 0x5649969722b6 - example::main::h7a867aafacd93d75 20: 0x5649969721db - core::ops::function::FnOnce::call_once::h734f99a5e57291b7 21: 0x56499697226e - std::sys_common::backtrace::__rust_begin_short_backtrace::h02f5d58c351c4756 22: 0x564996972241 - std::rt::lang_start::{{closure}}::h8b134fe2c31a4355 23: 0x564996988662 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h88d7bb571ee2aaf4 24: 0x564996988662 - std::panicking::try::do_call::hfb78dfb6599c871d 25: 0x564996988662 - std::panicking::try::habd041c8c4c8e50c 27: 0x564996988662 - std::rt::lang_start_internal::{{closure}}::h227591a6f9c0879e 28: 0x564996988662 - std::panicking::try::do_call::h3c5878333c38916a 29: 0x564996988662 - std::panicking::try::h5af7b3a127cdae70 31: 0x564996988662 - std::rt::lang_start_internal::hbc85e809eeace0dd 32: 0x56499697221a - std::rt::lang_start::ha1eb16922c9cb224 33: 0x5649969722ee - main 34: 0x7f031962a1ca - __libc_start_call_main 35: 0x7f031962a28b - __libc_start_main_impl 36: 0x5649969720a5 - _start 37: 0x0 - <unknown> ``` </details> note particularly frames 13-21, from start_backtrace to end_backtrace. with PrintFmt::Short, these are the *only* frames that are printed; i.e. we are doing the exact opposite of the comment. r? ``@saethlin``
2024-12-05Rollup merge of #133867 - taiki-e:platform-support, r=NoratriebJacob Pratt-31/+31
Fix "std" support status of some tier 3 targets https://github.com/rust-lang/rust/pull/127265 marked targets with empty "std" support status as no-std targets in target-spec metadata: > * Where a targets 'std' or 'host tools' support is listed as '?' in the rust docs, these are left as 'None' with this PR. The corresponding changes in cargo will only reject an attempt to build std if the 'std' field is 'Some(false)'. In the case it is 'None', cargo will continue trying to build However, this is not accurate because "std" support status has a marker indicating that it is a no-std target. (empty status is just invalid.) https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-3 > The `std` column in the table below has the following meanings: > > * ✓ indicates the full standard library is available. > * \* indicates the target only supports [`no_std`] development. > * ? indicates the standard library support is unknown or a work-in-progress. > > [`no_std`]: https://rust-embedded.github.io/book/intro/no-std.html This PR fixes the status of targets whose "std" support status is currently set to empty and update target-spec metadata. The new status is set based on the following criteria: - Set to ✓ for targets that I regularly check in [rust-cross-toolchain](https://github.com/taiki-e/rust-cross-toolchain) that the `cargo test` works. (riscv32-unknown-linux-gnu,{riscv64,s390x}-unknown-linux-musl) - Targets where `cargo run` works but `cargo test` does not work tend to have incomplete std support (e.g., riscv32 musl https://github.com/taiki-e/rust-cross-toolchain/commit/f3068b66e042895806538bebba1ea982f13bfbb1), so I included them in the group below that means “work in progress” rather than in this group. - Set powerpc64le FreeBSD to ✓ on both std and host_tools, because the [Rust package](https://www.freshports.org/lang/rust/) is available. - Set to ? (which means "unknown" or “work in progress”) for all other affected targets because these are Linux, Android, FreeBSD, or Fuchsia, all of which are operating systems that support std if properly supported. r? Noratrieb cc ``@harmou01``
2024-12-05Rollup merge of #133844 - RalfJung:simd_relaxed_fma-nondet, r=workingjubileeJacob Pratt-1/+2
clarify simd_relaxed_fma non-determinism This is the safer spec in the sense that it is more likely to be satisfied by the backend -- and if people are okay with a non-deterministic result, I assume they don't care whether it's the same choice across all lanes or not? Cc ``@calebzulawski`` ``@workingjubilee``
2024-12-05Rollup merge of #127565 - esp-rs:xtensa-vaargs, r=workingjubileeJacob Pratt-2/+131
Teach rustc about the Xtensa VaListImpl Following on from the target Xtensa target PRs (https://github.com/rust-lang/rust/pull/125141, https://github.com/rust-lang/rust/pull/126380), this PR teaches rustc about the structure of the VA list on the Xtensa arch, as well as adding the required lowering to be able to actually use it.
2024-12-05Avoid fetching the anon const hir node that is already availableOli Scherer-16/+10
2024-12-05skip `setup::Hook` on non-git sourcesonur-ozkan-4/+6
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-05Auto merge of #133893 - fmease:rollup-11pi6fg, r=fmeasebors-1105/+2289
Rollup of 10 pull requests Successful merges: - #118833 (Add lint against function pointer comparisons) - #122161 (Fix suggestion when shorthand `self` has erroneous type) - #133233 (Add context to "const in pattern" errors) - #133761 (Update books) - #133843 (Do not emit empty suggestion) - #133863 (Rename `core_pattern_type` and `core_pattern_types` lib feature gates to `pattern_type_macro`) - #133872 (No need to create placeholders for GAT args in confirm_object_candidate) - #133874 (`fn_sig_for_fn_abi` should return a `ty::FnSig`, no need for a binder) - #133890 (Add a new test ui/incoherent-inherent-impls/no-other-unrelated-errors to check E0116 does not cause unrelated errors) - #133892 (Revert #133817) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-05Rollup merge of #133892 - jieyouxu:revert-eprintln, r=jieyouxuLeón Orell Valerian Liehr-210/+206
Revert #133817 This reverts commit 0585134e709de4a14e509158662fa569c155c195, reversing changes made to 5530869e0ff21d69e0eef1a4c4fd1f25bcbe7fbf. #133817 unfortunately only converted the `println!` instances to `eprintln!`, meaning that some test output (via compiletest/bootstrap) was messed up because stdout/stderr output interleaved improperly when some `println!` instances were converted to `eprintln!` instances, while some `print!` instances remain unchanged. This made reading test output annoying for contributors cc #133879. Closes #133879 by reverting. #133817 can be relanded in the future when `print!` instances are also matched with `println!` instances. cc `@clubby789` This is a clean revert so I'm going to self-approve this PR.
2024-12-05Rollup merge of #133890 - kei519:fix-125814, r=compiler-errorsLeón Orell Valerian Liehr-0/+19
Add a new test ui/incoherent-inherent-impls/no-other-unrelated-errors to check E0116 does not cause unrelated errors rustc xxx (we do not know) to 1.82.0 emits unrelated errors when E0116 is present (see #125814). We do not know what caused and fixed it, but add a test to confirm rustc does not cause the same error in the future.
2024-12-05Rollup merge of #133874 - compiler-errors:fn-sig-binder, r=oli-obkLeón Orell Valerian Liehr-82/+52
`fn_sig_for_fn_abi` should return a `ty::FnSig`, no need for a binder r? oli-obk Split out of #133122
2024-12-05Rollup merge of #133872 - compiler-errors:simplify-gat-check, r=oli-obkLeón Orell Valerian Liehr-52/+2
No need to create placeholders for GAT args in confirm_object_candidate We no longer need this logic to add placeholders for GAT args since with the removal of the `gat_extended` feature gate (https://github.com/rust-lang/rust/pull/133768) we no longer allow GATs in dyn trait anyways. r? oli-obk
2024-12-05Rollup merge of #133863 - oli-obk:push-pystoxvtvssx, r=lqdLeón Orell Valerian Liehr-74/+53
Rename `core_pattern_type` and `core_pattern_types` lib feature gates to `pattern_type_macro` That's what the gates are actually gating, and the single char difference in naming was not helpful either fixes #128987
2024-12-05Rollup merge of #133843 - estebank:empty-semi-sugg, r=jieyouxuLeón Orell Valerian Liehr-1/+89
Do not emit empty suggestion The `println!();` statement's span doesn't include the `;`, and the modified suggestions where trying to get the `;` by getting the differenece between the statement's and the expression's spans, which was an empty suggestion. Fix #133833, fix #133834.
2024-12-05Rollup merge of #133761 - rustbot:docs-update, r=ehussLeón Orell Valerian Liehr-0/+0
Update books ## rust-lang/book 12 commits in e16dd73690a6cc3ecdc5f5d94bbc3ce158a42e16..614c19cb4025636eb2ba68ebb3d44e3bd3a5e6e4 2024-12-02 16:22:15 UTC to 2024-11-26 21:15:51 UTC - Fix more inverted uses of “shadowed” (rust-lang/book#4122) - Fix a couple inverted uses of “shadowed” (rust-lang/book#4121) - Fix confusion between variable `hello` and string `"hello"` (rust-lang/book#4118) - Ch. 17: fix some wording issues (rust-lang/book#4117) - Rephrase for clarity (rust-lang/book#3809) - Link to tests section of rustc book for `cargo test -- --help` docs (rust-lang/book#4116) - Drop a pedantry-triggering sentence about IEEE-754 (rust-lang/book#4114) - Very small clarification on if let (rust-lang/book#4113) - Ch17-05: Typos (rust-lang/book#4099) - Ch20-01: Fix typos (rust-lang/book#4105) - Add a short paragraph on editors and IDEs in installation (rust-lang/book#4112) - Rust 2024: update Ch. 20 for new `unsafe` rules (rust-lang/book#4111) ## rust-lang/reference 8 commits in 5c86c739ec71b8bc839310ff47fa94e94635bba9..ede56d1bbe132bac476b5029cd6d7508ca9572e9 2024-11-25 17:23:35 +0000 to 2024-12-03 22:26:55 +0000 - Claim to follow Unicode 16 for lexing identifiers. (rust-lang/reference#1688) - Clarify rules for on_unimplemented warnings (rust-lang/reference#1680) - Enable triagebot merge-conflict notifications (rust-lang/reference#1682) - Update default edition to 2024 for code examples (rust-lang/reference#1684) - Fix weak keywords (rust-lang/reference#1685) - `const` expression can borrow static items (rust-lang/reference#1610) - Update function-pointer.md for stabilization of `extended_varargs_abi_support` (rust-lang/reference#1687) - fix inconsistent spacing in example (rust-lang/reference#1686) ## edition-guide 1 commits in f48b0e842a3911c63240e955d042089e9e0894c7..128669297c8a7fdf771042eaec18b8adfaeaf0cd 2024-11-25 16:20:27 +0000 to 2024-12-03 22:02:43 +0000 - Fix `if_let_rescope` applicability (rust-lang/edition-guide#339) ## rust-lang/rustc-dev-guide 6 commits in 787b4166ccc67bd8f72a6e3ef6685ce9ce82909a..b21d99b770f9aceb0810c843847c52f86f45d2ed 2024-12-02 04:45:30 UTC to 2024-11-27 10:31:58 UTC - Spell out `git submodule deinit -f --all` (rust-lang/rustc-dev-guide#2153) - Explain how to deal with exploded git submodules (rust-lang/rustc-dev-guide#2152) - Update `//@ proc-macro` aux build directive docs (rust-lang/rustc-dev-guide#2149) - Remove `pretty-expanded` as it no longer exists (rust-lang/rustc-dev-guide#2147) - Fix trivial typo (rust-lang/rustc-dev-guide#2148) - Remove -Zfuel. (rust-lang/rustc-dev-guide#2032)
2024-12-05Rollup merge of #133233 - estebank:const-errors, r=NadrierilLeón Orell Valerian Liehr-511/+1117
Add context to "const in pattern" errors *Each commit addresses specific diagnostics.* - Add primary span labels - Point at `const` item, and `const` generic param definition - Reword messages and notes - Point at generic param through which an associated `const` is being referenced - Silence const in pattern with evaluation errors when they come from `const` items that already emit a diagnostic - On non-structural type in const used as pattern, point at the type that should derive `PartialEq`
2024-12-05Rollup merge of #122161 - compiler-errors:shorthand-self, r=fmeaseLeón Orell Valerian Liehr-1/+127
Fix suggestion when shorthand `self` has erroneous type Fixes #122086 r? estebank
2024-12-05Rollup merge of #118833 - Urgau:lint_function_pointer_comparisons, r=cjgillotLeón Orell Valerian Liehr-174/+624
Add lint against function pointer comparisons This is kind of a follow-up to https://github.com/rust-lang/rust/pull/117758 where we added a lint against wide pointer comparisons for being ambiguous and unreliable; well function pointer comparisons are also unreliable. We should IMO follow a similar logic and warn people about it. ----- ## `unpredictable_function_pointer_comparisons` *warn-by-default* The `unpredictable_function_pointer_comparisons` lint checks comparison of function pointer as the operands. ### Example ```rust fn foo() {} let a = foo as fn(); let _ = a == foo; ``` ### Explanation Function pointers comparisons do not produce meaningful result since they are never guaranteed to be unique and could vary between different code generation units. Furthermore different function could have the same address after being merged together. ---- This PR also uplift the very similar `clippy::fn_address_comparisons` lint, which only linted on if one of the operand was an `ty::FnDef` while this PR lints proposes to lint on all `ty::FnPtr` and `ty::FnDef`. ```@rustbot``` labels +I-lang-nominated ~~Edit: Blocked on https://github.com/rust-lang/libs-team/issues/323 being accepted and it's follow-up pr~~