Skip to content

#[expect(..)] not supported on function arguments #97650

Closed
Listed in
@Jarcho

Description

@Jarcho
Contributor

This isn't used by many lints, but clippy does have a few. This is the only location I've noticed, but I haven't checked everywhere.

fn f(
    #[expect(clippy::ptr_arg)] _x: &Vec<u32>,
) {}

I expected to see this happen: Nothing

Instead, this happened:

error: allow, cfg, cfg_attr, deny, forbid, and warn are the only allowed built-in attributes in function parameters

cc #54503

Activity

xFrednet

xFrednet commented on Jun 3, 2022

@xFrednet
Member

Thank you for the report

@rustbot claim

@rustbot label +F-lint-reasons

added 2 commits that reference this issue on Jun 4, 2022

Rollup merge of rust-lang#97715 - xFrednet:97650-expect-in-fuction-ar…

e3a40dd

Rollup merge of rust-lang#97715 - xFrednet:97650-expect-in-fuction-ar…

9c794b4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.F-lint_reasons`#![feature(lint_reasons)]`

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @Jarcho@xFrednet

    Issue actions

      `#[expect(..)]` not supported on function arguments · Issue #97650 · rust-lang/rust