File tree Expand file tree Collapse file tree 18 files changed +76
-87
lines changed
wasi-common/src/snapshots
wasmtime/src/runtime/func Expand file tree Collapse file tree 18 files changed +76
-87
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,10 @@ unused-macro-rules = 'warn'
183
183
# bit too noisy to enable wholesale but some selective items are ones we want to
184
184
# opt-in to.
185
185
keyword_idents_2024 = ' warn'
186
+ deprecated-safe-2024 = ' warn'
187
+ rust-2024-guarded-string-incompatible-syntax = ' warn'
188
+ rust-2024-prelude-collisions = ' warn'
189
+ rust-2024-incompatible-pat = ' warn'
186
190
187
191
# Don't warn about unknown cfgs for pulley
188
192
[workspace .lints .rust .unexpected_cfgs ]
Original file line number Diff line number Diff line change @@ -1262,11 +1262,7 @@ impl DataFlowGraph {
1262
1262
{
1263
1263
// We update the position of the old last arg.
1264
1264
let mut last_arg_data = ValueData :: from ( self . values [ last_arg_val] ) ;
1265
- if let ValueData :: Param {
1266
- num : ref mut old_num,
1267
- ..
1268
- } = & mut last_arg_data
1269
- {
1265
+ if let ValueData :: Param { num : old_num, .. } = & mut last_arg_data {
1270
1266
* old_num = num;
1271
1267
self . values [ last_arg_val] = last_arg_data. into ( ) ;
1272
1268
} else {
@@ -1295,7 +1291,7 @@ impl DataFlowGraph {
1295
1291
. unwrap ( ) ] ;
1296
1292
let mut data = ValueData :: from ( * packed) ;
1297
1293
match & mut data {
1298
- ValueData :: Param { ref mut num, .. } => {
1294
+ ValueData :: Param { num, .. } => {
1299
1295
* num -= 1 ;
1300
1296
* packed = data. into ( ) ;
1301
1297
}
Original file line number Diff line number Diff line change @@ -307,9 +307,7 @@ impl InstructionData {
307
307
/// `br_table` returns the empty slice.
308
308
pub fn branch_destination < ' a > ( & ' a self , jump_tables : & ' a ir:: JumpTables ) -> & ' a [ BlockCall ] {
309
309
match self {
310
- Self :: Jump {
311
- ref destination, ..
312
- } => std:: slice:: from_ref ( destination) ,
310
+ Self :: Jump { destination, .. } => std:: slice:: from_ref ( destination) ,
313
311
Self :: Brif { blocks, .. } => blocks. as_slice ( ) ,
314
312
Self :: BranchTable { table, .. } => jump_tables. get ( * table) . unwrap ( ) . all_branches ( ) ,
315
313
_ => {
@@ -327,10 +325,7 @@ impl InstructionData {
327
325
jump_tables : & ' a mut ir:: JumpTables ,
328
326
) -> & ' a mut [ BlockCall ] {
329
327
match self {
330
- Self :: Jump {
331
- ref mut destination,
332
- ..
333
- } => std:: slice:: from_mut ( destination) ,
328
+ Self :: Jump { destination, .. } => std:: slice:: from_mut ( destination) ,
334
329
Self :: Brif { blocks, .. } => blocks. as_mut_slice ( ) ,
335
330
Self :: BranchTable { table, .. } => {
336
331
jump_tables. get_mut ( * table) . unwrap ( ) . all_branches_mut ( )
Original file line number Diff line number Diff line change @@ -965,15 +965,15 @@ impl<'a> FactContext<'a> {
965
965
} ,
966
966
Fact :: DynamicRange {
967
967
bit_width : bw_dynamic,
968
- min : ref min_dynamic,
969
- max : ref max_dynamic,
968
+ min : min_dynamic,
969
+ max : max_dynamic,
970
970
} ,
971
971
)
972
972
| (
973
973
Fact :: DynamicRange {
974
974
bit_width : bw_dynamic,
975
- min : ref min_dynamic,
976
- max : ref max_dynamic,
975
+ min : min_dynamic,
976
+ max : max_dynamic,
977
977
} ,
978
978
Fact :: Range {
979
979
bit_width : bw_static,
@@ -1070,16 +1070,16 @@ impl<'a> FactContext<'a> {
1070
1070
} ,
1071
1071
Fact :: DynamicMem {
1072
1072
ty,
1073
- min : ref min_dynamic,
1074
- max : ref max_dynamic,
1073
+ min : min_dynamic,
1074
+ max : max_dynamic,
1075
1075
nullable,
1076
1076
} ,
1077
1077
)
1078
1078
| (
1079
1079
Fact :: DynamicMem {
1080
1080
ty,
1081
- min : ref min_dynamic,
1082
- max : ref max_dynamic,
1081
+ min : min_dynamic,
1082
+ max : max_dynamic,
1083
1083
nullable,
1084
1084
} ,
1085
1085
Fact :: Range {
Original file line number Diff line number Diff line change @@ -1036,12 +1036,12 @@ impl ABIMachineSpec for AArch64MachineDeps {
1036
1036
1037
1037
fn gen_call ( dest : & CallDest , tmp : Writable < Reg > , info : CallInfo < ( ) > ) -> SmallVec < [ Inst ; 2 ] > {
1038
1038
let mut insts = SmallVec :: new ( ) ;
1039
- match & dest {
1040
- & CallDest :: ExtName ( ref name, RelocDistance :: Near ) => {
1039
+ match dest {
1040
+ CallDest :: ExtName ( name, RelocDistance :: Near ) => {
1041
1041
let info = Box :: new ( info. map ( |( ) | name. clone ( ) ) ) ;
1042
1042
insts. push ( Inst :: Call { info } ) ;
1043
1043
}
1044
- & CallDest :: ExtName ( ref name, RelocDistance :: Far ) => {
1044
+ CallDest :: ExtName ( name, RelocDistance :: Far ) => {
1045
1045
insts. push ( Inst :: LoadExtName {
1046
1046
rd : tmp,
1047
1047
name : Box :: new ( name. clone ( ) ) ,
@@ -1050,7 +1050,7 @@ impl ABIMachineSpec for AArch64MachineDeps {
1050
1050
let info = Box :: new ( info. map ( |( ) | tmp. to_reg ( ) ) ) ;
1051
1051
insts. push ( Inst :: CallInd { info } ) ;
1052
1052
}
1053
- & CallDest :: Reg ( reg) => {
1053
+ CallDest :: Reg ( reg) => {
1054
1054
let info = Box :: new ( info. map ( |( ) | * reg) ) ;
1055
1055
insts. push ( Inst :: CallInd { info } ) ;
1056
1056
}
Original file line number Diff line number Diff line change @@ -558,11 +558,11 @@ impl ABIMachineSpec for Riscv64MachineDeps {
558
558
fn gen_call ( dest : & CallDest , tmp : Writable < Reg > , info : CallInfo < ( ) > ) -> SmallVec < [ Self :: I ; 2 ] > {
559
559
let mut insts = SmallVec :: new ( ) ;
560
560
match & dest {
561
- & CallDest :: ExtName ( ref name, RelocDistance :: Near ) => {
561
+ CallDest :: ExtName ( name, RelocDistance :: Near ) => {
562
562
let info = Box :: new ( info. map ( |( ) | name. clone ( ) ) ) ;
563
563
insts. push ( Inst :: Call { info } )
564
564
}
565
- & CallDest :: ExtName ( ref name, RelocDistance :: Far ) => {
565
+ CallDest :: ExtName ( name, RelocDistance :: Far ) => {
566
566
insts. push ( Inst :: LoadExtName {
567
567
rd : tmp,
568
568
name : Box :: new ( name. clone ( ) ) ,
@@ -571,7 +571,7 @@ impl ABIMachineSpec for Riscv64MachineDeps {
571
571
let info = Box :: new ( info. map ( |( ) | tmp. to_reg ( ) ) ) ;
572
572
insts. push ( Inst :: CallInd { info } ) ;
573
573
}
574
- & CallDest :: Reg ( reg) => {
574
+ CallDest :: Reg ( reg) => {
575
575
let info = Box :: new ( info. map ( |( ) | * reg) ) ;
576
576
insts. push ( Inst :: CallInd { info } ) ;
577
577
}
Original file line number Diff line number Diff line change @@ -1588,8 +1588,8 @@ impl Inst {
1588
1588
eew,
1589
1589
to,
1590
1590
from,
1591
- ref mask,
1592
- ref vstate,
1591
+ mask,
1592
+ vstate,
1593
1593
..
1594
1594
} => {
1595
1595
let base = format_vec_amode ( from) ;
@@ -1602,8 +1602,8 @@ impl Inst {
1602
1602
eew,
1603
1603
to,
1604
1604
from,
1605
- ref mask,
1606
- ref vstate,
1605
+ mask,
1606
+ vstate,
1607
1607
..
1608
1608
} => {
1609
1609
let dst = format_vec_amode ( to) ;
Original file line number Diff line number Diff line change @@ -505,7 +505,7 @@ impl PrettyPrint for Amode {
505
505
pretty_print_reg( index. to_reg( ) , 8 ) ,
506
506
1 << shift
507
507
) ,
508
- Amode :: RipRelative { ref target } => format ! ( "label{}(%rip)" , target. get( ) ) ,
508
+ Amode :: RipRelative { target } => format ! ( "label{}(%rip)" , target. get( ) ) ,
509
509
}
510
510
}
511
511
}
Original file line number Diff line number Diff line change @@ -4517,7 +4517,7 @@ pub(crate) fn emit(
4517
4517
}
4518
4518
}
4519
4519
4520
- Inst :: ElfTlsGetAddr { ref symbol, dst } => {
4520
+ Inst :: ElfTlsGetAddr { symbol, dst } => {
4521
4521
let dst = dst. to_reg ( ) . to_reg ( ) ;
4522
4522
debug_assert_eq ! ( dst, regs:: rax( ) ) ;
4523
4523
@@ -4546,7 +4546,7 @@ pub(crate) fn emit(
4546
4546
sink. put4 ( 0 ) ; // offset
4547
4547
}
4548
4548
4549
- Inst :: MachOTlsGetAddr { ref symbol, dst } => {
4549
+ Inst :: MachOTlsGetAddr { symbol, dst } => {
4550
4550
let dst = dst. to_reg ( ) . to_reg ( ) ;
4551
4551
debug_assert_eq ! ( dst, regs:: rax( ) ) ;
4552
4552
@@ -4562,11 +4562,7 @@ pub(crate) fn emit(
4562
4562
sink. put1 ( 0x17 ) ;
4563
4563
}
4564
4564
4565
- Inst :: CoffTlsGetAddr {
4566
- ref symbol,
4567
- dst,
4568
- tmp,
4569
- } => {
4565
+ Inst :: CoffTlsGetAddr { symbol, dst, tmp } => {
4570
4566
let dst = dst. to_reg ( ) . to_reg ( ) ;
4571
4567
debug_assert_eq ! ( dst, regs:: rax( ) ) ;
4572
4568
@@ -4619,7 +4615,7 @@ pub(crate) fn emit(
4619
4615
sink. put4 ( 0 ) ; // offset
4620
4616
}
4621
4617
4622
- Inst :: Unwind { ref inst } => {
4618
+ Inst :: Unwind { inst } => {
4623
4619
sink. add_unwind ( inst. clone ( ) ) ;
4624
4620
}
4625
4621
Original file line number Diff line number Diff line change @@ -1923,21 +1923,17 @@ impl PrettyPrint for Inst {
1923
1923
1924
1924
Inst :: Ud2 { trap_code } => format ! ( "ud2 {trap_code}" ) ,
1925
1925
1926
- Inst :: ElfTlsGetAddr { ref symbol, dst } => {
1926
+ Inst :: ElfTlsGetAddr { symbol, dst } => {
1927
1927
let dst = pretty_print_reg ( dst. to_reg ( ) . to_reg ( ) , 8 ) ;
1928
1928
format ! ( "{dst} = elf_tls_get_addr {symbol:?}" )
1929
1929
}
1930
1930
1931
- Inst :: MachOTlsGetAddr { ref symbol, dst } => {
1931
+ Inst :: MachOTlsGetAddr { symbol, dst } => {
1932
1932
let dst = pretty_print_reg ( dst. to_reg ( ) . to_reg ( ) , 8 ) ;
1933
1933
format ! ( "{dst} = macho_tls_get_addr {symbol:?}" )
1934
1934
}
1935
1935
1936
- Inst :: CoffTlsGetAddr {
1937
- ref symbol,
1938
- dst,
1939
- tmp,
1940
- } => {
1936
+ Inst :: CoffTlsGetAddr { symbol, dst, tmp } => {
1941
1937
let dst = pretty_print_reg ( dst. to_reg ( ) . to_reg ( ) , 8 ) ;
1942
1938
let tmp = tmp. to_reg ( ) . to_reg ( ) ;
1943
1939
You can’t perform that action at this time.
0 commit comments