File tree 1 file changed +35
-0
lines changed
src/test/rustdoc/synthetic_auto
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Tests that we don't fail with an overflow error for certain
2
+ // strange types
3
+ // See https://github.com/rust-lang/rust/pull/72936#issuecomment-643676915
4
+
5
+ pub trait Interner {
6
+ type InternedType ;
7
+ }
8
+
9
+ struct RustInterner < ' tcx > {
10
+ foo : & ' tcx ( )
11
+ }
12
+
13
+ impl < ' tcx > Interner for RustInterner < ' tcx > {
14
+ type InternedType = Box < TyData < Self > > ;
15
+ }
16
+
17
+ enum TyData < I : Interner > {
18
+ FnDef ( I :: InternedType )
19
+ }
20
+
21
+ struct VariableKind < I : Interner > ( I :: InternedType ) ;
22
+
23
+ // @has overflow/struct.BoundVarsCollector.html
24
+ // @has - '//code' "impl<'tcx> Send for BoundVarsCollector<'tcx>"
25
+ pub struct BoundVarsCollector < ' tcx > {
26
+ val : VariableKind < RustInterner < ' tcx > >
27
+ }
28
+
29
+ fn is_send < T : Send > ( ) { }
30
+
31
+ struct MyInterner < ' tcx > {
32
+ val : & ' tcx ( )
33
+ }
34
+
35
+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments