This repository was archived by the owner on May 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +79
-0
lines changed Expand file tree Collapse file tree 5 files changed +79
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ rustc -Z save-analysis - << EOF
4+ fn main() {
5+ [(); { for _ in 0usize.. {}; 0}];
6+ }
7+
8+ EOF
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ rustc -Z mir-opt-level=2 - << EOF
4+ #![crate_type = "lib"]
5+
6+ // Error won't happen if "bar" is not generic
7+ pub fn bar<P>(_baz: P) {
8+ hide_foo()();
9+ }
10+
11+ // Error won't happen if "iterate" hasn't impl Trait or has generics
12+ fn hide_foo() -> impl Fn() {
13+ foo
14+ }
15+
16+ // Error won't happen if "foo" isn't used in "iterate" or has generics
17+ fn foo() {}
18+
19+ EOF
Original file line number Diff line number Diff line change 1+ #![ feature( type_alias_impl_trait) ]
2+ #![ no_std]
3+ #![ crate_type = "lib" ]
4+
5+ pub trait AssociatedImpl {
6+ type ImplTrait ;
7+
8+ fn f ( ) -> Self :: ImplTrait ;
9+ }
10+
11+ trait DynTrait < ' a > { }
12+
13+ struct S < T > ( T ) ;
14+
15+ trait Associated {
16+ type A ;
17+ }
18+
19+ impl < ' a , T : Associated < A = dyn DynTrait < ' a > > > AssociatedImpl for S < T > {
20+ type ImplTrait = impl core:: future:: Future < Output = ( ) > ;
21+
22+ fn f ( ) -> Self :: ImplTrait {
23+ async { ( ) }
24+ }
25+ }
Original file line number Diff line number Diff line change 1+ #![ feature( type_alias_impl_trait) ]
2+ #![ no_std]
3+
4+ pub trait Tr < ' x > {
5+ type Fut : core:: future:: Future < Output = ( ) > ;
6+
7+ fn f ( ) -> Self :: Fut ;
8+ }
9+
10+ impl < ' x > Tr < ' x > for ( ) {
11+ type Fut = impl core:: future:: Future < Output = ( ) > ;
12+
13+ fn f ( ) -> Self :: Fut {
14+ async {
15+ //if false {
16+ return ( ) ;
17+ //}
18+ let res: Undef = ( ) ;
19+ res
20+ }
21+ }
22+ }
Original file line number Diff line number Diff line change 1+ #![ feature( allocator_api) ]
2+
3+ fn main ( ) {
4+ Box :: new_in ( & [ 0 , 1 ] , & std:: alloc:: Global ) ;
5+ }
You can’t perform that action at this time.
0 commit comments