about summary refs log tree commit diff
path: root/src/librustdoc/scrape_examples.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-08-31 11:16:37 +0000
committerbors <bors@rust-lang.org>2023-08-31 11:16:37 +0000
commit784916ce245bab8c0a39524da4482684102baf38 (patch)
treea3d63674a0a891aef94b3900c4c2db932628368a /src/librustdoc/scrape_examples.rs
parent2bd81316f24c74fefd0064bdc3fad6bbba86adb9 (diff)
parentbf66723c0ecbadc3b4b24da44fa02b7ea3cd73bb (diff)
downloadrust-784916ce245bab8c0a39524da4482684102baf38.tar.gz
rust-784916ce245bab8c0a39524da4482684102baf38.zip
Auto merge of #115290 - compiler-errors:ctor-unsafe, r=cjgillot
`rustc_layout_scalar_valid_range` makes ctors unsafe

We already validate this when we use the ctor in a call, e.g. `Variant(1)`, but not if we use the ctor as a fn ptr, e.g. `.map(Variant)`. The easiest way to fix the latter is (afaict) is by marking the ctor as unsafe itself.

Fixes #115284
Diffstat (limited to 'src/librustdoc/scrape_examples.rs')
0 files changed, 0 insertions, 0 deletions