-
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.
Stop using translate_args in the new solver
- Loading branch information
1 parent
91c0823
commit 20f7544
Showing
3 changed files
with
55 additions
and
21 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
22 changes: 22 additions & 0 deletions
22
tests/ui/specialization/source-impl-requires-constraining-predicates.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,22 @@ | ||
//@ check-pass | ||
//@ revisions: current next | ||
//@ ignore-compare-mode-next-solver (explicit revisions) | ||
//@[next] compile-flags: -Znext-solver | ||
|
||
// Tests that rebasing from the concrete impl to the default impl also processes the | ||
// `[u32; 0]: IntoIterator<Item = ?U>` predicate to constrain the `?U` impl arg. | ||
|
||
#![feature(specialization)] | ||
trait Spec { | ||
type Assoc; | ||
} | ||
|
||
default impl<T, U> Spec for T where T: IntoIterator<Item = U> { | ||
type Assoc = U; | ||
} | ||
|
||
impl<T> Spec for [T; 0] {} | ||
|
||
fn main() { | ||
let x: <[u32; 0] as Spec>::Assoc = 1; | ||
} |