2 // compile-flags: -Copt-level=0
3 //~^^ ERROR overflow evaluating the requirement
5 pub fn encode_num<Writer: ExampleWriter>(n: u32, mut writer: Writer) -> Result<(), Writer::Error> {
7 encode_num(n / 16, &mut writer)?;
12 pub trait ExampleWriter {
16 impl<'a, T: ExampleWriter> ExampleWriter for &'a mut T {
17 type Error = T::Error;
22 impl ExampleWriter for EmptyWriter {
27 encode_num(69, &mut EmptyWriter).unwrap();