1 // Copyright 2012-2016 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // Basic test for named lifetime translation. Check that we
12 // instantiate the types that appear in function arguments with
13 // suitable variables and that we setup the outlives relationship
14 // between R0 and R1 properly.
16 // compile-flags:-Zborrowck=mir -Zverbose
17 // ^^^^^^^^^ force compiler to dump more region information
18 // ignore-tidy-linelength
22 fn use_x<'a, 'b: 'a, 'c>(w: &'a mut i32, x: &'b u32, y: &'a u32, z: &'c u32) -> bool { true }
28 // START rustc.use_x.nll.0.mir
29 // | Free Region Mapping
30 // | '_#0r | Global | ['_#2r, '_#1r, '_#0r, '_#4r, '_#3r]
31 // | '_#1r | External | ['_#1r, '_#4r]
32 // | '_#2r | External | ['_#2r, '_#1r, '_#4r]
33 // | '_#3r | Local | ['_#4r, '_#3r]
34 // | '_#4r | Local | ['_#4r]
36 // | Inferred Region Values
37 // | '_#0r | U0 | {bb0[0..=1], '_#0r}
38 // | '_#1r | U0 | {bb0[0..=1], '_#1r}
39 // | '_#2r | U0 | {bb0[0..=1], '_#2r}
40 // | '_#3r | U0 | {bb0[0..=1], '_#3r}
41 // | '_#4r | U0 | {bb0[0..=1], '_#4r}
42 // | '_#5r | U0 | {bb0[0..=1], '_#1r}
43 // | '_#6r | U0 | {bb0[0..=1], '_#2r}
44 // | '_#7r | U0 | {bb0[0..=1], '_#1r}
45 // | '_#8r | U0 | {bb0[0..=1], '_#3r}
48 // fn use_x(_1: &'_#5r mut i32, _2: &'_#6r u32, _3: &'_#7r u32, _4: &'_#8r u32) -> bool {
49 // END rustc.use_x.nll.0.mir