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
359bfa901b9d8eddbed7b88b6716dbb77b7bfb95
rust/tests/ui/borrowck/access-mode-in-closures.rs

11 lines
233 B
Rust
Raw Normal View History

make non_camel_case_types an early lint
2018-12-16 22:21:47 -05:00
struct S(Vec<isize>);
testsuite: Add license
2013-01-19 17:38:12 -08:00
make non_camel_case_types an early lint
2018-12-16 22:21:47 -05:00
fn unpack<F>(_unpack: F) where F: FnOnce(&S) -> Vec<isize> {}
mode: reset mode on entry to fn body. This is an interim fix to address the "Beware!" unsoundness. I have a more comprehensive rewrite of mode.rs in the pipeline. r=pcwalton
2013-01-10 06:29:26 -08:00
fn main() {
correct expected error msgs in various tests rs=breakage
2013-01-10 13:57:38 -08:00
let _foo = unpack(|s| {
mode: reset mode on entry to fn body. This is an interim fix to address the "Beware!" unsoundness. I have a more comprehensive rewrite of mode.rs in the pipeline. r=pcwalton
2013-01-10 06:29:26 -08:00
// Test that `s` is moved here.
make non_camel_case_types an early lint
2018-12-16 22:21:47 -05:00
match *s { S(v) => v } //~ ERROR cannot move out
mode: reset mode on entry to fn body. This is an interim fix to address the "Beware!" unsoundness. I have a more comprehensive rewrite of mode.rs in the pipeline. r=pcwalton
2013-01-10 06:29:26 -08:00
});
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 3557ms 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