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 @@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
10
10
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
11
11
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
12
12
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13
- refs/heads/auto: ad7e33efee023822bd63fa6f942c25582ef12a1e
13
+ refs/heads/auto: 02d0a8bbcf0a64339e4279c4ddb4841189ba5069
14
14
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
15
15
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
16
16
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
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