Skip to content

Commit 384dadb

Browse files
committed
docs auto-ref-slice-plus-ref
1 parent 8dc5b0e commit 384dadb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/ui/methods/no-auto-borrow-vec-to-slice.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
fn main() {
2-
3-
// Testing that method lookup does not automatically borrow
4-
// vectors to slices then automatically create a self reference.
1+
//! Tests that method resolution does not automatically borrow `Vec` to a slice or add extra references.
52
3+
fn main() {
64
let mut a = vec![0];
75
a.test_mut(); //~ ERROR no method named `test_mut` found
86
a.test(); //~ ERROR no method named `test` found

0 commit comments

Comments
 (0)