Fix tidy error
This commit is contained in:
parent
95e330bd01
commit
316e9db0cf
@ -22,21 +22,21 @@ impl<T> Deref for DerefExample<T> {
|
||||
fn main() {
|
||||
let foo = &Foo(1u32);
|
||||
let foo_clone: &Foo<u32> = foo.clone();
|
||||
//~^ WARNING call to `.clone()` on a reference in this situation does nothing [noop_method_call]
|
||||
//~^ WARNING call to `.clone()` on a reference in this situation does nothing
|
||||
|
||||
let bar = &Bar(1u32);
|
||||
let bar_clone: Bar<u32> = bar.clone();
|
||||
|
||||
let deref = &&DerefExample(12u32);
|
||||
let derefed: &DerefExample<u32> = deref.deref();
|
||||
//~^ WARNING call to `.deref()` on a reference in this situation does nothing [noop_method_call]
|
||||
//~^ WARNING call to `.deref()` on a reference in this situation does nothing
|
||||
|
||||
let deref = &DerefExample(12u32);
|
||||
let derefed: &u32 = deref.deref();
|
||||
|
||||
let a = &&Foo(1u32);
|
||||
let borrowed: &Foo<u32> = a.borrow();
|
||||
//~^ WARNING call to `.borrow()` on a reference in this situation does nothing [noop_method_call]
|
||||
//~^ WARNING call to `.borrow()` on a reference in this situation does nothing
|
||||
}
|
||||
|
||||
fn generic<T>(foo: &Foo<T>) {
|
||||
@ -45,5 +45,5 @@ fn generic<T>(foo: &Foo<T>) {
|
||||
|
||||
fn non_generic(foo: &Foo<u32>) {
|
||||
foo.clone();
|
||||
//~^ WARNING call to `.clone()` on a reference in this situation does nothing [noop_method_call]
|
||||
//~^ WARNING call to `.clone()` on a reference in this situation does nothing
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user