clippy: {Meta,Pointee,}Sized in non-minicore

One clippy test is `no_core` and needs to have `MetaSized` and
`PointeeSized` added to it.
This commit is contained in:
David Wood 2025-03-03 02:39:21 +00:00
parent c7ee095bd6
commit 765015d7e5
2 changed files with 8 additions and 2 deletions

View file

@ -7,8 +7,14 @@
#[link(name = "c")]
unsafe extern "C" {}
#[lang = "pointee_sized"]
pub trait PointeeSized {}
#[lang = "meta_sized"]
pub trait MetaSized: PointeeSized {}
#[lang = "sized"]
pub trait Sized {}
pub trait Sized: MetaSized {}
#[lang = "copy"]
pub trait Copy {}
#[lang = "freeze"]

View file

@ -1,5 +1,5 @@
error: methods called `as_*` usually take `self` by reference or `self` by mutable reference
--> tests/ui/def_id_nocore.rs:27:19
--> tests/ui/def_id_nocore.rs:33:19
|
LL | pub fn as_ref(self) -> &'static str {
| ^^^^