forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#79306 - GuillaumeGomez:rollup-4cnudfj, r=Guil…
…laumeGomez Rollup of 4 pull requests Successful merges: - rust-lang#78670 (Remove FIXME comment in some incremental test suite) - rust-lang#79292 (Fix typo in doc comment for report_too_many_hashes) - rust-lang#79300 (Prevent feature information to be hidden if it's on the impl directly) - rust-lang#79302 (Add regression test for issue 73899) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
9 changed files
with
36 additions
and
9 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
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 @@ | ||
// run-pass | ||
#![feature(const_evaluatable_checked)] | ||
#![feature(const_generics)] | ||
#![allow(incomplete_features)] | ||
|
||
trait Foo {} | ||
|
||
impl<const N: usize> Foo for [(); N] where Self: FooImpl<{ N == 0 }> {} | ||
|
||
trait FooImpl<const IS_ZERO: bool> {} | ||
|
||
impl FooImpl<{ 0u8 == 0u8 }> for [(); 0] {} | ||
|
||
impl<const N: usize> FooImpl<{ 0u8 != 0u8 }> for [(); N] {} | ||
|
||
fn foo<T: Foo>(_v: T) {} | ||
|
||
fn main() { | ||
foo([]); | ||
foo([()]); | ||
} |