We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 266f452 + 909a33d commit 205a0d3Copy full SHA for 205a0d3
src/librustdoc/clean/types.rs
@@ -1606,7 +1606,6 @@ impl Type {
1606
}
1607
1608
RawPointer(..) => Some(PrimitiveType::RawPointer),
1609
- BorrowedRef { type_: box Generic(..), .. } => Some(PrimitiveType::Reference),
1610
BareFunction(..) => Some(PrimitiveType::Fn),
1611
Never => Some(PrimitiveType::Never),
1612
_ => None,
@@ -1665,13 +1664,7 @@ impl Type {
1665
1664
1666
1667
crate fn is_primitive(&self) -> bool {
1668
- match self {
1669
- Self::Primitive(_) => true,
1670
- Self::BorrowedRef { ref type_, .. } | Self::RawPointer(_, ref type_) => {
1671
- type_.is_primitive()
1672
- }
1673
- _ => false,
1674
+ self.primitive_type().is_some()
1675
1676
1677
crate fn projection(&self) -> Option<(&Type, DefId, Symbol)> {
0 commit comments