@@ -41,6 +41,7 @@ macro_rules! forward {
41
41
// Forward pattern for &self -> &Self
42
42
( pub fn $n: ident( & self , $( $name: ident: $ty: ty) ,* ) -> & Self ) => {
43
43
pub fn $n( & self , $( $name: $ty) ,* ) -> & Self {
44
+ #[ allow( deprecated) ]
44
45
self . diagnostic. $n( $( $name) ,* ) ;
45
46
self
46
47
}
@@ -49,6 +50,7 @@ macro_rules! forward {
49
50
// Forward pattern for &mut self -> &mut Self
50
51
( pub fn $n: ident( & mut self , $( $name: ident: $ty: ty) ,* ) -> & mut Self ) => {
51
52
pub fn $n( & mut self , $( $name: $ty) ,* ) -> & mut Self {
53
+ #[ allow( deprecated) ]
52
54
self . diagnostic. $n( $( $name) ,* ) ;
53
55
self
54
56
}
@@ -58,6 +60,7 @@ macro_rules! forward {
58
60
// type parameter. No obvious way to make this more generic.
59
61
( pub fn $n: ident<S : Into <MultiSpan >>( & mut self , $( $name: ident: $ty: ty) ,* ) -> & mut Self ) => {
60
62
pub fn $n<S : Into <MultiSpan >>( & mut self , $( $name: $ty) ,* ) -> & mut Self {
63
+ #[ allow( deprecated) ]
61
64
self . diagnostic. $n( $( $name) ,* ) ;
62
65
self
63
66
}
@@ -167,21 +170,29 @@ impl<'a> DiagnosticBuilder<'a> {
167
170
sp: S ,
168
171
msg: & str )
169
172
-> & mut Self ) ;
173
+
174
+ #[ deprecated( note = "Use `span_suggestion_short_with_applicability`" ) ]
170
175
forward ! ( pub fn span_suggestion_short( & mut self ,
171
176
sp: Span ,
172
177
msg: & str ,
173
178
suggestion: String )
174
179
-> & mut Self ) ;
180
+
181
+ #[ deprecated( note = "Use `multipart_suggestion_with_applicability`" ) ]
175
182
forward ! ( pub fn multipart_suggestion(
176
183
& mut self ,
177
184
msg: & str ,
178
185
suggestion: Vec <( Span , String ) >
179
186
) -> & mut Self ) ;
187
+
188
+ #[ deprecated( note = "Use `span_suggestion_with_applicability`" ) ]
180
189
forward ! ( pub fn span_suggestion( & mut self ,
181
190
sp: Span ,
182
191
msg: & str ,
183
192
suggestion: String )
184
193
-> & mut Self ) ;
194
+
195
+ #[ deprecated( note = "Use `span_suggestions_with_applicability`" ) ]
185
196
forward ! ( pub fn span_suggestions( & mut self ,
186
197
sp: Span ,
187
198
msg: & str ,
0 commit comments