File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -262,7 +262,7 @@ pub fn get_lint_dict() -> LintDict {
262
262
( ~"unused_unsafe",
263
263
LintSpec {
264
264
lint : unused_unsafe,
265
- desc : "unnecessary use of an \" unsafe\" block" ,
265
+ desc : "unnecessary use of an ` unsafe` block" ,
266
266
default : warn
267
267
} ) ,
268
268
@@ -949,7 +949,7 @@ fn check_item_unused_unsafe(cx: ty::ctxt, it: @ast::item) {
949
949
if !cx. used_unsafe . contains ( & blk. node . id ) {
950
950
cx. sess . span_lint ( unused_unsafe, blk. node . id , it. id ,
951
951
blk. span ,
952
- ~"unnecessary \" unsafe \" block") ;
952
+ ~"unnecessary ` unsafe ` block") ;
953
953
}
954
954
}
955
955
_ => ( )
Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ use core::libc;
16
16
17
17
fn callback < T > ( _f : & fn ( ) -> T ) -> T { fail ! ( ) }
18
18
19
- fn bad1 ( ) { unsafe { } } //~ ERROR: unnecessary " unsafe" block
20
- fn bad2 ( ) { unsafe { bad1 ( ) } } //~ ERROR: unnecessary " unsafe" block
21
- unsafe fn bad4 ( ) { unsafe { } } //~ ERROR: unnecessary " unsafe" block
22
- fn bad5 ( ) { unsafe { do callback { } } } //~ ERROR: unnecessary " unsafe" block
19
+ fn bad1 ( ) { unsafe { } } //~ ERROR: unnecessary ` unsafe` block
20
+ fn bad2 ( ) { unsafe { bad1 ( ) } } //~ ERROR: unnecessary ` unsafe` block
21
+ unsafe fn bad4 ( ) { unsafe { } } //~ ERROR: unnecessary ` unsafe` block
22
+ fn bad5 ( ) { unsafe { do callback { } } } //~ ERROR: unnecessary ` unsafe` block
23
23
24
24
unsafe fn good0 ( ) { libc:: exit ( 1 ) }
25
25
fn good1 ( ) { unsafe { libc:: exit ( 1 ) } }
You can’t perform that action at this time.
0 commit comments