Rollup merge of #121045 - jieyouxu:fix-ui-tests, r=oli-obk
Fix two UI tests with incorrect directive / invalid revision - `tests/ui/borrowck/copy-suggestion-region-vid.rs` had a `ui_test`-style directive on compiletest: `//`@run-rustfix`.` - `tests/ui/asm/inline-syntax.rs` has directives for a undeclared revision `[x86_64_allowed]` which seems to have the same directives as declared revision `[x86_64]`.
This commit is contained in:
commit
f77870e170
@ -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");
|
||||
| ^
|
||||
@ -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");
|
||||
| ^
|
||||
@ -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");
|
||||
| ^
|
||||
@ -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");
|
||||
| ^
|
||||
@ -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");
|
||||
| ^
|
||||
@ -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
|
||||
| ^
|
||||
|
@ -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");
|
||||
| ^
|
||||
@ -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");
|
||||
| ^
|
||||
@ -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");
|
||||
| ^
|
||||
@ -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");
|
||||
| ^
|
||||
@ -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");
|
||||
| ^
|
||||
@ -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
|
||||
| ^
|
||||
|
@ -2,9 +2,6 @@
|
||||
//[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
|
||||
|
@ -1,5 +1,5 @@
|
||||
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");
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -7,37 +7,37 @@ 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
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
18
tests/ui/borrowck/copy-suggestion-region-vid.fixed
Normal file
18
tests/ui/borrowck/copy-suggestion-region-vid.fixed
Normal file
@ -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() {}
|
@ -1,4 +1,4 @@
|
||||
//@run-rustfix
|
||||
// run-rustfix
|
||||
pub struct DataStruct();
|
||||
|
||||
pub struct HelperStruct<'n> {
|
||||
|
Loading…
Reference in New Issue
Block a user