Skip to content

include!() in statement position expects an expression #41497

Open
@SimonSapin

Description

@SimonSapin

a.rs

fn main() {
    include!("b.rs")
}

b.rs

fn b() {}

rustc 1.18.0-nightly (2bd4b5c 2017-04-23)

error: expected expression, found keyword `fn`
 --> b.rs:1:1
  |
1 | fn b(){}
  | ^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.I-needs-decisionIssue: In need of a decision.T-langRelevant to the language team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions