File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
31
31
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
32
32
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
33
33
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34
- refs/heads/beta: ad7e33efee023822bd63fa6f942c25582ef12a1e
34
+ refs/heads/beta: 02d0a8bbcf0a64339e4279c4ddb4841189ba5069
35
35
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
36
36
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37
37
refs/heads/tmp: eb836bf767aa1d8d4cba488a9091cde3c0ab4b2f
Original file line number Diff line number Diff line change @@ -2117,6 +2117,13 @@ macro scope.
2117
2117
destructors from being run twice. Destructors might be run multiple times on
2118
2118
the same object with this attribute.
2119
2119
- ` doc ` - Doc comments such as ` /// foo ` are equivalent to ` #[doc = "foo"] ` .
2120
+ - ` rustc_on_unimplemented ` - Write a custom note to be shown along with the error
2121
+ when the trait is found to be unimplemented on a type.
2122
+ You may use format arguments like ` {T} ` , ` {A} ` to correspond to the
2123
+ types at the point of use corresponding to the type parameters of the
2124
+ trait of the same name. ` {Self} ` will be replaced with the type that is supposed
2125
+ to implement the trait but doesn't. To use this, the ` on_unimplemented ` feature gate
2126
+ must be enabled.
2120
2127
2121
2128
### Conditional compilation
2122
2129
Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ trait BadAnnotation1 {}
29
29
//~^ ERROR there is no type parameter C on trait BadAnnotation2
30
30
trait BadAnnotation2 < A , B > { }
31
31
32
+ #[ rustc_on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{}>`" ]
33
+ //~^ only named substitution parameters are allowed
34
+ trait BadAnnotation3 < A , B > { }
32
35
33
36
pub fn main ( ) {
34
37
}
You can’t perform that action at this time.
0 commit comments