|
| 1 | +error[E0391]: cycle detected when expanding type alias `Alias` |
| 2 | + --> $DIR/type-alias-bounds-are-enforced.rs:19:1 |
| 3 | + | |
| 4 | +LL | pub type Alias<T: Bound> = (Source<T>::Assoc,); |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | +note: ...which requires computing the variances of `Source`... |
| 8 | + --> $DIR/type-alias-bounds-are-enforced.rs:21:1 |
| 9 | + | |
| 10 | +LL | pub struct Source<T>(T); |
| 11 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 12 | + = note: ...which requires computing the variances for items in this crate... |
| 13 | + = note: ...which again requires expanding type alias `Alias`, completing the cycle |
| 14 | +note: cycle used when collecting item types in top-level module |
| 15 | + --> $DIR/type-alias-bounds-are-enforced.rs:5:1 |
| 16 | + | |
| 17 | +LL | / #![feature(inherent_associated_types)] |
| 18 | +LL | | #![allow(incomplete_features)] |
| 19 | +LL | | |
| 20 | +LL | | // Bounds on the self type play a major role in the resolution of inherent associated types (*). |
| 21 | +... | |
| 22 | +LL | | pub type Assoc = (); |
| 23 | +LL | | } |
| 24 | + | |_^ |
| 25 | + = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information |
| 26 | + |
| 27 | +error[E0391]: cycle detected when expanding type alias `Alias` |
| 28 | + --> $DIR/type-alias-bounds-are-enforced.rs:19:1 |
| 29 | + | |
| 30 | +LL | pub type Alias<T: Bound> = (Source<T>::Assoc,); |
| 31 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ |
| 32 | + | |
| 33 | +note: ...which requires computing the variances of `Source`... |
| 34 | + --> $DIR/type-alias-bounds-are-enforced.rs:21:1 |
| 35 | + | |
| 36 | +LL | pub struct Source<T>(T); |
| 37 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 38 | + = note: ...which requires computing the variances for items in this crate... |
| 39 | + = note: ...which again requires expanding type alias `Alias`, completing the cycle |
| 40 | +note: cycle used when collecting item types in top-level module |
| 41 | + --> $DIR/type-alias-bounds-are-enforced.rs:5:1 |
| 42 | + | |
| 43 | +LL | / #![feature(inherent_associated_types)] |
| 44 | +LL | | #![allow(incomplete_features)] |
| 45 | +LL | | |
| 46 | +LL | | // Bounds on the self type play a major role in the resolution of inherent associated types (*). |
| 47 | +... | |
| 48 | +LL | | pub type Assoc = (); |
| 49 | +LL | | } |
| 50 | + | |_^ |
| 51 | + = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information |
| 52 | + |
| 53 | +error: aborting due to 2 previous errors |
| 54 | + |
| 55 | +For more information about this error, try `rustc --explain E0391`. |
0 commit comments