We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33b530e commit 38968daCopy full SHA for 38968da
src/test/ui/const-generics/issue-103243.rs
@@ -0,0 +1,37 @@
1
+// build-pass
2
+
3
+pub trait CSpace<const N: usize>: Sized {
4
+ type Traj;
5
+}
6
7
+pub trait FullTrajectory<T, S1, const N: usize> {}
8
9
+pub struct Const<const R: usize>;
10
11
+pub trait Obstacle<CS, const N: usize>
12
+where
13
+ CS: CSpace<N>,
14
+{
15
+ fn trajectory_free<FT, S1>(&self, t: &FT)
16
+ where
17
+ FT: FullTrajectory<CS::Traj, S1, N>;
18
19
20
+// -----
21
22
+const N: usize = 4;
23
24
+struct ObstacleSpace2df32;
25
26
+impl<CS> Obstacle<CS, N> for ObstacleSpace2df32
27
28
29
30
+ fn trajectory_free<TF, S1>(&self, t: &TF)
31
32
+ TF: FullTrajectory<CS::Traj, S1, N>,
33
+ {
34
+ }
35
36
37
+fn main() {}
0 commit comments