about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-03-31 17:29:52 +0200
committerGitHub <noreply@github.com>2022-03-31 17:29:52 +0200
commit521c590c9f780227f3f6284cbecb727f121a9cb4 (patch)
tree473ac3060d7cfec82f7b8ca505e6962afb651630 /compiler/rustc_codegen_gcc
parent03314912f1361af6b39383958b5aa1b4aed61c26 (diff)
parentc74f7a310fe8fcf9a2edf927cee0bc15a3abe399 (diff)
downloadrust-521c590c9f780227f3f6284cbecb727f121a9cb4.tar.gz
rust-521c590c9f780227f3f6284cbecb727f121a9cb4.zip
Rollup merge of #91416 - compiler-errors:infinite-ty-option-box, r=estebank
Specialize infinite-type "insert some indirection" suggestion for Option

Suggest `Option<Box<_>>` instead of `Box<Option<_>>` for infinitely-recursive members of a struct.

Not sure if I can get the span of the generic subty of the Option so I can make this a `+++`-style suggestion. The current output is a tiny bit less fancy looking than the original suggestion.

Should I limit the specialization to just `Option<Box<TheOuterStruct>>`? Because right now it applies to all `Option` members in the struct that are returned by `Representability::SelfRecursive`.

Fixes #91402

r? `@estebank`
(since you wrote the original suggestion and are definitely most familiar with it!)
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions