Skip to content

#[inline] is allowed on structs inside fns #31769

Description

@solson

http://is.gd/mRtTeS causes an error, as expected:

#[inline] // error: attribute should be applied to function
struct Foo(usize);

fn main() {
}

http://is.gd/POCLQo should cause the same error, but is allowed:

fn main() {
    #[inline]
    struct Foo(usize);
}

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-attributesArea: Attributes (`#[…]`, `#![…]`)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions