Skip to content

Commit 07158ef

Browse files
committed
re-add test and bless
1 parent 90128c3 commit 07158ef

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

src/test/ui/issues/issue-23122-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ note: required for `GetNext<<<<<<... as Next>::Next as Next>::Next as Next>::Nex
1010
|
1111
LL | impl<T: Next> Next for GetNext<T> {
1212
| ^^^^ ^^^^^^^^^^
13-
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-23122-2/issue-23122-2.long-type-2230235837754269907.txt'
13+
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-23122-2/issue-23122-2.long-type-3976323088118947840.txt'
1414

1515
error: aborting due to previous error
1616

src/test/ui/recursion/issue-95134.rs

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// build-fail
2+
// known-bug: #95134
3+
// compile-flags: -Copt-level=0
4+
// failure-status: 101
5+
// dont-check-compiler-stderr
6+
7+
pub fn encode_num<Writer: ExampleWriter>(n: u32, mut writer: Writer) -> Result<(), Writer::Error> {
8+
if n > 15 {
9+
encode_num(n / 16, &mut writer)?;
10+
}
11+
Ok(())
12+
}
13+
14+
pub trait ExampleWriter {
15+
type Error;
16+
}
17+
18+
impl<'a, T: ExampleWriter> ExampleWriter for &'a mut T {
19+
type Error = T::Error;
20+
}
21+
22+
struct EmptyWriter;
23+
24+
impl ExampleWriter for EmptyWriter {
25+
type Error = ();
26+
}
27+
28+
fn main() {
29+
encode_num(69, &mut EmptyWriter).unwrap();
30+
}

0 commit comments

Comments
 (0)