Skip to content

#[inline] is no longer accepted on closures #49632

Description

@Amanieu

Since #49291 #[inline] is no longer accepted on closures, despite the fact that this attribute does have an effect on code generation.

The generated LLVM IR (in debug builds) for this example is different if you remove #[inline(always)]:

#![feature(stmt_expr_attributes)] 
#![crate_type="rlib"]

pub fn main() {
    let x = #[inline(always)] || {};
    x();
}

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

    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