Skip to content

Commit ba32469

Browse files
committed
Auto merge of #27318 - soon:E0391_explanation, r=nrc
Part of #24407
2 parents 55ede7e + 9125400 commit ba32469

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/librustc_typeck/diagnostics.rs

+17-1
Original file line numberDiff line numberDiff line change
@@ -2215,6 +2215,23 @@ For more information see the [opt-in builtin traits RFC](https://github.com/rust
22152215
-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md).
22162216
"##,
22172217

2218+
E0391: r##"
2219+
This error indicates that some types or traits depend on each other
2220+
and therefore cannot be constructed.
2221+
2222+
The following example contains a circular dependency between two traits:
2223+
2224+
```
2225+
trait FirstTrait : SecondTrait {
2226+
2227+
}
2228+
2229+
trait SecondTrait : FirstTrait {
2230+
2231+
}
2232+
```
2233+
"##,
2234+
22182235
E0392: r##"
22192236
This error indicates that a type or lifetime parameter has been declared
22202237
but not actually used. Here is an example that demonstrates the error:
@@ -2370,7 +2387,6 @@ register_diagnostics! {
23702387
// between structures with the same definition
23712388
E0390, // only a single inherent implementation marked with
23722389
// `#[lang = \"{}\"]` is allowed for the `{}` primitive
2373-
E0391, // unsupported cyclic reference between types/traits detected
23742390
E0393, // the type parameter `{}` must be explicitly specified in an object
23752391
// type because its default value `{}` references the type `Self`"
23762392
E0399, // trait items need to be implemented because the associated

0 commit comments

Comments
 (0)