File tree 2 files changed +31
-1
lines changed
2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ note: required for `GetNext<<<<<<... as Next>::Next as Next>::Next as Next>::Nex
10
10
|
11
11
LL | impl<T: Next> Next for GetNext<T> {
12
12
| ^^^^ ^^^^^^^^^^
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'
14
14
15
15
error: aborting due to previous error
16
16
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments