blob: 0233a0b197ab12e773fcc6f93dcedc4e3407598b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
//@ revisions: cfail
#![feature(generic_const_exprs)]
#![allow(incomplete_features, unused_braces, unused_variables)]
trait Delegates<T> {}
struct FileCap<const Op: bool> {}
fn writes_to_path<C>(cap: &C)
where
C: Delegates<FileCap<{ false }>>,
{
writes_to_specific_path(&cap);
//~^ error: the trait bound
}
fn writes_to_specific_path<C>(cap: &C)
where
C: Delegates<FileCap<{ false }>>,
{
}
fn main() {}
|