File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ // ignore-windows
2
+ // ignore-macos
3
+
4
+ #![ feature( no_core, lang_items, start) ]
5
+ #![ no_core]
6
+
7
+ #[ link( name = "c" ) ]
8
+ extern "C" { }
9
+
10
+ #[ lang = "sized" ]
11
+ pub trait Sized { }
12
+ #[ lang = "copy" ]
13
+ pub trait Copy { }
14
+ #[ lang = "freeze" ]
15
+ pub unsafe trait Freeze { }
16
+
17
+ #[ lang = "start" ]
18
+ #[ start]
19
+ fn start ( _argc : isize , _argv : * const * const u8 ) -> isize {
20
+ 0
21
+ }
22
+
23
+ pub struct A ;
24
+
25
+ impl A {
26
+ pub fn as_ref ( self ) -> & ' static str {
27
+ "A"
28
+ }
29
+ }
Original file line number Diff line number Diff line change
1
+ error: methods called `as_*` usually take self by reference or self by mutable reference; consider choosing a less ambiguous name
2
+ --> $DIR/def_id_nocore.rs:26:19
3
+ |
4
+ LL | pub fn as_ref(self) -> &'static str {
5
+ | ^^^^
6
+ |
7
+ = note: `-D clippy::wrong-self-convention` implied by `-D warnings`
8
+
9
+ error: aborting due to previous error
10
+
You can’t perform that action at this time.
0 commit comments