File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -3087,6 +3087,29 @@ impl Foo for Bar {
3087
3087
```
3088
3088
"## ,
3089
3089
3090
+ E0328 : r##"
3091
+ The Unsize trait should not be implemented directly. All implementations of
3092
+ Unsize are provided automatically by the compiler.
3093
+
3094
+ Here's an example of this error:
3095
+
3096
+ ```compile_fail,E0328
3097
+ #![feature(unsize)]
3098
+
3099
+ use std::marker::Unsize;
3100
+
3101
+ pub struct MyType;
3102
+
3103
+ impl<T> Unsize<T> for MyType {}
3104
+ ```
3105
+
3106
+ If you are defining your own smart pointer type and would like to enable
3107
+ conversion from a sized to an unsized type with the [DST coercion system]
3108
+ (https://github.com/rust-lang/rfcs/blob/master/text/0982-dst-coercion.md), use
3109
+ [`CoerceUnsized`](https://doc.rust-lang.org/std/ops/trait.CoerceUnsized.html)
3110
+ instead.
3111
+ "## ,
3112
+
3090
3113
E0329 : r##"
3091
3114
An attempt was made to access an associated constant through either a generic
3092
3115
type parameter or `Self`. This is not supported yet. An example causing this
@@ -4195,7 +4218,6 @@ register_diagnostics! {
4195
4218
// E0249,
4196
4219
// E0319, // trait impls for defaulted traits allowed just for structs/enums
4197
4220
E0320 , // recursive overflow during dropck
4198
- E0328 , // cannot implement Unsize explicitly
4199
4221
// E0372, // coherence not object safe
4200
4222
E0377 , // the trait `CoerceUnsized` may only be implemented for a coercion
4201
4223
// between structures with the same definition
You can’t perform that action at this time.
0 commit comments