diff options
| author | bors <bors@rust-lang.org> | 2019-12-01 06:00:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-12-01 06:00:33 +0000 |
| commit | 4007d4ef26eab44bdabc2b7574d032152264d3ad (patch) | |
| tree | feada823fc5b16040da2f7aba36cda434f0b2fa4 /src/librustc_error_codes | |
| parent | 135ccbaca86ed4b9c0efaf0cd31442eae57ffad7 (diff) | |
| parent | bed4c09d21aceb440ee61091b68dd653da32b45b (diff) | |
| download | rust-4007d4ef26eab44bdabc2b7574d032152264d3ad.tar.gz rust-4007d4ef26eab44bdabc2b7574d032152264d3ad.zip | |
Auto merge of #66917 - Centril:rollup-xj2enik, r=Centril
Rollup of 9 pull requests Successful merges: - #66503 (More useful test error messages on should_panic(expected=...) mismatch) - #66662 (Miri: run panic-catching tests in liballoc) - #66679 (Improve lifetime errors with implicit trait object lifetimes) - #66726 (Use recursion_limit for const eval stack limit) - #66790 (Do `min_const_fn` checks for `SetDiscriminant`s target) - #66832 (const_prop: detect and avoid catching Miri errors that require allocation) - #66880 (Add long error code explanation message for E0203) - #66890 (Format liballoc with rustfmt) - #66896 (pass Queries to compiler callbacks) Failed merges: r? @ghost
Diffstat (limited to 'src/librustc_error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes.rs | 3 | ||||
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0203.md | 18 |
2 files changed, 19 insertions, 2 deletions
diff --git a/src/librustc_error_codes/error_codes.rs b/src/librustc_error_codes/error_codes.rs index 709ccce517a..7f111b42403 100644 --- a/src/librustc_error_codes/error_codes.rs +++ b/src/librustc_error_codes/error_codes.rs @@ -107,6 +107,7 @@ E0199: include_str!("./error_codes/E0199.md"), E0200: include_str!("./error_codes/E0200.md"), E0201: include_str!("./error_codes/E0201.md"), E0202: include_str!("./error_codes/E0202.md"), +E0203: include_str!("./error_codes/E0203.md"), E0204: include_str!("./error_codes/E0204.md"), E0205: include_str!("./error_codes/E0205.md"), E0206: include_str!("./error_codes/E0206.md"), @@ -446,8 +447,6 @@ E0745: include_str!("./error_codes/E0745.md"), // E0190, // deprecated: can only cast a &-pointer to an &-object // E0194, // merged into E0403 // E0196, // cannot determine a type for this closure - E0203, // type parameter has more than one relaxed default bound, - // and only one is supported E0208, // E0209, // builtin traits can only be implemented on structs or enums E0212, // cannot extract an associated type from a higher-ranked trait bound diff --git a/src/librustc_error_codes/error_codes/E0203.md b/src/librustc_error_codes/error_codes/E0203.md new file mode 100644 index 00000000000..1edb519275f --- /dev/null +++ b/src/librustc_error_codes/error_codes/E0203.md @@ -0,0 +1,18 @@ +Having multiple relaxed default bounds is unsupported. + +Erroneous code example: + +```compile_fail,E0203 +struct Bad<T: ?Sized + ?Send>{ + inner: T +} +``` + +Here the type `T` cannot have a relaxed bound for multiple default traits +(`Sized` and `Send`). This can be fixed by only using one relaxed bound. + +``` +struct Good<T: ?Sized>{ + inner: T +} +``` |
