Skip to content

Commit

Permalink
Fix two UI tests with incorrect directive / invalid revision
Browse files Browse the repository at this point in the history
  • Loading branch information
jieyouxu committed Feb 14, 2024
1 parent bdc1592 commit ee88f34
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 24 deletions.
12 changes: 6 additions & 6 deletions tests/ui/asm/inline-syntax.arm.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ LL | .intel_syntax noprefix
| ^

error: unknown directive
--> $DIR/inline-syntax.rs:38:15
--> $DIR/inline-syntax.rs:35:15
|
LL | asm!(".intel_syntax noprefix", "nop");
| ^
Expand All @@ -25,7 +25,7 @@ LL | .intel_syntax noprefix
| ^

error: unknown directive
--> $DIR/inline-syntax.rs:42:15
--> $DIR/inline-syntax.rs:39:15
|
LL | asm!(".intel_syntax aaa noprefix", "nop");
| ^
Expand All @@ -37,7 +37,7 @@ LL | .intel_syntax aaa noprefix
| ^

error: unknown directive
--> $DIR/inline-syntax.rs:46:15
--> $DIR/inline-syntax.rs:43:15
|
LL | asm!(".att_syntax noprefix", "nop");
| ^
Expand All @@ -49,7 +49,7 @@ LL | .att_syntax noprefix
| ^

error: unknown directive
--> $DIR/inline-syntax.rs:50:15
--> $DIR/inline-syntax.rs:47:15
|
LL | asm!(".att_syntax bbb noprefix", "nop");
| ^
Expand All @@ -61,7 +61,7 @@ LL | .att_syntax bbb noprefix
| ^

error: unknown directive
--> $DIR/inline-syntax.rs:54:15
--> $DIR/inline-syntax.rs:51:15
|
LL | asm!(".intel_syntax noprefix; nop");
| ^
Expand All @@ -73,7 +73,7 @@ LL | .intel_syntax noprefix; nop
| ^

error: unknown directive
--> $DIR/inline-syntax.rs:61:13
--> $DIR/inline-syntax.rs:58:13
|
LL | .intel_syntax noprefix
| ^
Expand Down
12 changes: 6 additions & 6 deletions tests/ui/asm/inline-syntax.arm_llvm_18.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ LL | .intel_syntax noprefix
| ^

error: unknown directive
--> $DIR/inline-syntax.rs:38:15
--> $DIR/inline-syntax.rs:35:15
|
LL | asm!(".intel_syntax noprefix", "nop");
| ^
Expand All @@ -27,7 +27,7 @@ LL | .intel_syntax noprefix
| ^

error: unknown directive
--> $DIR/inline-syntax.rs:42:15
--> $DIR/inline-syntax.rs:39:15
|
LL | asm!(".intel_syntax aaa noprefix", "nop");
| ^
Expand All @@ -39,7 +39,7 @@ LL | .intel_syntax aaa noprefix
| ^

error: unknown directive
--> $DIR/inline-syntax.rs:46:15
--> $DIR/inline-syntax.rs:43:15
|
LL | asm!(".att_syntax noprefix", "nop");
| ^
Expand All @@ -51,7 +51,7 @@ LL | .att_syntax noprefix
| ^

error: unknown directive
--> $DIR/inline-syntax.rs:50:15
--> $DIR/inline-syntax.rs:47:15
|
LL | asm!(".att_syntax bbb noprefix", "nop");
| ^
Expand All @@ -63,7 +63,7 @@ LL | .att_syntax bbb noprefix
| ^

error: unknown directive
--> $DIR/inline-syntax.rs:54:15
--> $DIR/inline-syntax.rs:51:15
|
LL | asm!(".intel_syntax noprefix; nop");
| ^
Expand All @@ -75,7 +75,7 @@ LL | .intel_syntax noprefix; nop
| ^

