File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed
tests/ui/type-alias-impl-trait Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 44// FIXME This should compile, but it currently doesn't
55
66mod m {
7- type Foo = impl std:: fmt:: Debug ;
7+ pub type Foo = impl std:: fmt:: Debug ;
88 //~^ ERROR: cycle detected when computing type of `m::Foo::{opaque#0}` [E0391]
99
1010 pub fn foo ( ) -> Foo {
Original file line number Diff line number Diff line change 11error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`
2- --> $DIR/auto-trait-leakage3.rs:7:16
2+ --> $DIR/auto-trait-leakage3.rs:7:20
33 |
4- LL | type Foo = impl std::fmt::Debug;
5- | ^^^^^^^^^^^^^^^^^^^^
4+ LL | pub type Foo = impl std::fmt::Debug;
5+ | ^^^^^^^^^^^^^^^^^^^^
66 |
77note: ...which requires type-checking `m::bar`...
88 --> $DIR/auto-trait-leakage3.rs:15:9
Original file line number Diff line number Diff line change 22#![ allow( dead_code) ]
33
44mod m {
5- type Foo = impl std:: fmt:: Debug ;
5+ pub type Foo = impl std:: fmt:: Debug ;
66 //~^ ERROR cycle detected
77
88 // Cycle: error today, but it'd be nice if it eventually worked
@@ -16,7 +16,7 @@ mod m {
1616 }
1717
1818 fn baz ( ) {
19- let f: Foo = 22_u32 ;
19+ let f: Foo = ( ) ;
2020 }
2121
2222 fn is_send < T : Send > ( _: T ) { }
Original file line number Diff line number Diff line change 11error[E0391]: cycle detected when computing type of `m::Foo::{opaque#0}`
2- --> $DIR/inference-cycle.rs:5:16
2+ --> $DIR/inference-cycle.rs:5:20
33 |
4- LL | type Foo = impl std::fmt::Debug;
5- | ^^^^^^^^^^^^^^^^^^^^
4+ LL | pub type Foo = impl std::fmt::Debug;
5+ | ^^^^^^^^^^^^^^^^^^^^
66 |
77note: ...which requires type-checking `m::bar`...
88 --> $DIR/inference-cycle.rs:15:9
You can’t perform that action at this time.
0 commit comments