mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Fix some unsizing problems in mir
This commit is contained in:
parent
5eb4796d3d
commit
6d2d1387af
5 changed files with 135 additions and 51 deletions
|
@ -37,6 +37,7 @@
|
|||
//! iterator: option
|
||||
//! iterators: iterator, fn
|
||||
//! manually_drop: drop
|
||||
//! non_null:
|
||||
//! non_zero:
|
||||
//! option: panic
|
||||
//! ord: eq, option
|
||||
|
@ -386,6 +387,19 @@ pub mod ptr {
|
|||
type Metadata;
|
||||
}
|
||||
// endregion:pointee
|
||||
// region:non_null
|
||||
#[rustc_layout_scalar_valid_range_start(1)]
|
||||
#[rustc_nonnull_optimization_guaranteed]
|
||||
pub struct NonNull<T: ?Sized> {
|
||||
pointer: *const T,
|
||||
}
|
||||
// region:coerce_unsized
|
||||
impl<T: ?Sized, U: ?Sized> crate::ops::CoerceUnsized<NonNull<U>> for NonNull<T> where
|
||||
T: crate::marker::Unsize<U>
|
||||
{
|
||||
}
|
||||
// endregion:coerce_unsized
|
||||
// endregion:non_null
|
||||
}
|
||||
|
||||
pub mod ops {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue