about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-03-02Rollup merge of #137375 - steffahn:clarify-read_line-comment, r=Mark-SimulacrumMatthias Krüger-1/+1
Minor internal comments fix for `BufRead::read_line` Just a little fix that came up while I was reading through this source code, and had to search for a few minutes to find out what was actually *meant* here.
2025-03-02Auto merge of #137661 - nikic:llvm20-rc3, r=cuviperbors-0/+0
Update to LLVM 20 rc 3 Fixes a compiler-builtins miscompile (see https://github.com/rust-lang/compiler-builtins/pull/760).
2025-03-02Auto merge of #137425 - yotamofek:pr/rustdoc/return-impl-display-redux, ↵bors-2274/+2476
r=GuillaumeGomez `librustdoc`: return `impl fmt::Display` in more places instead of writing to strings Continuation of #136784 , another attempt at landing the larger parts of #136748 . I'd like to, gradually, make all of the building blocks for rendering docs in `librustdoc` return `impl fmt::Display` instead of returning `Strings`, or receiving a `&mut String` (or `&mut impl fmt::Write`). Another smaller end goal is to be able to get rid of [`write_str`](https://github.com/rust-lang/rust/blob/8dac72bb1d12b2649acd0c190e41524f83da5683/src/librustdoc/html/format.rs#L40-L42). This PR is a large step in that direction. Most of the changes are quite mechanical, and split up into separate commits for easier reviewing (hopefully). I took `print_item` and then started by converting all the functions it called (and their dependencies), and the last commit does the conversion for `print_item` itself. Ignoring whitespace should make reviewing a bit easier. And most importantly, perf run shows pretty good results locally, hopefully CI will also show green 😁 r? `@GuillaumeGomez` , if you feel like it.
2025-03-02Auto merge of #136864 - Kobzol:citool, r=marcoienibors-328/+1049
Rewrite the `ci.py` script in Rust It would seem that I would learn by now that any script written in Python will become unmaintainable sooner or later, but alas.. r? `@marcoieni` try-job: aarch64-gnu try-job: dist-x86_64-linux-alt try-job: x86_64-msvc-ext2 Fixes: https://github.com/rust-lang/rust/issues/137013
2025-03-02Auto merge of #137855 - matthiaskrgr:rollup-uh7f3fi, r=matthiaskrgrbors-264/+374
Rollup of 10 pull requests Successful merges: - #137804 (rename BackendRepr::Vector → SimdVector) - #137807 (Fully qualify `Result` in generated doctest code) - #137809 (Use correct error message casing for `io::const_error`s) - #137818 (tests: adapt for LLVM 21 changes) - #137822 (Update query normalizer docs to not position it as the greatest pioneer in the space of normalization) - #137824 (Tweak invalid RTN errors) - #137828 (Fix inaccurate `std::intrinsics::simd` documentation) - #137830 (Fix link failure on AVR (incompatible ISA error)) - #137837 (Update `const_conditions` and `explicit_implied_const_bounds` docs) - #137840 (triagebot: only ping me for constck) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-01Auto merge of #137752 - flip1995:clippy-subtree-update, r=Manishearthbors-15397/+34676
Clippy subtree update ? `@Manishearth` Cargo.lock change because of Clippy version bump and rustc_tool_utils new release. Fixes #137640 Would be nice, if we could this merged before nightly is being build, so that this ICE is fixed tomorrow.
2025-03-01Rollup merge of #137840 - fee1-dead-contrib:push-uwkzouvnrnvs, r=oli-obkMatthias Krüger-3/+7
triagebot: only ping me for constck Per the [Zulip thread](https://rust-lang.zulipchat.com/#narrow/channel/146212-t-compiler.2Fconst-eval/topic/rustbot.20pings). cc `@rust-lang/wg-const-eval.`
2025-03-01Rollup merge of #137837 - fee1-dead-contrib:push-pvqvwuvrnwsy, r=compiler-errorsMatthias Krüger-7/+17
Update `const_conditions` and `explicit_implied_const_bounds` docs Move documentation to query definitions, and add docs to `explicit_implied_const_bounds`. r? project-const-traits
2025-03-01Rollup merge of #137830 - LuigiPiucco:incompatible-isa-fix, r=workingjubileeMatthias Krüger-1/+5
Fix link failure on AVR (incompatible ISA error) Fixes #137739. A reproducer of the issue is present there. I believe the root cause was introducing the avr-none target (which has no CPU by default) while also trying to get the ISA revision from the target spec. This commit uses the `target-cpu` option instead, which is already required to be present for the target. r? compiler cc ``@Patryk27``
2025-03-01Rollup merge of #137828 - folkertdev:simd-intrinsic-doc-fixes, r=workingjubileeMatthias Krüger-36/+34
Fix inaccurate `std::intrinsics::simd` documentation This addresses two issues: - the docs on comparison operators (`simd_gt` etc.) said they only work for floating-point vectors, but they work for integer vectors too. - the docs on various functions that use a mask did not document that the mask must be a signed integer vector. Unsigned integer vectors would cause invalid behavior when the mask vector is widened (unsigned integers would use zero extension, producing incorrect results). r? ``@workingjubilee``
2025-03-01Rollup merge of #137824 - estebank:rtn-sugg, r=compiler-errorsMatthias Krüger-44/+133
Tweak invalid RTN errors Make suggestions verbose. When encountering `method(type)` bound, suggest `method(..)` instead of `method()`. ``` error: argument types not allowed with return type notation --> $DIR/bad-inputs-and-output.rs:9:23 | LL | fn foo<T: Trait<method(i32): Send>>() {} | ^^^^^ | help: remove the input types | LL - fn foo<T: Trait<method(i32): Send>>() {} LL + fn foo<T: Trait<method(..): Send>>() {} | ``` When encountering both return type and arg list that isn't `..`, suggest replacing both. ``` error: return type not allowed with return type notation --> $DIR/bad-inputs-and-output.rs:12:25 | LL | fn bar<T: Trait<method() -> (): Send>>() {} | ^^^^^^ | help: use the right argument notation and remove the return type | LL - fn bar<T: Trait<method() -> (): Send>>() {} LL + fn bar<T: Trait<method(..): Send>>() {} | ``` When encountering a return type, suggest removing it including the leading whitespace. ``` error: return type not allowed with return type notation --> $DIR/bad-inputs-and-output.rs:24:45 | LL | fn bay_path<T: Trait>() where T::method(..) -> (): Send {} | ^^^^^ | help: remove the return type | LL - fn bay_path<T: Trait>() where T::method(..) -> (): Send {} LL + fn bay_path<T: Trait>() where T::method(..): Send {} | ``` r? ``@compiler-errors``
2025-03-01Rollup merge of #137822 - BoxyUwU:query_normalizer_docs, r=compiler-errorsMatthias Krüger-12/+9
Update query normalizer docs to not position it as the greatest pioneer in the space of normalization I don't think its true that we intend to replace all normalization with the query normalizer- its more likely that once the new solver is stable we can replace the query normalizer with normal normalization calls as the new solver caches much more than the old solver r? ``@compiler-errors``
2025-03-01Rollup merge of #137818 - durin42:llvm-21-remove-readonly, r=jieyouxuMatthias Krüger-1/+0
tests: adapt for LLVM 21 changes Per discussion in #137799 we don't really need this readonly attribute, so let's just drop it so the test passes on LLVM 21. Fixes #137799.
2025-03-01Rollup merge of #137809 - Noratrieb:io-error-casing, r=thomccMatthias Krüger-75/+75
Use correct error message casing for `io::const_error`s Error messages are supposed to start with lowercase letters, but a lot of `io::const_error` messages did not. This fixes them to start with a lowercase letter. I did consider adding a const check for this to the macro, but some of them start with proper nouns that make sense to uppercase them. See https://doc.rust-lang.org/1.85.0/std/error/trait.Error.html
2025-03-01Rollup merge of #137807 - GuillaumeGomez:doctest-qualify-result, r=notriddleMatthias Krüger-2/+2
Fully qualify `Result` in generated doctest code As discussed in https://lore.kernel.org/rust-for-linux/20250228132553.880126-1-guillaume1.gomez@gmail.com/T/#u, it would require less code for RfL to be able to reach the same result (pun unintended). cc ``@ojeda`` r? ``@notriddle``
2025-03-01Rollup merge of #137804 - RalfJung:backend-repr-simd-vector, r=workingjubileeMatthias Krüger-83/+92
rename BackendRepr::Vector → SimdVector For many Rustaceans, "vector" does not imply "SIMD", so let's be more clear in this type that is used pervasively in the compiler. r? `@workingjubilee`
2025-03-01Auto merge of #137848 - matthiaskrgr:rollup-vxtrkis, r=matthiaskrgrbors-1002/+996
Rollup of 8 pull requests Successful merges: - #136503 (Tweak output of const panic diagnostic) - #137390 (tests: fix up new test for nocapture -> capture(none) change) - #137617 (Introduce `feature(generic_const_parameter_types)`) - #137719 (Add missing case explanation for doc inlined re-export of doc hidden item) - #137763 (Use `mk_ty_from_kind` a bit less, clean up lifetime handling in borrowck) - #137769 (Do not yeet `unsafe<>` from type when formatting unsafe binder) - #137776 (Some `rustc_transmute` cleanups) - #137800 (Remove `ParamEnv::without_caller_bounds`) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-01Rollup merge of #137800 - BoxyUwU:param_env_docs, r=compiler-errorsMatthias Krüger-7/+1
Remove `ParamEnv::without_caller_bounds` This doesn't really do anything that `ParamEnv::empty` doesn't do nowadays as `ParamEnv` *only* stores caller bounds since other information has been moved out into `TypingMode` r? ```@compiler-errors``` ```@lcnr```
2025-03-01Rollup merge of #137776 - nnethercote:rustc_transmute-cleanups, r=jswrennMatthias Krüger-85/+32
Some `rustc_transmute` cleanups A number of small things that can be removed. r? ``@jswrenn``
2025-03-01Rollup merge of #137769 - compiler-errors:empty-unsafe-fmt, r=ytmimiMatthias Krüger-1/+10
Do not yeet `unsafe<>` from type when formatting unsafe binder Unsafe binders are types like `unsafe<'a, 'b> Ty<'a, 'b>`. However, users can also specify unsafe binder types with no bound vars, like `unsafe<> Ty`. When I added nightly formatting for unsafe binders, I didn't consider this, so on nightly we are stripping the `unsafe<>` part, which gives us back `Ty` which is a different type! This PR fixes that. r? ``@ytmimi``
2025-03-01Rollup merge of #137763 - compiler-errors:ty-nits, r=BoxyUwUMatthias Krüger-37/+21
Use `mk_ty_from_kind` a bit less, clean up lifetime handling in borrowck r? ``@BoxyUwU`` Pulled out of my attempt to turn that `*const dyn Tr + '_` casting into a lint (which failed lmao)
2025-03-01Rollup merge of #137719 - GuillaumeGomez:missing-doc, r=notriddleMatthias Krüger-1/+16
Add missing case explanation for doc inlined re-export of doc hidden item This case was not covered in the rustdoc book as uncovered in #137342. r? ``@notriddle``
2025-03-01Rollup merge of #137617 - BoxyUwU:generic_const_parameter_types, r=lcnrMatthias Krüger-154/+419
Introduce `feature(generic_const_parameter_types)` Allows to define const generic parameters whose type depends on other generic parameters, e.g. `Foo<const N: usize, const ARR: [u8; N]>;` Wasn't going to implement for this for a while until we could implement it with `bad_inference.rs` resolved but apparently the project simd folks would like to be able to use this for some intrinsics and the inference issue isn't really a huge problem there aiui. (cc ``@workingjubilee`` )
2025-03-01Rollup merge of #137390 - durin42:llvm-21-nocapture-rename, r=nikicMatthias Krüger-2/+2
tests: fix up new test for nocapture -> capture(none) change Same change as #136287, but for a newly introduced test. ``@rustbot`` label llvm-main r? ``@nikic``
2025-03-01Rollup merge of #136503 - estebank:const-panic, r=RalfJungMatthias Krüger-715/+495
Tweak output of const panic diagnostic ### Shorten span of panic failures in const context Previously, we included a redundant prefix on the panic message and a postfix of the location of the panic. The prefix didn't carry any additional information beyond "something failed", and the location of the panic is redundant with the diagnostic's span, which gets printed out even if its code is not shown. ``` error[E0080]: evaluation of constant value failed --> $DIR/assert-type-intrinsics.rs:11:9 | LL | MaybeUninit::<!>::uninit().assume_init(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ panic: aborted execution: attempted to instantiate uninhabited type `!` ``` ``` error[E0080]: evaluation of `Fail::<i32>::C` failed --> $DIR/collect-in-dead-closure.rs:9:19 | LL | const C: () = panic!(); | ^^^^^^^^ explicit panic | = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) ``` ``` error[E0080]: evaluation of constant value failed --> $DIR/uninhabited.rs:87:9 | LL | assert!(false); | ^^^^^^^^^^^^^^ assertion failed: false | = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info) ``` ### Remove duplicated span from const eval frame list When the primary span for a const error is the same as the first frame in the const error report, skip it. ``` error[E0080]: evaluation of constant value failed --> $DIR/issue-88434-removal-index-should-be-less.rs:3:24 | LL | const _CONST: &[u8] = &f(&[], |_| {}); | ^^^^^^^^^^^^^^ explicit panic | note: inside `f::<{closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34}>` --> $DIR/issue-88434-removal-index-should-be-less.rs:10:5 | LL | panic!() | ^^^^^^^^ the failure occurred here = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) ``` instead of ``` error[E0080]: evaluation of constant value failed --> $DIR/issue-88434-removal-index-should-be-less.rs:10:5 | LL | panic!() | ^^^^^^^^ explicit panic | note: inside `f::<{closure@$DIR/issue-88434-removal-index-should-be-less.rs:3:31: 3:34}>` --> $DIR/issue-88434-removal-index-should-be-less.rs:10:5 | LL | panic!() | ^^^^^^^^ note: inside `_CONST` --> $DIR/issue-88434-removal-index-should-be-less.rs:3:24 | LL | const _CONST: &[u8] = &f(&[], |_| {}); | ^^^^^^^^^^^^^^ = note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info) note: erroneous constant encountered --> $DIR/issue-88434-removal-index-should-be-less.rs:3:23 | LL | const _CONST: &[u8] = &f(&[], |_| {}); | ^^^^^^^^^^^^^^^ ``` r? ``@oli-obk``
2025-03-01Auto merge of #133250 - DianQK:embed-bitcode-pgo, r=nikicbors-101/+294
The embedded bitcode should always be prepared for LTO/ThinLTO Fixes #115344. Fixes #117220. There are currently two methods for generating bitcode that used for LTO. One method involves using `-C linker-plugin-lto` to emit object files as bitcode, which is the typical setting used by cargo. The other method is through `-C embed-bitcode=yes`. When using with `-C embed-bitcode=yes -C lto=no`, we run a complete non-LTO LLVM pipeline to obtain bitcode, then the bitcode is used for LTO. We run the Call Graph Profile Pass twice on the same module. This PR is doing something similar to LLVM's `buildFatLTODefaultPipeline`, obtaining the bitcode for embedding after running `buildThinLTOPreLinkDefaultPipeline`. r? nikic
2025-03-01Auto merge of #137838 - matthiaskrgr:rollup-5brlcyr, r=matthiaskrgrbors-321/+749
Rollup of 9 pull requests Successful merges: - #137045 (Defer repeat expr `Copy` checks to end of type checking) - #137171 (Suggest swapping equality on E0277) - #137686 (Handle asm const similar to inline const) - #137689 (Use `Binder<Vec<Ty>>` instead of `Vec<Binder<Ty>>` in both solvers for sized/auto traits/etc.) - #137718 (Use original command for showing sccache stats) - #137730 (checked_ilog tests: deal with a bit of float imprecision) - #137735 (Update E0133 docs for 2024 edition) - #137742 (unconditionally lower match arm even if it's unneeded for never pattern in match) - #137771 (Tweak incorrect ABI suggestion and make suggestion verbose) Failed merges: - #137723 (Make `rust.description` more general-purpose and pass `CFG_VER_DESCRIPTION`) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-01Update `const_conditions` and `explicit_implied_const_bounds` docsDeadbeef-7/+17
Move documentation to query definitions, and add docs to `explicit_implied_const_bounds`.
2025-03-01triagebot: only ping me for constckDeadbeef-3/+7
Per the [Zulip thread](https://rust-lang.zulipchat.com/#narrow/channel/146212-t-compiler.2Fconst-eval/topic/rustbot.20pings).
2025-03-01Rollup merge of #137771 - estebank:abi-sugg, r=compiler-errorsMatthias Krüger-24/+33
Tweak incorrect ABI suggestion and make suggestion verbose Provide a better suggestion message, and make the suggestion verbose. ``` error[E0703]: invalid ABI: found `riscv-interrupt` --> $DIR/riscv-discoverability-guidance.rs:17:8 | LL | extern "riscv-interrupt" fn isr() {} | ^^^^^^^^^^^^^^^^^ invalid ABI | = note: invoke `rustc --print=calling-conventions` for a full list of supported calling conventions help: there's a similarly named valid ABI `riscv-interrupt-m` | LL | extern "riscv-interrupt-m" fn isr() {} | ++ ```
2025-03-01Rollup merge of #137742 - mu001999-contrib:fix-137708, r=compiler-errorsMatthias Krüger-2/+53
unconditionally lower match arm even if it's unneeded for never pattern in match fixes #137708 Lowering arm body is skipped when lowering match arm with never pattern, but we may need the HirId for DefId in the body in later passes. And then we got the ICE `No HirId for DefId`. Fixes this by lowering the arm body even if it's unneeded for never pattern in match, so that we can generate HirId and use it then. r? `@compiler-errors`
2025-03-01Rollup merge of #137735 - ehuss:e0133-edition-docs, r=compiler-errorsMatthias Krüger-1/+2
Update E0133 docs for 2024 edition The behavior of unsafe_op_in_unsafe_fn was changed in the 2024 edition. This updates this note in the E0133 docs to reflect that change.
2025-03-01Rollup merge of #137730 - RalfJung:checked_ilog_tests, r=tgross35Matthias Krüger-18/+56
checked_ilog tests: deal with a bit of float imprecision Fixes https://github.com/rust-lang/rust/issues/137591 r? `@tgross35`
2025-03-01Rollup merge of #137718 - Kobzol:sccache-stats, r=marcoieniMatthias Krüger-1/+1
Use original command for showing sccache stats I used the newer advanced command after bumping Linux sccache to 0.9. However, Windows and macOS still use older sccache, so the command didn't work for them (the error was masked on CI though). It sucks that we don't see the Windows/macOS sccache stats, so until we update both of them, just use the older flag with slightly less information.
2025-03-01Rollup merge of #137689 - compiler-errors:coroutine, r=lcnrMatthias Krüger-156/+97
Use `Binder<Vec<Ty>>` instead of `Vec<Binder<Ty>>` in both solvers for sized/auto traits/etc. It's more conceptually justified IMO, especially when binders get implications. r? lcnr
2025-03-01Rollup merge of #137686 - nbdd0121:asm_const, r=compiler-errorsMatthias Krüger-100/+133
Handle asm const similar to inline const Previously, asm consts are handled similar to anon consts rather than inline consts. Anon consts are not good at dealing with lifetimes, because `type_of` has lifetimes erased already. Inline consts can deal with lifetimes because they live in an outer typeck context. And since `global_asm!` lacks an outer typeck context, we have implemented asm consts with anon consts while they're in fact more similar to inline consts. This was changed in #137180, and this means that handling asm consts as inline consts are possible. While as `@compiler-errors` pointed out, `const` currently can't be used with any types with lifetime, this is about to change if #128464 is implemented. This PR is a preparatory PR for that feature. As an unintentional side effect, fix #117877. cc `@Amanieu` r? `@compiler-errors`
2025-03-01Rollup merge of #137171 - makai410:swapping-e0277, r=compiler-errorsMatthias Krüger-0/+88
Suggest swapping equality on E0277 Closes: #132695 .
2025-03-01Rollup merge of #137045 - BoxyUwU:defer_repeat_expr_checks, r=compiler-errorsMatthias Krüger-19/+286
Defer repeat expr `Copy` checks to end of type checking Fixes #110443 Defers repeat expr checks that the element type is `Copy` when the length is > 1 (or generic) to end of typeck so that under `generic_arg_infer` repeat exprs are able to have an inferred count, e.g. `let a: [_; 1] = [String::new(); _];`. Currently the deferring is gated under `generic_arg_infer` though I intend to separately types FCP deferring the checks even outside of `generic_arg_infer` if we wind up not going with an alternative.
2025-03-01Auto merge of #137796 - jieyouxu:rollup-qt9yr1g, r=jieyouxubors-2162/+1614
Rollup of 10 pull requests Successful merges: - #134943 (Add FileCheck annotations to mir-opt/issues) - #137017 (Don't error when adding a staticlib with bitcode files compiled by newer LLVM) - #137197 (Update some comparison codegen tests now that they pass in LLVM20) - #137540 (Fix (more) test directives that were accidentally ignored) - #137551 (import `simd_` intrinsics) - #137599 (tests: use minicore more) - #137673 (Fix Windows `Command` search path bug) - #137676 (linker: Fix escaping style for response files on Windows) - #137693 (Re-enable `--generate-link-to-defintion` for tools internal rustdoc) - #137770 (Fix sized constraint for unsafe binder) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-01intrinsics::simd: document that masks must be signed integer vectorsFolkert de Vries-27/+27
this is because they may be widened, and that only works when sign extension is used: zero extension would produce invalid results
2025-03-01correct the docs on `simd_` comparison operatorsFolkert de Vries-15/+13
these all also accept integer vectors as arguments
2025-02-28Update Cargo.lockPhilipp Krones-6/+10
2025-02-28Fix link to ty::Ty in clippy_utilsPhilipp Krones-1/+1
2025-02-28Clippy: skip check_host_compiler check in rustc testsuitePhilipp Krones-0/+5
This test only makes sense to run in the Clippy repo In the Rust repo the name of the host_compiler is dev, not nightly
2025-02-28Merge commit '9f9a822509e5ad3e560cbbe830d1013f936fca28' into ↵Philipp Krones-15391/+34661
clippy-subtree-update
2025-02-28Auto merge of #137517 - nnethercote:rm-NtPat-NtItem-NtStmt, r=petrochenkovbors-237/+190
Remove `NtPat`, `NtMeta`, and `NtPath` Another part of #124141. r? `@petrochenkov`
2025-02-28Fix link failure on AVR (incompatible ISA error)Luigi Sartor Piucco-1/+5
Fixes #137739. A reproducer of the issue is present there. I believe the root cause was introducing the avr-none target (which has no CPU by default) and trying to get the ISA revision from there. This commit uses the `target-cpu` option instead, which is already required to be present for the target. Co-authored-by: tones111 <tones111@users.noreply.github.com>
2025-02-28Tweak invalid RTN errorsEsteban Küber-44/+133
Make suggestions verbose. When encountering `method(type)` bound, suggest `method(..)` instead of `method()`. ``` error: argument types not allowed with return type notation --> $DIR/bad-inputs-and-output.rs:9:23 | LL | fn foo<T: Trait<method(i32): Send>>() {} | ^^^^^ | help: remove the input types | LL - fn foo<T: Trait<method(i32): Send>>() {} LL + fn foo<T: Trait<method(..): Send>>() {} | ``` When encountering both return type and arg list that isn't `..`, suggest replacing both. ``` error: return type not allowed with return type notation --> $DIR/bad-inputs-and-output.rs:12:25 | LL | fn bar<T: Trait<method() -> (): Send>>() {} | ^^^^^^ | help: use the right argument notation and remove the return type | LL - fn bar<T: Trait<method() -> (): Send>>() {} LL + fn bar<T: Trait<method(..): Send>>() {} | ``` When encountering a return type, suggest removing it including the leading whitespace. ``` error: return type not allowed with return type notation --> $DIR/bad-inputs-and-output.rs:24:45 | LL | fn bay_path<T: Trait>() where T::method(..) -> (): Send {} | ^^^^^ | help: remove the return type | LL - fn bay_path<T: Trait>() where T::method(..) -> (): Send {} LL + fn bay_path<T: Trait>() where T::method(..): Send {} | ```
2025-02-28Check for MSRV attributes in late passes using the HIR (#13821)Timo-850/+672
Closes https://github.com/rust-lang/rust-clippy/issues/13169 Late lints now use a parent iter to check for `#[clippy::msrv]` attributes instead of keeping track with `extract_msrv_attr`. This is required for incremental lints since they run per module instead of per crate so don't visit all the necessary attributes As a basic optimisation if no `#[clippy::msrv]` attributes are discovered in early passes the HIR access is skipped completely and just the configured MSRV is used, for most code bases this will be the case changelog: none
2025-02-28Introduce `feature(generic_const_parameter_types)`Boxy-154/+419