Skip to content

Commit f8fb24f

Browse files
committed
Add explanation message for E0203
1 parent fe969f4 commit f8fb24f

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

src/librustc_error_codes/error_codes.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ E0199: include_str!("./error_codes/E0199.md"),
107107
E0200: include_str!("./error_codes/E0200.md"),
108108
E0201: include_str!("./error_codes/E0201.md"),
109109
E0202: include_str!("./error_codes/E0202.md"),
110+
E0203: include_str!("./error_codes/E0203.md"),
110111
E0204: include_str!("./error_codes/E0204.md"),
111112
E0205: include_str!("./error_codes/E0205.md"),
112113
E0206: include_str!("./error_codes/E0206.md"),
@@ -446,8 +447,6 @@ E0745: include_str!("./error_codes/E0745.md"),
446447
// E0190, // deprecated: can only cast a &-pointer to an &-object
447448
// E0194, // merged into E0403
448449
// E0196, // cannot determine a type for this closure
449-
E0203, // type parameter has more than one relaxed default bound,
450-
// and only one is supported
451450
E0208,
452451
// E0209, // builtin traits can only be implemented on structs or enums
453452
E0212, // cannot extract an associated type from a higher-ranked trait bound
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Having multiple relaxed default bounds is unsuported.
2+
3+
Erroneous code example:
4+
5+
```compile_fail,E0203
6+
7+
trait Foo {}
8+
9+
struct S5<T>(*const T) where T: ?Foo + ?Sized;
10+
```
11+
12+
Here the type `T` cannot have a relaxed bound for both `Foo` and `Sized`

src/test/ui/maybe-bounds-where.stderr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ LL | struct S5<T>(*const T) where T: ?Trait<'static> + ?Sized;
4242

4343
error: aborting due to 6 previous errors
4444

45+
For more information about this error, try `rustc --explain E0203`.

0 commit comments

Comments
 (0)