about summary refs log tree commit diff
diff options
context:
space:
mode:
authorasquared31415 <34665709+asquared31415@users.noreply.github.com>2021-09-10 09:33:06 -0400
committerasquared31415 <34665709+asquared31415@users.noreply.github.com>2021-09-14 18:47:47 -0400
commit05460d0efcf16ed1c437c721beafd65babd7c1ef (patch)
tree208c2b1086508069eb45fcd59cbc34f9fec3b731
parent16c0a84510648d25b8310a9c2c8ce27c417fb28f (diff)
downloadrust-05460d0efcf16ed1c437c721beafd65babd7c1ef.tar.gz
rust-05460d0efcf16ed1c437c721beafd65babd7c1ef.zip
update test
-rw-r--r--src/test/run-make-fulldeps/target-specs/foo.rs2
-rw-r--r--src/tools/clippy/tests/ui/def_id_nocore.rs5
-rw-r--r--src/tools/clippy/tests/ui/def_id_nocore.stderr2
3 files changed, 5 insertions, 4 deletions
diff --git a/src/test/run-make-fulldeps/target-specs/foo.rs b/src/test/run-make-fulldeps/target-specs/foo.rs
index 83fdc452a3b..d576a1dd281 100644
--- a/src/test/run-make-fulldeps/target-specs/foo.rs
+++ b/src/test/run-make-fulldeps/target-specs/foo.rs
@@ -11,7 +11,7 @@ trait Sized {}
 auto trait Freeze {}
 
 #[lang = "start"]
-fn start<T>(_main: *const u8, _argc: isize, _argv: *const *const u8) -> isize {
+fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8) -> isize {
     0
 }
 
diff --git a/src/tools/clippy/tests/ui/def_id_nocore.rs b/src/tools/clippy/tests/ui/def_id_nocore.rs
index cba7666c2d8..1ed78547a60 100644
--- a/src/tools/clippy/tests/ui/def_id_nocore.rs
+++ b/src/tools/clippy/tests/ui/def_id_nocore.rs
@@ -15,11 +15,12 @@ pub trait Copy {}
 pub unsafe trait Freeze {}
 
 #[lang = "start"]
-#[start]
-fn start(_argc: isize, _argv: *const *const u8) -> isize {
+fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8) -> isize {
     0
 }
 
+fn main() {}
+
 struct A;
 
 impl A {
diff --git a/src/tools/clippy/tests/ui/def_id_nocore.stderr b/src/tools/clippy/tests/ui/def_id_nocore.stderr
index 702684f6b43..6210d7c6cfd 100644
--- a/src/tools/clippy/tests/ui/def_id_nocore.stderr
+++ b/src/tools/clippy/tests/ui/def_id_nocore.stderr
@@ -1,5 +1,5 @@
 error: methods called `as_*` usually take `self` by reference or `self` by mutable reference
-  --> $DIR/def_id_nocore.rs:26:19
+  --> $DIR/def_id_nocore.rs:27:19
    |
 LL |     pub fn as_ref(self) -> &'static str {
    |                   ^^^^