error: unknown directive
--> $DIR/inline-syntax.rs:61:13
--> $DIR/inline-syntax.rs:58:13
|
LL | .intel_syntax noprefix
| ^
Expand Down
5 changes: 1 addition & 4 deletions tests/ui/asm/inline-syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
//[x86_64] check-pass
//[x86_64] needs-llvm-components: x86
//[x86_64_allowed] compile-flags: --target x86_64-unknown-linux-gnu
//[x86_64_allowed] check-pass
//[x86_64_allowed] needs-llvm-components: x86
//[arm] compile-flags: --target armv7-unknown-linux-gnueabihf
//[arm] build-fail
//[arm] needs-llvm-components: arm
//[arm] ignore-llvm-version: 18 - 99
// Newer LLVM produces extra error notes.
//Newer LLVM produces extra error notes.
//[arm_llvm_18] compile-flags: --target armv7-unknown-linux-gnueabihf
//[arm_llvm_18] build-fail
//[arm_llvm_18] needs-llvm-components: arm
Expand Down
14 changes: 7 additions & 7 deletions tests/ui/asm/inline-syntax.x86_64.stderr
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
warning: avoid using `.intel_syntax`, Intel syntax is the default
--> $DIR/inline-syntax.rs:70:14
--> $DIR/inline-syntax.rs:67:14
|
LL | global_asm!(".intel_syntax noprefix", "nop");
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(bad_asm_style)]` on by default

warning: avoid using `.intel_syntax`, Intel syntax is the default
--> $DIR/inline-syntax.rs:38:15
--> $DIR/inline-syntax.rs:35:15
|
LL | asm!(".intel_syntax noprefix", "nop");
| ^^^^^^^^^^^^^^^^^^^^^^

warning: avoid using `.intel_syntax`, Intel syntax is the default
--> $DIR/inline-syntax.rs:42:15
--> $DIR/inline-syntax.rs:39:15
|
LL | asm!(".intel_syntax aaa noprefix", "nop");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: avoid using `.att_syntax`, prefer using `options(att_syntax)` instead
--> $DIR/inline-syntax.rs:46:15
--> $DIR/inline-syntax.rs:43:15
|
LL | asm!(".att_syntax noprefix", "nop");
| ^^^^^^^^^^^^^^^^^^^^

warning: avoid using `.att_syntax`, prefer using `options(att_syntax)` instead
--> $DIR/inline-syntax.rs:50:15
--> $DIR/inline-syntax.rs:47:15
|
LL | asm!(".att_syntax bbb noprefix", "nop");
| ^^^^^^^^^^^^^^^^^^^^^^^^

warning: avoid using `.intel_syntax`, Intel syntax is the default
--> $DIR/inline-syntax.rs:54:15
--> $DIR/inline-syntax.rs:51:15
|
LL | asm!(".intel_syntax noprefix; nop");
| ^^^^^^^^^^^^^^^^^^^^^^

warning: avoid using `.intel_syntax`, Intel syntax is the default
--> $DIR/inline-syntax.rs:61:13
--> $DIR/inline-syntax.rs:58:13
|
LL | .intel_syntax noprefix
| ^^^^^^^^^^^^^^^^^^^^^^
Expand Down
18 changes: 18 additions & 0 deletions tests/ui/borrowck/copy-suggestion-region-vid.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// run-rustfix
pub struct DataStruct();

pub struct HelperStruct<'n> {
pub helpers: [Vec<&'n i64>; 2],
pub is_empty: bool,
}

impl DataStruct {
pub fn f(&self) -> HelperStruct {
let helpers = [vec![], vec![]];

HelperStruct { helpers: helpers.clone(), is_empty: helpers[0].is_empty() }
//~^ ERROR borrow of moved value
}
}

fn main() {}
2 changes: 1 addition & 1 deletion tests/ui/borrowck/copy-suggestion-region-vid.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@run-rustfix
// run-rustfix
pub struct DataStruct();

pub struct HelperStruct<'n> {
Expand Down

0 comments on commit ee88f34

Please sign in to comment.