-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do leak check after function ptr coercion
- Loading branch information
Showing
30 changed files
with
271 additions
and
256 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
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
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
31 changes: 3 additions & 28 deletions
31
src/test/ui/hr-subtype/placeholder-pattern-fail.nll.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 |
---|---|---|
@@ -1,37 +1,12 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/placeholder-pattern-fail.rs:9:12 | ||
--> $DIR/placeholder-pattern-fail.rs:9:47 | ||
| | ||
LL | let _: for<'a, 'b> fn(Inv<'a>, Inv<'b>) = sub; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other | ||
| ^^^ one type is more general than the other | ||
| | ||
= note: expected fn pointer `for<'a, 'b> fn(Inv<'a>, Inv<'b>)` | ||
found fn pointer `for<'a> fn(Inv<'a>, Inv<'a>)` | ||
|
||
error[E0308]: mismatched types | ||
--> $DIR/placeholder-pattern-fail.rs:9:12 | ||
| | ||
LL | let _: for<'a, 'b> fn(Inv<'a>, Inv<'b>) = sub; | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other | ||
| | ||
= note: expected fn pointer `for<'a, 'b> fn(Inv<'a>, Inv<'b>)` | ||
found fn pointer `for<'a> fn(Inv<'a>, Inv<'a>)` | ||
|
||
error: lifetime may not live long enough | ||
--> $DIR/placeholder-pattern-fail.rs:14:13 | ||
| | ||
LL | fn simple1<'c>(x: (&'c i32,)) { | ||
| -- lifetime `'c` defined here | ||
LL | let _x: (&'static i32,) = x; | ||
| ^^^^^^^^^^^^^^^ type annotation requires that `'c` must outlive `'static` | ||
|
||
error: lifetime may not live long enough | ||
--> $DIR/placeholder-pattern-fail.rs:19:12 | ||
| | ||
LL | fn simple2<'c>(x: (&'c i32,)) { | ||
| -- lifetime `'c` defined here | ||
LL | let _: (&'static i32,) = x; | ||
| ^^^^^^^^^^^^^^^ type annotation requires that `'c` must outlive `'static` | ||
|
||
error: aborting due to 4 previous errors | ||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
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
5 changes: 4 additions & 1 deletion
5
...t/ui/lub-glb/old-lub-glb-hr-noteq1.stderr → ...glb/old-lub-glb-hr-noteq1.baseleak.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
21 changes: 21 additions & 0 deletions
21
src/test/ui/lub-glb/old-lub-glb-hr-noteq1.basenoleak.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,21 @@ | ||
error[E0308]: `match` arms have incompatible types | ||
--> $DIR/old-lub-glb-hr-noteq1.rs:17:14 | ||
| | ||
LL | let z = match 22 { | ||
| _____________- | ||
LL | | 0 => x, | ||
| | - this is found to be of type `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8` | ||
LL | | _ => y, | ||
| | ^ one type is more general than the other | ||
LL | | | ||
... | | ||
LL | | | ||
LL | | }; | ||
| |_____- `match` arms have incompatible types | ||
| | ||
= note: expected fn pointer `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8` | ||
found fn pointer `for<'a> fn(&'a u8, &'a u8) -> &'a u8` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
Oops, something went wrong.