1error[E0308]: mismatched types
2  --> $DIR/invalid-upcast.rs:54:35
3   |
4LL |     let _: &dyn std::fmt::Debug = baz;
5   |            --------------------   ^^^ expected trait `Debug`, found trait `Baz`
6   |            |
7   |            expected due to this
8   |
9   = note: expected reference `&dyn Debug`
10              found reference `&dyn Baz`
11
12error[E0308]: mismatched types
13  --> $DIR/invalid-upcast.rs:56:24
14   |
15LL |     let _: &dyn Send = baz;
16   |            ---------   ^^^ expected trait `Send`, found trait `Baz`
17   |            |
18   |            expected due to this
19   |
20   = note: expected reference `&dyn Send`
21              found reference `&dyn Baz`
22
23error[E0308]: mismatched types
24  --> $DIR/invalid-upcast.rs:58:24
25   |
26LL |     let _: &dyn Sync = baz;
27   |            ---------   ^^^ expected trait `Sync`, found trait `Baz`
28   |            |
29   |            expected due to this
30   |
31   = note: expected reference `&dyn Sync`
32              found reference `&dyn Baz`
33
34error[E0308]: mismatched types
35  --> $DIR/invalid-upcast.rs:61:25
36   |
37LL |     let bar: &dyn Bar = baz;
38   |              --------   ^^^ expected trait `Bar`, found trait `Baz`
39   |              |
40   |              expected due to this
41   |
42   = note: expected reference `&dyn Bar`
43              found reference `&dyn Baz`
44
45error[E0308]: mismatched types
46  --> $DIR/invalid-upcast.rs:63:35
47   |
48LL |     let _: &dyn std::fmt::Debug = bar;
49   |            --------------------   ^^^ expected trait `Debug`, found trait `Bar`
50   |            |
51   |            expected due to this
52   |
53   = note: expected reference `&dyn Debug`
54              found reference `&dyn Bar`
55
56error[E0308]: mismatched types
57  --> $DIR/invalid-upcast.rs:65:24
58   |
59LL |     let _: &dyn Send = bar;
60   |            ---------   ^^^ expected trait `Send`, found trait `Bar`
61   |            |
62   |            expected due to this
63   |
64   = note: expected reference `&dyn Send`
65              found reference `&dyn Bar`
66
67error[E0308]: mismatched types
68  --> $DIR/invalid-upcast.rs:67:24
69   |
70LL |     let _: &dyn Sync = bar;
71   |            ---------   ^^^ expected trait `Sync`, found trait `Bar`
72   |            |
73   |            expected due to this
74   |
75   = note: expected reference `&dyn Sync`
76              found reference `&dyn Bar`
77
78error[E0308]: mismatched types
79  --> $DIR/invalid-upcast.rs:70:25
80   |
81LL |     let foo: &dyn Foo = baz;
82   |              --------   ^^^ expected trait `Foo`, found trait `Baz`
83   |              |
84   |              expected due to this
85   |
86   = note: expected reference `&dyn Foo`
87              found reference `&dyn Baz`
88
89error[E0308]: mismatched types
90  --> $DIR/invalid-upcast.rs:72:35
91   |
92LL |     let _: &dyn std::fmt::Debug = foo;
93   |            --------------------   ^^^ expected trait `Debug`, found trait `Foo`
94   |            |
95   |            expected due to this
96   |
97   = note: expected reference `&dyn Debug`
98              found reference `&dyn Foo`
99
100error[E0308]: mismatched types
101  --> $DIR/invalid-upcast.rs:74:24
102   |
103LL |     let _: &dyn Send = foo;
104   |            ---------   ^^^ expected trait `Send`, found trait `Foo`
105   |            |
106   |            expected due to this
107   |
108   = note: expected reference `&dyn Send`
109              found reference `&dyn Foo`
110
111error[E0308]: mismatched types
112  --> $DIR/invalid-upcast.rs:76:24
113   |
114LL |     let _: &dyn Sync = foo;
115   |            ---------   ^^^ expected trait `Sync`, found trait `Foo`
116   |            |
117   |            expected due to this
118   |
119   = note: expected reference `&dyn Sync`
120              found reference `&dyn Foo`
121
122error[E0308]: mismatched types
123  --> $DIR/invalid-upcast.rs:79:25
124   |
125LL |     let foo: &dyn Foo = bar;
126   |              --------   ^^^ expected trait `Foo`, found trait `Bar`
127   |              |
128   |              expected due to this
129   |
130   = note: expected reference `&dyn Foo`
131              found reference `&dyn Bar`
132
133error[E0308]: mismatched types
134  --> $DIR/invalid-upcast.rs:81:35
135   |
136LL |     let _: &dyn std::fmt::Debug = foo;
137   |            --------------------   ^^^ expected trait `Debug`, found trait `Foo`
138   |            |
139   |            expected due to this
140   |
141   = note: expected reference `&dyn Debug`
142              found reference `&dyn Foo`
143
144error[E0308]: mismatched types
145  --> $DIR/invalid-upcast.rs:83:24
146   |
147LL |     let _: &dyn Send = foo;
148   |            ---------   ^^^ expected trait `Send`, found trait `Foo`
149   |            |
150   |            expected due to this
151   |
152   = note: expected reference `&dyn Send`
153              found reference `&dyn Foo`
154
155error[E0308]: mismatched types
156  --> $DIR/invalid-upcast.rs:85:24
157   |
158LL |     let _: &dyn Sync = foo;
159   |            ---------   ^^^ expected trait `Sync`, found trait `Foo`
160   |            |
161   |            expected due to this
162   |
163   = note: expected reference `&dyn Sync`
164              found reference `&dyn Foo`
165
166error: aborting due to 15 previous errors
167
168For more information about this error, try `rustc --explain E0308`.
169