Skip to content

crash in lowering when ref return initialized by value expression #6891

@zygoloid

Description

@zygoloid

This code is accepted by check and causes a crash in lower:

fn F() -> ref i32 {
    return 0;
}

Presumably check should reject instead.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions