File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -469,8 +469,6 @@ fn check_api_fn(cx: &mut Check, efn: &ExternFn) {
469469 if efn. lang == Lang :: Cxx {
470470 check_mut_return_restriction ( cx, efn) ;
471471 }
472-
473- check_multiple_arg_lifetimes ( cx, efn) ;
474472}
475473
476474fn check_api_type_alias ( cx : & mut Check , alias : & TypeAlias ) {
@@ -564,35 +562,6 @@ fn check_mut_return_restriction(cx: &mut Check, efn: &ExternFn) {
564562 ) ;
565563}
566564
567- fn check_multiple_arg_lifetimes ( cx : & mut Check , efn : & ExternFn ) {
568- if efn. lang == Lang :: Cxx && efn. trusted {
569- return ;
570- }
571-
572- match & efn. ret {
573- Some ( Type :: Ref ( _) ) => { }
574- _ => return ,
575- }
576-
577- let mut reference_args = 0 ;
578- for arg in & efn. args {
579- if let Type :: Ref ( _) = & arg. ty {
580- reference_args += 1 ;
581- }
582- }
583-
584- if efn. receiver . is_some ( ) {
585- reference_args += 1 ;
586- }
587-
588- if reference_args != 1 {
589- cx. error (
590- efn,
591- "functions that return a reference must take exactly one input reference" ,
592- ) ;
593- }
594- }
595-
596565fn check_reserved_name ( cx : & mut Check , ident : & Ident ) {
597566 if ident == "Box"
598567 || ident == "UniquePtr"
You can’t perform that action at this time.
0 commit comments