-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #88592 - b-naber:region_substs, r=oli-obk
Fix ICE in const check Fixes #88433
- Loading branch information
Showing
2 changed files
with
45 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// build-pass | ||
|
||
#![feature(const_trait_impl)] | ||
|
||
trait Func<T> { | ||
type Output; | ||
|
||
fn call_once(self, arg: T) -> Self::Output; | ||
} | ||
|
||
|
||
struct Closure; | ||
|
||
impl const Func<&usize> for Closure { | ||
type Output = usize; | ||
|
||
fn call_once(self, arg: &usize) -> Self::Output { | ||
*arg | ||
} | ||
} | ||
|
||
enum Bug<T = [(); Closure.call_once(&0) ]> { | ||
V(T), | ||
} | ||
|
||
fn main() {} |