Skip to content

Validate usage of inline attributes #2809

Closed

Description

@catamorphism

syntax::attr::find_inline_attr has a FIXME saying "validate the usage of #[inline] and #[inline(always)]".

Activity

  1. pcwalton commented on May 16, 2013

    @pcwalton
    Contributor

    I don't believe this is backwards incompatible, renominating.

  2. pcwalton commented on May 16, 2013

    @pcwalton
    Contributor

    Also I don't know what this means.

  3. catamorphism commented on May 16, 2013

    @catamorphism
    ContributorAuthor

    I can't tell where the comment originally came from, but I'm assuming it means checking that #[inline] doesn't get used to annotate something that can't be inlined (because it's not a function).

  4. graydon commented on Jun 6, 2013

    @graydon
    Contributor

    just a bug, removing milestone/nomination.

  5. nikomatsakis commented on Jun 6, 2013

    @nikomatsakis
    Contributor

    Consensus is that this means a lint pass detecting #[inline] being applied
    to bad code.

  6. graydon commented on Aug 15, 2013

    @graydon
    Contributor

    Visiting for triage, nontrivial amount of work so leaving as properly classified for now.

  7. steveklabnik commented on Aug 12, 2014

    @steveklabnik
    Contributor

    Amusingly, today this says

        // FIXME (#2809)---validate the usage of #[inline] and #[inline]
    

    No more always, but it's still there.

  8. nagisa commented on Feb 19, 2015

    @nagisa
    Member

    #22490 validates well-formedness of the inline attribute, but it is still unknown whether there’s any ways to misuse #[inline] attribute in a way which would be invalid (e.g. not on a function).

    If the comment in original report happens to have referred to validation of attribute well-formedness, this issue can then be closed. Do not forget to remove the FIXME comment too.

  9. added a commit that references this issue on Mar 16, 2023
  10. added a commit that references this issue on Apr 8, 2026
  11. added a commit that references this issue on Aug 21, 2026
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 (`#[…]`, `#![…]`)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions