diff --git a/src/cargo/ops/cargo_new.rs b/src/cargo/ops/cargo_new.rs index f349395b55ff..0c490c1d1afc 100644 --- a/src/cargo/ops/cargo_new.rs +++ b/src/cargo/ops/cargo_new.rs @@ -876,7 +876,7 @@ fn main() { " } else { b"\ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_init/auto_git/out/src/lib.rs b/tests/testsuite/cargo_init/auto_git/out/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_init/auto_git/out/src/lib.rs +++ b/tests/testsuite/cargo_init/auto_git/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_init/formats_source/out/src/lib.rs b/tests/testsuite/cargo_init/formats_source/out/src/lib.rs index 3b9acffd5adb..4352f358f507 100644 --- a/tests/testsuite/cargo_init/formats_source/out/src/lib.rs +++ b/tests/testsuite/cargo_init/formats_source/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_init/fossil_autodetect/out/src/lib.rs b/tests/testsuite/cargo_init/fossil_autodetect/out/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_init/fossil_autodetect/out/src/lib.rs +++ b/tests/testsuite/cargo_init/fossil_autodetect/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_init/git_autodetect/out/src/lib.rs b/tests/testsuite/cargo_init/git_autodetect/out/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_init/git_autodetect/out/src/lib.rs +++ b/tests/testsuite/cargo_init/git_autodetect/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_init/git_ignore_exists_no_conflicting_entries/out/src/lib.rs b/tests/testsuite/cargo_init/git_ignore_exists_no_conflicting_entries/out/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_init/git_ignore_exists_no_conflicting_entries/out/src/lib.rs +++ b/tests/testsuite/cargo_init/git_ignore_exists_no_conflicting_entries/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_init/ignores_failure_to_format_source/out/src/lib.rs b/tests/testsuite/cargo_init/ignores_failure_to_format_source/out/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_init/ignores_failure_to_format_source/out/src/lib.rs +++ b/tests/testsuite/cargo_init/ignores_failure_to_format_source/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_init/inherit_workspace_package_table/in/src/lib.rs b/tests/testsuite/cargo_init/inherit_workspace_package_table/in/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_init/inherit_workspace_package_table/in/src/lib.rs +++ b/tests/testsuite/cargo_init/inherit_workspace_package_table/in/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_init/inherit_workspace_package_table/out/src/lib.rs b/tests/testsuite/cargo_init/inherit_workspace_package_table/out/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_init/inherit_workspace_package_table/out/src/lib.rs +++ b/tests/testsuite/cargo_init/inherit_workspace_package_table/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_init/mercurial_autodetect/out/src/lib.rs b/tests/testsuite/cargo_init/mercurial_autodetect/out/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_init/mercurial_autodetect/out/src/lib.rs +++ b/tests/testsuite/cargo_init/mercurial_autodetect/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_init/pijul_autodetect/out/src/lib.rs b/tests/testsuite/cargo_init/pijul_autodetect/out/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_init/pijul_autodetect/out/src/lib.rs +++ b/tests/testsuite/cargo_init/pijul_autodetect/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_init/simple_git/out/src/lib.rs b/tests/testsuite/cargo_init/simple_git/out/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_init/simple_git/out/src/lib.rs +++ b/tests/testsuite/cargo_init/simple_git/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_init/simple_git_ignore_exists/out/src/lib.rs b/tests/testsuite/cargo_init/simple_git_ignore_exists/out/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_init/simple_git_ignore_exists/out/src/lib.rs +++ b/tests/testsuite/cargo_init/simple_git_ignore_exists/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_init/simple_hg/out/src/lib.rs b/tests/testsuite/cargo_init/simple_hg/out/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_init/simple_hg/out/src/lib.rs +++ b/tests/testsuite/cargo_init/simple_hg/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_init/simple_hg_ignore_exists/out/src/lib.rs b/tests/testsuite/cargo_init/simple_hg_ignore_exists/out/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_init/simple_hg_ignore_exists/out/src/lib.rs +++ b/tests/testsuite/cargo_init/simple_hg_ignore_exists/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_init/simple_lib/out/src/lib.rs b/tests/testsuite/cargo_init/simple_lib/out/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_init/simple_lib/out/src/lib.rs +++ b/tests/testsuite/cargo_init/simple_lib/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_new/add_members_to_non_workspace/out/bar/src/lib.rs b/tests/testsuite/cargo_new/add_members_to_non_workspace/out/bar/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_new/add_members_to_non_workspace/out/bar/src/lib.rs +++ b/tests/testsuite/cargo_new/add_members_to_non_workspace/out/bar/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_new/add_members_to_workspace_with_exclude_list/in/src/lib.rs b/tests/testsuite/cargo_new/add_members_to_workspace_with_exclude_list/in/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_new/add_members_to_workspace_with_exclude_list/in/src/lib.rs +++ b/tests/testsuite/cargo_new/add_members_to_workspace_with_exclude_list/in/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_new/add_members_to_workspace_without_members/out/bar/src/lib.rs b/tests/testsuite/cargo_new/add_members_to_workspace_without_members/out/bar/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_new/add_members_to_workspace_without_members/out/bar/src/lib.rs +++ b/tests/testsuite/cargo_new/add_members_to_workspace_without_members/out/bar/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_new/inherit_workspace_lints/in/src/lib.rs b/tests/testsuite/cargo_new/inherit_workspace_lints/in/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_new/inherit_workspace_lints/in/src/lib.rs +++ b/tests/testsuite/cargo_new/inherit_workspace_lints/in/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_new/inherit_workspace_lints/out/src/lib.rs b/tests/testsuite/cargo_new/inherit_workspace_lints/out/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_new/inherit_workspace_lints/out/src/lib.rs +++ b/tests/testsuite/cargo_new/inherit_workspace_lints/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_new/inherit_workspace_package_table.in/src/lib.rs b/tests/testsuite/cargo_new/inherit_workspace_package_table.in/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_new/inherit_workspace_package_table.in/src/lib.rs +++ b/tests/testsuite/cargo_new/inherit_workspace_package_table.in/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_new/inherit_workspace_package_table/out/src/lib.rs b/tests/testsuite/cargo_new/inherit_workspace_package_table/out/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_new/inherit_workspace_package_table/out/src/lib.rs +++ b/tests/testsuite/cargo_new/inherit_workspace_package_table/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_new/inherit_workspace_package_table_with_edition/out/src/lib.rs b/tests/testsuite/cargo_new/inherit_workspace_package_table_with_edition/out/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_new/inherit_workspace_package_table_with_edition/out/src/lib.rs +++ b/tests/testsuite/cargo_new/inherit_workspace_package_table_with_edition/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_new/inherit_workspace_package_table_with_registry/out/src/lib.rs b/tests/testsuite/cargo_new/inherit_workspace_package_table_with_registry/out/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_new/inherit_workspace_package_table_with_registry/out/src/lib.rs +++ b/tests/testsuite/cargo_new/inherit_workspace_package_table_with_registry/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_new/inherit_workspace_package_table_without_version/in/src/lib.rs b/tests/testsuite/cargo_new/inherit_workspace_package_table_without_version/in/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_new/inherit_workspace_package_table_without_version/in/src/lib.rs +++ b/tests/testsuite/cargo_new/inherit_workspace_package_table_without_version/in/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_new/inherit_workspace_package_table_without_version/out/src/lib.rs b/tests/testsuite/cargo_new/inherit_workspace_package_table_without_version/out/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_new/inherit_workspace_package_table_without_version/out/src/lib.rs +++ b/tests/testsuite/cargo_new/inherit_workspace_package_table_without_version/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_new/not_inherit_workspace_package_table_if_not_members/in/src/lib.rs b/tests/testsuite/cargo_new/not_inherit_workspace_package_table_if_not_members/in/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_new/not_inherit_workspace_package_table_if_not_members/in/src/lib.rs +++ b/tests/testsuite/cargo_new/not_inherit_workspace_package_table_if_not_members/in/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/cargo_new/not_inherit_workspace_package_table_if_not_members/out/src/lib.rs b/tests/testsuite/cargo_new/not_inherit_workspace_package_table_if_not_members/out/src/lib.rs index 7d12d9af8195..7da1349eae89 100644 --- a/tests/testsuite/cargo_new/not_inherit_workspace_package_table_if_not_members/out/src/lib.rs +++ b/tests/testsuite/cargo_new/not_inherit_workspace_package_table_if_not_members/out/src/lib.rs @@ -1,4 +1,4 @@ -pub fn add(left: usize, right: usize) -> usize { +pub fn add(left: i32, right: i32) -> i32 { left + right } diff --git a/tests/testsuite/new.rs b/tests/testsuite/new.rs index ff80f4b6ae30..e9cc8e0dc5d9 100644 --- a/tests/testsuite/new.rs +++ b/tests/testsuite/new.rs @@ -42,7 +42,7 @@ fn simple_lib() { let contents = fs::read_to_string(&lib).unwrap(); assert_eq!( contents, - r#"pub fn add(left: usize, right: usize) -> usize { + r#"pub fn add(left: i32, right: i32) -> i32 { left + right }