// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
// pretty-expanded FIXME #23616
pub fn main() {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
// Test taken from #45641 (https://github.com/rust-lang/rust/issues/45641)
// revisions: ast mir
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
+
struct F { f: Vec<isize> }
fn impure(_v: &[isize]) {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
#![feature(box_syntax)]
fn borrow<F>(x: &isize, f: F) where F: FnOnce(&isize) {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
// Test that freezing an `&mut` pointer while referent is
// frozen is legal.
//
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
// Tests that two closures can simultaneously have immutable
// access to the variable, whether that immutable access be used
// for direct reads or for taking immutable ref. Also check
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
// pretty-expanded FIXME #23616
#![feature(box_syntax)]
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
pub fn main() {
let x = [22];
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
// Test that a `&mut` inside of an `&` is freezable.
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
// pretty-expanded FIXME #23616
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
// Check that we do not ICE when compiling this
// macro, which reuses the expression `$id`
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
#![feature(box_syntax)]
pub fn main() {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
// Test case from #39963.
#![feature(nll)]
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
#![feature(box_syntax)]
use std::mem::swap;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
fn want_slice(v: &[isize]) -> isize {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
// ignore-pretty issue #37199
fn match_ref(v: Option<isize>) -> isize {
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
pub fn main() {
let mut x = None;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
struct Counter {
value: usize
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
// Tests that the scope of the pointer returned from `get()` is
// limited to the deref operation itself, and does not infect the
// block as a whole.
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
//compile-flags: -Z borrowck=mir
#![feature(slice_patterns)]
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
// Regression test for issue #7740
// pretty-expanded FIXME #23616
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
// This test verifies that casting from the same lifetime on a value
// to the same lifetime on a trait succeeds. See issue #10766.
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
// pretty-expanded FIXME #23616
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-
+// run-pass
use std::cell::Cell;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
// revisions: ast mir
//[mir]compile-flags: -Z borrowck=mir
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
#![feature(nll)]
#![deny(unused_mut)]
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
// pretty-expanded FIXME #23616
#![feature(box_syntax)]
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
// compile-flags: -Z borrowck=mir -Z two-phase-borrows
// This is the "goto example" for why we want two phase borrows.
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
// revisions: lxl nll
#![cfg_attr(nll, feature(nll))]
// option. This file may not be copied, modified, or distributed
// except according to those terms.
+// run-pass
// revisions: lxl nll
//[lxl]compile-flags: -Z borrowck=mir -Z two-phase-borrows