From ec2cc761bc7067712ecc7734502f703fe3b024c8 Mon Sep 17 00:00:00 2001 From: "许杰友 Jieyou Xu (Joe)" Date: Fri, 16 Feb 2024 20:02:50 +0000 Subject: [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives --- tests/ui/cast/cast-does-fallback.rs | 2 +- tests/ui/cast/cast-from-nil.rs | 2 +- tests/ui/cast/cast-pointee-projection.rs | 2 +- tests/ui/cast/cast-region-to-uint.rs | 2 +- tests/ui/cast/cast-rfc0401-vtable-kinds.rs | 2 +- tests/ui/cast/cast-rfc0401.rs | 2 +- tests/ui/cast/cast-to-infer-ty.rs | 2 +- tests/ui/cast/cast-to-nil.rs | 2 +- tests/ui/cast/cast.rs | 2 +- tests/ui/cast/codegen-object-shim.rs | 2 +- tests/ui/cast/fat-ptr-cast-rpass.rs | 2 +- tests/ui/cast/issue-84213.fixed | 2 +- tests/ui/cast/issue-84213.rs | 2 +- tests/ui/cast/issue-89497.fixed | 2 +- tests/ui/cast/issue-89497.rs | 2 +- tests/ui/cast/ptr-to-ptr-different-regions.rs | 2 +- tests/ui/cast/supported-cast.rs | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) (limited to 'tests/ui/cast') diff --git a/tests/ui/cast/cast-does-fallback.rs b/tests/ui/cast/cast-does-fallback.rs index 770f7a31c76..553bf51a53d 100644 --- a/tests/ui/cast/cast-does-fallback.rs +++ b/tests/ui/cast/cast-does-fallback.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { // Test that these type check correctly. diff --git a/tests/ui/cast/cast-from-nil.rs b/tests/ui/cast/cast-from-nil.rs index b5ceef76ac2..8a677603aa9 100644 --- a/tests/ui/cast/cast-from-nil.rs +++ b/tests/ui/cast/cast-from-nil.rs @@ -1,2 +1,2 @@ -// error-pattern: non-primitive cast: `()` as `u32` +//@ error-pattern: non-primitive cast: `()` as `u32` fn main() { let u = (assert!(true) as u32); } diff --git a/tests/ui/cast/cast-pointee-projection.rs b/tests/ui/cast/cast-pointee-projection.rs index f51c5f20f16..1786152699a 100644 --- a/tests/ui/cast/cast-pointee-projection.rs +++ b/tests/ui/cast/cast-pointee-projection.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass trait Tag<'a> { type Type: ?Sized; diff --git a/tests/ui/cast/cast-region-to-uint.rs b/tests/ui/cast/cast-region-to-uint.rs index 33ec2d27610..6f4edadafee 100644 --- a/tests/ui/cast/cast-region-to-uint.rs +++ b/tests/ui/cast/cast-region-to-uint.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let x: isize = 3; diff --git a/tests/ui/cast/cast-rfc0401-vtable-kinds.rs b/tests/ui/cast/cast-rfc0401-vtable-kinds.rs index be6a6bb8b17..410e15d024f 100644 --- a/tests/ui/cast/cast-rfc0401-vtable-kinds.rs +++ b/tests/ui/cast/cast-rfc0401-vtable-kinds.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that you can cast between different pointers to trait objects // whose vtable have the same kind (both lengths, or both trait pointers). diff --git a/tests/ui/cast/cast-rfc0401.rs b/tests/ui/cast/cast-rfc0401.rs index 424feeba0c4..f917f93a1c8 100644 --- a/tests/ui/cast/cast-rfc0401.rs +++ b/tests/ui/cast/cast-rfc0401.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(dead_code)] diff --git a/tests/ui/cast/cast-to-infer-ty.rs b/tests/ui/cast/cast-to-infer-ty.rs index 053ebb621a7..d82eaa9f8ea 100644 --- a/tests/ui/cast/cast-to-infer-ty.rs +++ b/tests/ui/cast/cast-to-infer-ty.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass // Check that we allow a cast to `_` so long as the target type can be // inferred elsewhere. diff --git a/tests/ui/cast/cast-to-nil.rs b/tests/ui/cast/cast-to-nil.rs index 085bb09e631..d91f9a16a07 100644 --- a/tests/ui/cast/cast-to-nil.rs +++ b/tests/ui/cast/cast-to-nil.rs @@ -1,2 +1,2 @@ -// error-pattern: non-primitive cast: `u32` as `()` +//@ error-pattern: non-primitive cast: `u32` as `()` fn main() { let u = 0u32 as (); } diff --git a/tests/ui/cast/cast.rs b/tests/ui/cast/cast.rs index 218275c4d99..b9f21792816 100644 --- a/tests/ui/cast/cast.rs +++ b/tests/ui/cast/cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![allow(unused_assignments)] #![allow(unused_variables)] diff --git a/tests/ui/cast/codegen-object-shim.rs b/tests/ui/cast/codegen-object-shim.rs index 9a85a50ebd9..6256ab17ec6 100644 --- a/tests/ui/cast/codegen-object-shim.rs +++ b/tests/ui/cast/codegen-object-shim.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass fn main() { assert_eq!((ToString::to_string as fn(&(dyn ToString+'static)) -> String)(&"foo"), diff --git a/tests/ui/cast/fat-ptr-cast-rpass.rs b/tests/ui/cast/fat-ptr-cast-rpass.rs index c79468caddd..be9e29f2150 100644 --- a/tests/ui/cast/fat-ptr-cast-rpass.rs +++ b/tests/ui/cast/fat-ptr-cast-rpass.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass #![feature(ptr_metadata)] diff --git a/tests/ui/cast/issue-84213.fixed b/tests/ui/cast/issue-84213.fixed index b5c4a775296..a0dc4a89666 100644 --- a/tests/ui/cast/issue-84213.fixed +++ b/tests/ui/cast/issue-84213.fixed @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Something { pub field: u32, diff --git a/tests/ui/cast/issue-84213.rs b/tests/ui/cast/issue-84213.rs index 6eb81291abc..93b584c6d35 100644 --- a/tests/ui/cast/issue-84213.rs +++ b/tests/ui/cast/issue-84213.rs @@ -1,4 +1,4 @@ -// run-rustfix +//@ run-rustfix struct Something { pub field: u32, diff --git a/tests/ui/cast/issue-89497.fixed b/tests/ui/cast/issue-89497.fixed index 04c10a5f79e..4229199fa43 100644 --- a/tests/ui/cast/issue-89497.fixed +++ b/tests/ui/cast/issue-89497.fixed @@ -1,6 +1,6 @@ // Regression test for issue #89497. -// run-rustfix +//@ run-rustfix fn main() { let pointer: usize = &1_i32 as *const i32 as usize; diff --git a/tests/ui/cast/issue-89497.rs b/tests/ui/cast/issue-89497.rs index 76301b704c8..e934560ddab 100644 --- a/tests/ui/cast/issue-89497.rs +++ b/tests/ui/cast/issue-89497.rs @@ -1,6 +1,6 @@ // Regression test for issue #89497. -// run-rustfix +//@ run-rustfix fn main() { let pointer: usize = &1_i32 as *const i32 as usize; diff --git a/tests/ui/cast/ptr-to-ptr-different-regions.rs b/tests/ui/cast/ptr-to-ptr-different-regions.rs index 5592e613ac1..0d525edc133 100644 --- a/tests/ui/cast/ptr-to-ptr-different-regions.rs +++ b/tests/ui/cast/ptr-to-ptr-different-regions.rs @@ -1,4 +1,4 @@ -// check-pass +//@ check-pass // https://github.com/rust-lang/rust/issues/113257 diff --git a/tests/ui/cast/supported-cast.rs b/tests/ui/cast/supported-cast.rs index ff41ce6c79a..4862d7a4125 100644 --- a/tests/ui/cast/supported-cast.rs +++ b/tests/ui/cast/supported-cast.rs @@ -1,4 +1,4 @@ -// run-pass +//@ run-pass pub fn main() { let f = 1_usize as *const String; -- cgit 1.4.1-3-g733a5