Skip to content

Commit

Permalink
update tests and reference files
Browse files Browse the repository at this point in the history
The type checker invokes the borrow checker for closures it finds, so
removing the NLL type checker affects ordering of errors somewhat.
  • Loading branch information
nikomatsakis committed Feb 23, 2018
1 parent 380e388 commit 2370b60
Show file tree
Hide file tree
Showing 8 changed files with 410 additions and 414 deletions.
12 changes: 4 additions & 8 deletions src/test/compile-fail/borrowck/two-phase-nonrecv-autoref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,10 @@ fn overloaded_call_traits() {
//[lxl]~^^^ ERROR use of moved value: `*f`
//[nll]~^^^^ ERROR cannot move a value of type
//[nll]~^^^^^ ERROR cannot move a value of type
//[nll]~^^^^^^ ERROR cannot move a value of type
//[nll]~^^^^^^^ ERROR cannot move a value of type
//[nll]~^^^^^^^^ ERROR use of moved value: `*f`
//[g2p]~^^^^^^^^^ ERROR cannot move a value of type
//[g2p]~^^^^^^^^^^ ERROR cannot move a value of type
//[g2p]~^^^^^^^^^^^ ERROR cannot move a value of type
//[g2p]~^^^^^^^^^^^^ ERROR cannot move a value of type
//[g2p]~^^^^^^^^^^^^^ ERROR use of moved value: `*f`
//[nll]~^^^^^^ ERROR use of moved value: `*f`
//[g2p]~^^^^^^^ ERROR cannot move a value of type
//[g2p]~^^^^^^^^ ERROR cannot move a value of type
//[g2p]~^^^^^^^^^ ERROR use of moved value: `*f`
}

twice_ten_sm(&mut |x| x + 1);
Expand Down
94 changes: 47 additions & 47 deletions src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -25,53 +25,6 @@ note: External requirements
= note: number of external vids: 3
= note: where <T as std::iter::Iterator>::Item: '_#2r

note: External requirements
--> $DIR/projection-no-regions-closure.rs:46:23
|
46 | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: DefId(0/1:18 ~ projection_no_regions_closure[317d]::correct_region[0]::{{closure}}[0]) with closure substs [
'_#1r,
T,
i32,
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<Anything + '_#2r>
]
= note: number of external vids: 3
= note: where <T as std::iter::Iterator>::Item: '_#2r

note: External requirements
--> $DIR/projection-no-regions-closure.rs:54:23
|
54 | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: DefId(0/1:22 ~ projection_no_regions_closure[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
i32,
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<Anything + '_#3r>
]
= note: number of external vids: 4
= note: where <T as std::iter::Iterator>::Item: '_#3r

note: External requirements
--> $DIR/projection-no-regions-closure.rs:65:23
|
65 | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: DefId(0/1:26 ~ projection_no_regions_closure[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
i32,
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<Anything + '_#3r>
]
= note: number of external vids: 4
= note: where <T as std::iter::Iterator>::Item: '_#3r

error[E0309]: the associated type `<T as std::iter::Iterator>::Item` may not live long enough
--> $DIR/projection-no-regions-closure.rs:36:23
|
Expand All @@ -97,6 +50,21 @@ note: No external requirements
T
]

note: External requirements
--> $DIR/projection-no-regions-closure.rs:46:23
|
46 | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: DefId(0/1:18 ~ projection_no_regions_closure[317d]::correct_region[0]::{{closure}}[0]) with closure substs [
'_#1r,
T,
i32,
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<Anything + '_#2r>
]
= note: number of external vids: 3
= note: where <T as std::iter::Iterator>::Item: '_#2r

note: No external requirements
--> $DIR/projection-no-regions-closure.rs:42:1
|
Expand All @@ -113,6 +81,22 @@ note: No external requirements
T
]

note: External requirements
--> $DIR/projection-no-regions-closure.rs:54:23
|
54 | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: DefId(0/1:22 ~ projection_no_regions_closure[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
i32,
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<Anything + '_#3r>
]
= note: number of external vids: 4
= note: where <T as std::iter::Iterator>::Item: '_#3r

error[E0309]: the associated type `<T as std::iter::Iterator>::Item` may not live long enough
--> $DIR/projection-no-regions-closure.rs:54:23
|
Expand All @@ -139,6 +123,22 @@ note: No external requirements
T
]

note: External requirements
--> $DIR/projection-no-regions-closure.rs:65:23
|
65 | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: DefId(0/1:26 ~ projection_no_regions_closure[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
i32,
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<Anything + '_#3r>
]
= note: number of external vids: 4
= note: where <T as std::iter::Iterator>::Item: '_#3r

note: No external requirements
--> $DIR/projection-no-regions-closure.rs:60:1
|
Expand Down
102 changes: 51 additions & 51 deletions src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -32,57 +32,6 @@ note: External requirements
= note: where T: '_#2r
= note: where '_#1r: '_#2r

note: External requirements
--> $DIR/projection-one-region-closure.rs:68:29
|
68 | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: DefId(0/1:23 ~ projection_one_region_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
i32,
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
]
= note: number of external vids: 4
= note: where T: '_#3r
= note: where '_#2r: '_#3r

note: External requirements
--> $DIR/projection-one-region-closure.rs:90:29
|
90 | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: DefId(0/1:27 ~ projection_one_region_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
i32,
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
]
= note: number of external vids: 4
= note: where T: '_#3r
= note: where '_#2r: '_#3r

note: External requirements
--> $DIR/projection-one-region-closure.rs:103:29
|
103 | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: DefId(0/1:31 ~ projection_one_region_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
i32,
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
]
= note: number of external vids: 4
= note: where T: '_#3r
= note: where '_#2r: '_#3r

error[E0309]: the parameter type `T` may not live long enough
--> $DIR/projection-one-region-closure.rs:56:29
|
Expand Down Expand Up @@ -114,6 +63,23 @@ note: No external requirements
T
]

note: External requirements
--> $DIR/projection-one-region-closure.rs:68:29
|
68 | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: DefId(0/1:23 ~ projection_one_region_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
i32,
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
]
= note: number of external vids: 4
= note: where T: '_#3r
= note: where '_#2r: '_#3r

error[E0309]: the parameter type `T` may not live long enough
--> $DIR/projection-one-region-closure.rs:68:29
|
Expand Down Expand Up @@ -146,6 +112,23 @@ note: No external requirements
T
]

note: External requirements
--> $DIR/projection-one-region-closure.rs:90:29
|
90 | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: DefId(0/1:27 ~ projection_one_region_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
i32,
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
]
= note: number of external vids: 4
= note: where T: '_#3r
= note: where '_#2r: '_#3r

error[E0309]: the parameter type `T` may not live long enough
--> $DIR/projection-one-region-closure.rs:90:29
|
Expand Down Expand Up @@ -178,6 +161,23 @@ note: No external requirements
T
]

note: External requirements
--> $DIR/projection-one-region-closure.rs:103:29
|
103 | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: defining type: DefId(0/1:31 ~ projection_one_region_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [
'_#1r,
'_#2r,
T,
i32,
extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
]
= note: number of external vids: 4
= note: where T: '_#3r
= note: where '_#2r: '_#3r

note: No external requirements
--> $DIR/projection-one-region-closure.rs:97:1
|
Expand Down
Loading

0 comments on commit 2370b60

Please sign in to comment.