Skip to content

Nightly regression: Unable to create array temporary in static #44373

Closed
@Aaron1011

Description

@Aaron1011

This code snippet:

struct Foo<'a>(&'a [&'a bool]);

static TEST: bool = true;
static FOO: Foo = Foo(&[&TEST]);

fn main() {}

compiles on stable rust rustc 1.20.0 (f3d6973f4 2017-08-27), but not on rustc 1.22.0-nightly (2f1ef9ef1 2017-09-05).

Playground link

Metadata

Metadata

Assignees

Labels

P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions