diff options
| author | Ralf Jung <post@ralfj.de> | 2019-11-04 10:11:58 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2019-11-04 10:11:58 +0100 |
| commit | bb37d0078750b760f013bfa706fe19d4d823b8df (patch) | |
| tree | 3aac3e1e45518edeb7e628425b13a372928d4a92 /src/libcore | |
| parent | 7ff57edb93625857b1ac289160550859e78ef6fb (diff) | |
| download | rust-bb37d0078750b760f013bfa706fe19d4d823b8df.tar.gz rust-bb37d0078750b760f013bfa706fe19d4d823b8df.zip | |
more robust method checking through DefId and diagnostic_item
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/mem/maybe_uninit.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcore/mem/maybe_uninit.rs b/src/libcore/mem/maybe_uninit.rs index 792ce9dfad4..339a94c2180 100644 --- a/src/libcore/mem/maybe_uninit.rs +++ b/src/libcore/mem/maybe_uninit.rs @@ -440,6 +440,7 @@ impl<T> MaybeUninit<T> { /// ``` #[stable(feature = "maybe_uninit", since = "1.36.0")] #[inline(always)] + #[cfg_attr(all(not(bootstrap)), rustc_diagnostic_item = "assume_init")] pub unsafe fn assume_init(self) -> T { intrinsics::panic_if_uninhabited::<T>(); ManuallyDrop::into_inner(self.value) |
