From ed67768b62928f2a15c408e1899a9b2ea10d4dbe Mon Sep 17 00:00:00 2001 From: Marien Zwart Date: Tue, 17 Dec 2024 19:40:57 +1100 Subject: [PATCH] test: demonstrate PredicateBoxExt requires Sized This test should fail, and the next commit should make it pass. --- src/boxed.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/boxed.rs b/src/boxed.rs index 55caac3..fbcd9bf 100644 --- a/src/boxed.rs +++ b/src/boxed.rs @@ -115,3 +115,14 @@ where } impl PredicateBoxExt for P where P: Predicate {} + +#[cfg(test)] +mod test { + use crate::prelude::*; + + #[test] + fn unsized_boxed() { + let p = predicate::always().boxed(); + p.eval("4"); + } +}