-
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.
- Loading branch information
1 parent
5683791
commit 01377e8
Showing
4 changed files
with
75 additions
and
11 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
19 changes: 19 additions & 0 deletions
19
tests/ui/traits/new-solver/opportunistic-region-resolve.rs
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,19 @@ | ||
// compile-flags: -Ztrait-solver=next | ||
// check-pass | ||
|
||
#![feature(rustc_attrs)] | ||
|
||
#[rustc_coinductive] | ||
trait Trait {} | ||
|
||
#[rustc_coinductive] | ||
trait Indirect {} | ||
impl<T: Trait + ?Sized> Indirect for T {} | ||
|
||
impl<'a> Trait for &'a () where &'a (): Indirect {} | ||
|
||
fn impls_trait<T: Trait>() {} | ||
|
||
fn main() { | ||
impls_trait::<&'static ()>(); | ||
} |