File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
compiler/rustc_passes/src Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1862,11 +1862,11 @@ impl CheckAttrVisitor<'_> {
1862
1862
1863
1863
match std:: fs:: File :: open ( & file) {
1864
1864
Ok ( _) => true ,
1865
- Err ( err ) => {
1865
+ Err ( error ) => {
1866
1866
self . tcx . sess . emit_err ( DebugVisualizerUnreadable {
1867
1867
span : meta_item. span ,
1868
1868
file : & file,
1869
- error : err ,
1869
+ error,
1870
1870
} ) ;
1871
1871
false
1872
1872
}
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ impl<'tcx> LanguageItemCollector<'tcx> {
35
35
36
36
fn check_for_lang ( & mut self , actual_target : Target , hir_id : HirId ) {
37
37
let attrs = self . tcx . hir ( ) . attrs ( hir_id) ;
38
- if let Some ( ( value , span) ) = extract ( & attrs) {
39
- match ITEM_REFS . get ( & value ) . cloned ( ) {
38
+ if let Some ( ( name , span) ) = extract ( & attrs) {
39
+ match ITEM_REFS . get ( & name ) . cloned ( ) {
40
40
// Known lang item with attribute on correct target.
41
41
Some ( ( item_index, expected_target) ) if actual_target == expected_target => {
42
42
self . collect_item_extended ( item_index, hir_id, span) ;
@@ -45,14 +45,14 @@ impl<'tcx> LanguageItemCollector<'tcx> {
45
45
Some ( ( _, expected_target) ) => {
46
46
self . tcx . sess . emit_err ( LangItemOnIncorrectTarget {
47
47
span,
48
- name : value ,
48
+ name,
49
49
expected_target,
50
50
actual_target,
51
51
} ) ;
52
52
}
53
53
// Unknown lang item.
54
54
_ => {
55
- self . tcx . sess . emit_err ( UnknownLangItem { span, name : value } ) ;
55
+ self . tcx . sess . emit_err ( UnknownLangItem { span, name } ) ;
56
56
}
57
57
}
58
58
}
You can’t perform that action at this time.
0 commit comments