rust-analyzer version: rust-analyzer 1.91.0-nightly (425a9c0 2025-08-17)
rustc version: rustc 1.91.0-nightly (425a9c0a0 2025-08-17)
editor or extension: helix
code snippet to reproduce:
#![feature(derive_coerce_pointee)]
use std::marker::CoercePointee;
use std::ptr::NonNull;
#[derive(CoercePointee)]
#[repr(transparent)]
pub struct Ptr<T, #[cfg_attr(all(), pointee)] V: ?Sized> {
ptr: NonNull<V>,
_ghost: PhantomData<T>,
}
r-a emits an error saying "exactly one generic type parameter must be marked as #[pointee]
to derive CoercePointee
", rustc compiles this code successfully.