Skip to content

#[inline] attributes should be validated before translation. #45738

Closed
@michaelwoerister

Description

@michaelwoerister

At the moment #[inline] attributes are validated by the compiler during translation because that's the first time they are actually used. However, as the compiler gets more lazy, an inline function might be exported without the #[inline] attribute ever being validate. This can lead to the case of getting an error message only when the function is used in a downstream crate.

To solve this issue, modify the compiler so that compile-fail/E0534.rs passes if the inline function is not called from anywhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions