Skip to content

Commit 5157ce7

Browse files
committed
clippy: const {Meta,}Sized in non-minicore tests
As before, but adding constness.
1 parent 2cba458 commit 5157ce7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

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

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ignore-target: apple
22

33
#![feature(no_core, lang_items)]
4+
#![feature(const_trait_impl)]
45
#![no_core]
56
#![allow(clippy::missing_safety_doc)]
67

@@ -11,9 +12,11 @@ extern "C" {}
1112
pub trait PointeeSized {}
1213

1314
#[lang = "meta_sized"]
15+
#[const_trait]
1416
pub trait MetaSized: PointeeSized {}
1517

1618
#[lang = "sized"]
19+
#[const_trait]
1720
pub trait Sized: MetaSized {}
1821
#[lang = "copy"]
1922
pub trait Copy {}

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:33:19
2+
--> tests/ui/def_id_nocore.rs:36:19
33
|
44
LL | pub fn as_ref(self) -> &'static str {
55
| ^^^^

0 commit comments

Comments
 (0)