blob: 8262a2a211b7ede1d8cd6f00bbfb9c865564a92f (
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)]
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() {}
|