Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
b3827e4f3728b77bd3e60587487ebfc3cc8d901b
rust/tests/ui/dropck/drop-with-active-borrows-1.rs

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

9 lines
210 B
Rust
Raw Normal View History

test: Add tests for issue #12223, "drop allowed while active borrows still in scope". This issue was fixed by PR #12828 and #5781. All that was left was to add tests. Closes #12223.
2014-07-01 11:47:21 -07:00
fn main() {
let a = "".to_string();
cleanup: s/`v.slice*()`/`&v[a..b]`/g + remove redundant `as_slice()` calls
2015-01-26 21:21:15 -05:00
let b: Vec<&str> = a.lines().collect();
test: Add tests for issue #12223, "drop allowed while active borrows still in scope". This issue was fixed by PR #12828 and #5781. All that was left was to add tests. Closes #12223.
2014-07-01 11:47:21 -07:00
drop(a); //~ ERROR cannot move out of `a` because it is borrowed
`for x in xs.iter()` -> `for x in &xs`
2015-01-31 12:20:46 -05:00
for s in &b {
test: Add tests for issue #12223, "drop allowed while active borrows still in scope". This issue was fixed by PR #12828 and #5781. All that was left was to add tests. Closes #12223.
2014-07-01 11:47:21 -07:00
println!("{}", *s);
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 2816ms Template: 2ms
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