-
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.
Ensure the canonical_param_env_cache does not contain inconsistent in…
…formation about the defining anchor
- Loading branch information
Showing
3 changed files
with
43 additions
and
7 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,27 @@ | ||
//! This test checks that the param env canonicalization cache | ||
//! does not end up with inconsistent values. | ||
//@ check-pass | ||
|
||
pub fn poison1() -> impl Sized | ||
where | ||
(): 'static, | ||
{ | ||
} | ||
pub fn poison2() -> impl Sized | ||
where | ||
(): 'static, | ||
{ | ||
define_by_query((poison2, ())); | ||
} | ||
pub fn poison3() -> impl Sized | ||
where | ||
(): 'static, | ||
{ | ||
} | ||
|
||
trait Query {} | ||
impl<Out, F: Fn() -> Out> Query for (F, Out) {} | ||
fn define_by_query(_: impl Query) {} | ||
|
||
fn main() {} |