Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
51b51b51d7931da85280382a81c4dd80c73ca754
rust/tests/ui/borrowck/borrowck-mut-slice-of-imm-vec.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
130 B
Rust
Raw Normal View History

Update compile fail tests to use isize.
2015-01-08 21:54:35 +11:00
fn write(v: &mut [isize]) {
Introduce auto adjustment table to subsume autoderef/autoref/borrowings. Fixes #3261 Fixes #3443
2012-09-11 21:25:01 -07:00
v[0] += 1;
}
fn main() {
Changed most vec! invocations to use square braces Most of the Rust community agrees that the vec! macro is clearer when called using square brackets [] instead of regular brackets (). Most of these ocurrences are from before macros allowed using different types of brackets. There is one left unchanged in a pretty-print test, as the pretty printer still wants it to have regular brackets.
2016-10-29 22:54:04 +01:00
let v = vec![1, 2, 3];
cleanup: replace `as[_mut]_slice()` calls with deref coercions
2015-02-01 21:53:25 -05:00
write(&mut v); //~ ERROR cannot borrow
Introduce auto adjustment table to subsume autoderef/autoref/borrowings. Fixes #3261 Fixes #3443
2012-09-11 21:25:01 -07:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 3930ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API