Skip to content

Commit 2ed26b2

Browse files
committed
clippy: {Meta,Pointee,}Sized in non-minicore
One clippy test is `no_core` and needs to have `MetaSized` and `PointeeSized` added to it.
1 parent ae44a70 commit 2ed26b2

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/tools/clippy/tests/ui/def_id_nocore.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@
77
#[link(name = "c")]
88
extern "C" {}
99

10+
#[lang = "pointee_sized"]
11+
pub trait PointeeSized {}
12+
13+
#[lang = "meta_sized"]
14+
pub trait MetaSized: PointeeSized {}
15+
1016
#[lang = "sized"]
11-
pub trait Sized {}
17+
pub trait Sized: MetaSized {}
1218
#[lang = "copy"]
1319
pub trait Copy {}
1420
#[lang = "freeze"]

src/tools/clippy/tests/ui/def_id_nocore.stderr

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

0 commit comments

Comments
 (0)