Commit d2de292
authored
Rollup merge of #118715 - davidtwco:issue-117997-privacy-visit-trait-ref-and-args, r=TaKO8Ki
privacy: visit trait def id of projections
Fixes #117997.
A refactoring in #117076 changed the `DefIdVisitorSkeleton` to avoid calling `visit_projection_ty` for `ty::Projection` aliases, and instead just iterate over the args - this makes sense, as `visit_projection_ty` will indirectly visit all of the same args, but in doing so, will also create a `TraitRef` containing the trait's `DefId`, which also gets visited. The trait's `DefId` isn't visited when we only visit the arguments without separating them into `TraitRef` and own args first.
Eventually this influences the reachability set and whether a function is encoded into the metadata.File tree
5 files changed
+89
-19
lines changed- compiler/rustc_privacy/src
- tests/ui/privacy
- auxiliary
5 files changed
+89
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | 221 | | |
227 | 222 | | |
228 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
229 | 228 | | |
230 | 229 | | |
231 | 230 | | |
232 | 231 | | |
233 | 232 | | |
234 | 233 | | |
| 234 | + | |
| 235 | + | |
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
291 | 303 | | |
292 | 304 | | |
293 | 305 | | |
| |||
301 | 313 | | |
302 | 314 | | |
303 | 315 | | |
304 | | - | |
| 316 | + | |
305 | 317 | | |
306 | 318 | | |
307 | 319 | | |
308 | 320 | | |
309 | 321 | | |
310 | | - | |
| 322 | + | |
311 | 323 | | |
312 | 324 | | |
313 | 325 | | |
314 | 326 | | |
315 | 327 | | |
316 | | - | |
| 328 | + | |
317 | 329 | | |
318 | 330 | | |
319 | 331 | | |
320 | 332 | | |
321 | 333 | | |
322 | | - | |
| 334 | + | |
323 | 335 | | |
324 | 336 | | |
325 | 337 | | |
326 | 338 | | |
327 | 339 | | |
328 | | - | |
| 340 | + | |
329 | 341 | | |
330 | 342 | | |
331 | 343 | | |
332 | 344 | | |
333 | 345 | | |
334 | | - | |
| 346 | + | |
335 | 347 | | |
336 | 348 | | |
337 | 349 | | |
338 | 350 | | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
339 | 363 | | |
340 | | - | |
| 364 | + | |
341 | 365 | | |
342 | 366 | | |
343 | 367 | | |
344 | 368 | | |
345 | 369 | | |
346 | | - | |
| 370 | + | |
347 | 371 | | |
348 | 372 | | |
349 | 373 | | |
350 | 374 | | |
351 | 375 | | |
352 | | - | |
| 376 | + | |
353 | 377 | | |
354 | 378 | | |
355 | 379 | | |
356 | 380 | | |
357 | 381 | | |
358 | | - | |
| 382 | + | |
359 | 383 | | |
360 | 384 | | |
361 | 385 | | |
362 | 386 | | |
363 | 387 | | |
364 | | - | |
| 388 | + | |
365 | 389 | | |
366 | 390 | | |
367 | 391 | | |
368 | 392 | | |
369 | 393 | | |
370 | | - | |
| 394 | + | |
371 | 395 | | |
372 | 396 | | |
373 | 397 | | |
374 | 398 | | |
375 | | - | |
| 399 | + | |
376 | 400 | | |
0 commit comments