File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 153
153
/// [`HashMap<K, V>`]: ../../std/collections/struct.HashMap.html
154
154
/// [`String`]: ../../std/string/struct.String.html
155
155
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
156
+ #[ rustc_diagnostic_item = "Borrow" ]
156
157
pub trait Borrow < Borrowed : ?Sized > {
157
158
/// Immutably borrows from an owned value.
158
159
///
@@ -205,6 +206,7 @@ pub trait BorrowMut<Borrowed: ?Sized>: Borrow<Borrowed> {
205
206
206
207
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
207
208
impl < T : ?Sized > Borrow < T > for T {
209
+ #[ rustc_diagnostic_item = "noop_method_borrow" ]
208
210
fn borrow ( & self ) -> & T {
209
211
self
210
212
}
Original file line number Diff line number Diff line change 60
60
#[ doc( alias = "*" ) ]
61
61
#[ doc( alias = "&*" ) ]
62
62
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
63
+ #[ rustc_diagnostic_item = "Deref" ]
63
64
pub trait Deref {
64
65
/// The resulting type after dereferencing.
65
66
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -78,6 +79,7 @@ pub trait Deref {
78
79
impl < T : ?Sized > Deref for & T {
79
80
type Target = T ;
80
81
82
+ #[ rustc_diagnostic_item = "noop_method_deref" ]
81
83
fn deref ( & self ) -> & T {
82
84
* self
83
85
}
Original file line number Diff line number Diff line change 1
- #![ cfg_attr( not( bootstrap) , allow( noop_method_call) ) ]
2
-
3
1
#[ test]
4
2
fn test_borrowed_clone ( ) {
5
3
let x = 5 ;
You can’t perform that action at this time.
0 commit comments