mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 12:07:40 +00:00
14 lines
405 B
Rust
14 lines
405 B
Rust
![]() |
//! 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() {}
|