diff --git a/src/test/ui/const-generics/issue-103243.rs b/src/test/ui/const-generics/issue-103243.rs new file mode 100644 index 0000000000000..78c73522bb507 --- /dev/null +++ b/src/test/ui/const-generics/issue-103243.rs @@ -0,0 +1,37 @@ +// build-pass + +pub trait CSpace: Sized { + type Traj; +} + +pub trait FullTrajectory {} + +pub struct Const; + +pub trait Obstacle +where + CS: CSpace, +{ + fn trajectory_free(&self, t: &FT) + where + FT: FullTrajectory; +} + +// ----- + +const N: usize = 4; + +struct ObstacleSpace2df32; + +impl Obstacle for ObstacleSpace2df32 +where + CS: CSpace, +{ + fn trajectory_free(&self, t: &TF) + where + TF: FullTrajectory, + { + } +} + +fn main() {}