rust/tests/rustdoc/inline_cross/auxiliary/const-effect-param.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
357 B
Rust
Raw Normal View History

2024-06-30 17:08:45 +00:00
//@ compile-flags: -Znext-solver
2024-10-30 18:03:44 +00:00
#![feature(const_trait_impl)]
#[const_trait]
pub trait Resource {}
pub const fn load<R: ~const Resource>() -> i32 {
0
}
pub const fn lock<R: Resource>() {}
#[allow(non_upper_case_globals)]
pub trait Clash<const host: u64> {}
#[allow(non_upper_case_globals)]
pub const fn clash<T: Clash<host>, const host: u64>() {}