Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Tracked by #85549
Jarcho opened this issue Jun 2, 2022 · 1 comment · Fixed by #97715
Closed
Tracked by #85549

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

Jarcho opened this issue Jun 2, 2022 · 1 comment · Fixed by #97715
Assignees
Labels
C-bug Category: This is a bug. F-lint_reasons `#![feature(lint_reasons)]`

Comments

@Jarcho
Copy link
Contributor

Jarcho commented Jun 2, 2022

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

@Jarcho Jarcho added the C-bug Category: This is a bug. label Jun 2, 2022
@xFrednet
Copy link
Member

xFrednet commented Jun 3, 2022

Thank you for the report

@rustbot claim

@rustbot label +F-lint-reasons

@xFrednet xFrednet added the F-lint_reasons `#![feature(lint_reasons)]` label Jun 3, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Jun 4, 2022
…g, r=wesleywiser

Support the `#[expect]` attribute on fn parameters (RFC-2383)

A small PR to allow the `#[expect]` attribute on function parameters.

Nothing more to say, I hope everyone reading this has a lovely day.

---

r? `@wesleywiser`

closes: rust-lang#97650

cc: rust-lang#85549
@bors bors closed this as completed in 9c794b4 Jun 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. F-lint_reasons `#![feature(lint_reasons)]`
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants