File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ //@ known-bug: #146965
2+ //@ compile-flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C codegen-units=1 -C strip=debuginfo
3+
4+ fn conjure < T > ( ) -> T {
5+ panic ! ( )
6+ }
7+
8+ pub trait Ring {
9+ type Element ;
10+ }
11+ impl < T > Ring for T {
12+ type Element = u16 ;
13+ }
14+
15+ // Removing the : Ring bound makes it not ICE
16+ fn map_coeff < T : Ring > ( f : impl Fn ( <T as Ring >:: Element ) ) {
17+ let c = conjure :: < <T as Ring >:: Element > ( ) ;
18+ f ( c) ;
19+ }
20+
21+ // Adding a : Ring bound makes it not ICE
22+ fn gcd < T > ( ) {
23+ map_coeff :: < T > ( |_: u16 | { } ) ;
24+ }
25+
26+ // Removing the : Ring bound makes it not ICE
27+ pub fn bivariate_factorization < T : Ring > ( ) {
28+ gcd :: < T > ( ) ;
29+ }
Original file line number Diff line number Diff line change 1+ //@ known-bug: #150263
2+ //@ compile-flags: --crate-type lib -C opt-level=3
3+
4+ pub trait Scope {
5+ type Timestamp ;
6+ }
7+ impl < G > Scope for G {
8+ type Timestamp = ( ) ;
9+ }
10+
11+ pub fn create < G : Scope > ( ) {
12+ enter :: < G > ( ) ;
13+ }
14+
15+ fn enter < G > ( ) {
16+ unary :: < G > ( |_: <G as Scope >:: Timestamp | { } ) ;
17+ }
18+
19+ fn unary < G : Scope > ( constructor : impl FnOnce ( G :: Timestamp ) ) {
20+ constructor ( None . unwrap ( ) ) ;
21+ }
You can’t perform that action at this time.
0 commit comments