Skip to content

Commit

Permalink
re-add test and bless
Browse files Browse the repository at this point in the history
  • Loading branch information
ouz-a committed Nov 19, 2022
1 parent 90128c3 commit 07158ef
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-23122-2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
30 changes: 30 additions & 0 deletions src/test/ui/recursion/issue-95134.rs
Original file line number Diff line number Diff line change
@@ -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();
}

0 comments on commit 07158ef

Please sign in to comment.