about summary refs log tree commit diff
path: root/tests/ui/generic-const-items/def-site-mono.rs
blob: f10d450f6bdb73a170be7e7ba9e82f65f09f235e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Ensure that we don't try to collect monomorphizeable items inside free const
//! items (their def site to be clear) whose generics require monomorphization.
//!
//! Such items are to be collected at instantiation sites of free consts.

#![feature(generic_const_items)]
#![allow(incomplete_features)]

//@ build-pass (we require monomorphization)

const _IDENTITY<T>: fn(T) -> T = |x| x;

fn main() {}