re-add test and bless

This commit is contained in:
ouz-a 2022-11-19 23:03:14 +03:00
parent 90128c30a0
commit 07158effd3
2 changed files with 31 additions and 1 deletions

View File

@ -10,7 +10,7 @@ note: required for `GetNext<<<<<<... as Next>::Next as Next>::Next as Next>::Nex
|
LL | impl<T: Next> Next for GetNext<T> {
| ^^^^ ^^^^^^^^^^
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-23122-2/issue-23122-2.long-type-2230235837754269907.txt'
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-23122-2/issue-23122-2.long-type-3976323088118947840.txt'
error: aborting due to previous error

View File

@ -0,0 +1,30 @@
// build-fail
// known-bug: #95134
// compile-flags: -Copt-level=0
// failure-status: 101
// dont-check-compiler-stderr
pub fn encode_num<Writer: ExampleWriter>(n: u32, mut writer: Writer) -> Result<(), Writer::Error> {
if n > 15 {
encode_num(n / 16, &mut writer)?;
}
Ok(())
}
pub trait ExampleWriter {
type Error;
}
impl<'a, T: ExampleWriter> ExampleWriter for &'a mut T {
type Error = T::Error;
}
struct EmptyWriter;
impl ExampleWriter for EmptyWriter {
type Error = ();
}
fn main() {
encode_num(69, &mut EmptyWriter).unwrap();
}