Closed
Description
There should be a test for feature(inline_const)
ensuring that it does not have the same bug as #110931 and #110933, that '_
inside of the const refers to 'static
instead of inferring a lifetime. The following code is what passes and should be added as a test:
#![feature(inline_const)]
fn main() {
let my_usize = const {
let a = 10_usize;
let b: &'_ usize = &a;
*b
};
}
Metadata
Metadata
Assignees
Labels
Area: Lifetimes / regionsArea: Name/path resolution done by `rustc_resolve` specificallyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.Inline constants (aka: const blocks, const expressions, anonymous constants)