Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved new dropck-eyepatch compile-fail tests to the
ui/
subtree.
- Loading branch information
Showing
9 changed files
with
166 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
error: `c` does not live long enough | ||
--> $DIR/dropck-eyepatch-extern-crate.rs:39:20 | ||
| | ||
39 | dt = Dt("dt", &c); //~ ERROR `c` does not live long enough | ||
| ^ does not live long enough | ||
... | ||
55 | } | ||
| - borrowed value dropped before borrower | ||
| | ||
= note: values in a scope are dropped in the opposite order they are created | ||
|
||
error: `c` does not live long enough | ||
--> $DIR/dropck-eyepatch-extern-crate.rs:40:20 | ||
| | ||
40 | dr = Dr("dr", &c); //~ ERROR `c` does not live long enough | ||
| ^ does not live long enough | ||
... | ||
55 | } | ||
| - borrowed value dropped before borrower | ||
| | ||
= note: values in a scope are dropped in the opposite order they are created | ||
|
||
error: `c` does not live long enough | ||
--> $DIR/dropck-eyepatch-extern-crate.rs:47:29 | ||
| | ||
47 | pt = Pt("pt", &c_long, &c); //~ ERROR `c` does not live long enough | ||
| ^ does not live long enough | ||
... | ||
55 | } | ||
| - borrowed value dropped before borrower | ||
| | ||
= note: values in a scope are dropped in the opposite order they are created | ||
|
||
error: `c` does not live long enough | ||
--> $DIR/dropck-eyepatch-extern-crate.rs:48:29 | ||
| | ||
48 | pr = Pr("pr", &c_long, &c); //~ ERROR `c` does not live long enough | ||
| ^ does not live long enough | ||
... | ||
55 | } | ||
| - borrowed value dropped before borrower | ||
| | ||
= note: values in a scope are dropped in the opposite order they are created | ||
|
||
error: aborting due to 4 previous errors | ||
|
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
src/test/ui/dropck/dropck-eyepatch-implies-unsafe-impl.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error[E0569]: requires an `unsafe impl` declaration due to `#[may_dangle]` attribute | ||
--> $DIR/dropck-eyepatch-implies-unsafe-impl.rs:32:1 | ||
| | ||
32 | impl<#[may_dangle] A, B: fmt::Debug> Drop for Pt<A, B> { | ||
| ^ | ||
|
||
error[E0569]: requires an `unsafe impl` declaration due to `#[may_dangle]` attribute | ||
--> $DIR/dropck-eyepatch-implies-unsafe-impl.rs:38:1 | ||
| | ||
38 | impl<#[may_dangle] 'a, 'b, B: fmt::Debug> Drop for Pr<'a, 'b, B> { | ||
| ^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
error: `c` does not live long enough | ||
--> $DIR/dropck-eyepatch-reorder.rs:57:20 | ||
| | ||
57 | dt = Dt("dt", &c); //~ ERROR `c` does not live long enough | ||
| ^ does not live long enough | ||
... | ||
73 | } | ||
| - borrowed value dropped before borrower | ||
| | ||
= note: values in a scope are dropped in the opposite order they are created | ||
|
||
error: `c` does not live long enough | ||
--> $DIR/dropck-eyepatch-reorder.rs:58:20 | ||
| | ||
58 | dr = Dr("dr", &c); //~ ERROR `c` does not live long enough | ||
| ^ does not live long enough | ||
... | ||
73 | } | ||
| - borrowed value dropped before borrower | ||
| | ||
= note: values in a scope are dropped in the opposite order they are created | ||
|
||
error: `c` does not live long enough | ||
--> $DIR/dropck-eyepatch-reorder.rs:65:29 | ||
| | ||
65 | pt = Pt("pt", &c_long, &c); //~ ERROR `c` does not live long enough | ||
| ^ does not live long enough | ||
... | ||
73 | } | ||
| - borrowed value dropped before borrower | ||
| | ||
= note: values in a scope are dropped in the opposite order they are created | ||
|
||
error: `c` does not live long enough | ||
--> $DIR/dropck-eyepatch-reorder.rs:66:29 | ||
| | ||
66 | pr = Pr("pr", &c_long, &c); //~ ERROR `c` does not live long enough | ||
| ^ does not live long enough | ||
... | ||
73 | } | ||
| - borrowed value dropped before borrower | ||
| | ||
= note: values in a scope are dropped in the opposite order they are created | ||
|
||
error: aborting due to 4 previous errors | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
error: `c` does not live long enough | ||
--> $DIR/dropck-eyepatch.rs:80:20 | ||
| | ||
80 | dt = Dt("dt", &c); //~ ERROR `c` does not live long enough | ||
| ^ does not live long enough | ||
... | ||
96 | } | ||
| - borrowed value dropped before borrower | ||
| | ||
= note: values in a scope are dropped in the opposite order they are created | ||
|
||
error: `c` does not live long enough | ||
--> $DIR/dropck-eyepatch.rs:81:20 | ||
| | ||
81 | dr = Dr("dr", &c); //~ ERROR `c` does not live long enough | ||
| ^ does not live long enough | ||
... | ||
96 | } | ||
| - borrowed value dropped before borrower | ||
| | ||
= note: values in a scope are dropped in the opposite order they are created | ||
|
||
error: `c` does not live long enough | ||
--> $DIR/dropck-eyepatch.rs:88:29 | ||
| | ||
88 | pt = Pt("pt", &c_long, &c); //~ ERROR `c` does not live long enough | ||
| ^ does not live long enough | ||
... | ||
96 | } | ||
| - borrowed value dropped before borrower | ||
| | ||
= note: values in a scope are dropped in the opposite order they are created | ||
|
||
error: `c` does not live long enough | ||
--> $DIR/dropck-eyepatch.rs:89:29 | ||
| | ||
89 | pr = Pr("pr", &c_long, &c); //~ ERROR `c` does not live long enough | ||
| ^ does not live long enough | ||
... | ||
96 | } | ||
| - borrowed value dropped before borrower | ||
| | ||
= note: values in a scope are dropped in the opposite order they are created | ||
|
||
error: aborting due to 4 previous errors | ||
|