@@ -183,9 +183,9 @@ declare_lint_pass!(Write => [
183183
184184impl EarlyLintPass for Write {
185185 fn check_mac ( & mut self , cx : & EarlyContext < ' _ > , mac : & Mac ) {
186- if mac. node . path == sym ! ( println) {
186+ if mac. path == sym ! ( println) {
187187 span_lint ( cx, PRINT_STDOUT , mac. span , "use of `println!`" ) ;
188- if let ( Some ( fmt_str) , _) = check_tts ( cx, & mac. node . tts , false ) {
188+ if let ( Some ( fmt_str) , _) = check_tts ( cx, & mac. tts , false ) {
189189 if fmt_str. contents . is_empty ( ) {
190190 span_lint_and_sugg (
191191 cx,
@@ -198,9 +198,9 @@ impl EarlyLintPass for Write {
198198 ) ;
199199 }
200200 }
201- } else if mac. node . path == sym ! ( print) {
201+ } else if mac. path == sym ! ( print) {
202202 span_lint ( cx, PRINT_STDOUT , mac. span , "use of `print!`" ) ;
203- if let ( Some ( fmt_str) , _) = check_tts ( cx, & mac. node . tts , false ) {
203+ if let ( Some ( fmt_str) , _) = check_tts ( cx, & mac. tts , false ) {
204204 if check_newlines ( & fmt_str) {
205205 span_lint_and_then (
206206 cx,
@@ -211,7 +211,7 @@ impl EarlyLintPass for Write {
211211 err. multipart_suggestion (
212212 "use `println!` instead" ,
213213 vec ! [
214- ( mac. node . path. span, String :: from( "println" ) ) ,
214+ ( mac. path. span, String :: from( "println" ) ) ,
215215 ( fmt_str. newline_span( ) , String :: new( ) ) ,
216216 ] ,
217217 Applicability :: MachineApplicable ,
@@ -220,8 +220,8 @@ impl EarlyLintPass for Write {
220220 ) ;
221221 }
222222 }
223- } else if mac. node . path == sym ! ( write) {
224- if let ( Some ( fmt_str) , _) = check_tts ( cx, & mac. node . tts , true ) {
223+ } else if mac. path == sym ! ( write) {
224+ if let ( Some ( fmt_str) , _) = check_tts ( cx, & mac. tts , true ) {
225225 if check_newlines ( & fmt_str) {
226226 span_lint_and_then (
227227 cx,
@@ -232,7 +232,7 @@ impl EarlyLintPass for Write {
232232 err. multipart_suggestion (
233233 "use `writeln!()` instead" ,
234234 vec ! [
235- ( mac. node . path. span, String :: from( "writeln" ) ) ,
235+ ( mac. path. span, String :: from( "writeln" ) ) ,
236236 ( fmt_str. newline_span( ) , String :: new( ) ) ,
237237 ] ,
238238 Applicability :: MachineApplicable ,
@@ -241,8 +241,8 @@ impl EarlyLintPass for Write {
241241 )
242242 }
243243 }
244- } else if mac. node . path == sym ! ( writeln) {
245- if let ( Some ( fmt_str) , expr) = check_tts ( cx, & mac. node . tts , true ) {
244+ } else if mac. path == sym ! ( writeln) {
245+ if let ( Some ( fmt_str) , expr) = check_tts ( cx, & mac. tts , true ) {
246246 if fmt_str. contents . is_empty ( ) {
247247 let mut applicability = Applicability :: MachineApplicable ;
248248 let suggestion = expr. map_or_else (
0 commit comments