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 4
4
// FIXME This should compile, but it currently doesn't
5
5
6
6
mod m {
7
- type Foo = impl std:: fmt:: Debug ;
7
+ pub type Foo = impl std:: fmt:: Debug ;
8
8
//~^ ERROR: cycle detected when computing type of `m::Foo::{opaque#0}` [E0391]
9
9
10
10
pub fn foo ( ) -> Foo {
Original file line number Diff line number Diff line change 1
1
error[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
3
3
|
4
- LL | type Foo = impl std::fmt::Debug;
5
- | ^^^^^^^^^^^^^^^^^^^^
4
+ LL | pub type Foo = impl std::fmt::Debug;
5
+ | ^^^^^^^^^^^^^^^^^^^^
6
6
|
7
7
note: ...which requires type-checking `m::bar`...
8
8
--> $DIR/auto-trait-leakage3.rs:15:9
Original file line number Diff line number Diff line change 2
2
#![ allow( dead_code) ]
3
3
4
4
mod m {
5
- type Foo = impl std:: fmt:: Debug ;
5
+ pub type Foo = impl std:: fmt:: Debug ;
6
6
//~^ ERROR cycle detected
7
7
8
8
// Cycle: error today, but it'd be nice if it eventually worked
@@ -16,7 +16,7 @@ mod m {
16
16
}
17
17
18
18
fn baz ( ) {
19
- let f: Foo = 22_u32 ;
19
+ let f: Foo = ( ) ;
20
20
}
21
21
22
22
fn is_send < T : Send > ( _: T ) { }
Original file line number Diff line number Diff line change 1
1
error[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
3
3
|
4
- LL | type Foo = impl std::fmt::Debug;
5
- | ^^^^^^^^^^^^^^^^^^^^
4
+ LL | pub type Foo = impl std::fmt::Debug;
5
+ | ^^^^^^^^^^^^^^^^^^^^
6
6
|
7
7
note: ...which requires type-checking `m::bar`...
8
8
--> $DIR/inference-cycle.rs:15:9
You can’t perform that action at this time.
0 commit comments