Fix lint capitalization and ignoring, test with include_str
This commit is contained in:
parent
8e7bbc9e9d
commit
1ae19b69e8
7 changed files with 148 additions and 104 deletions
|
@ -530,17 +530,17 @@ fn expand_preparsed_asm(
|
||||||
span,
|
span,
|
||||||
ecx.current_expansion.lint_node_id,
|
ecx.current_expansion.lint_node_id,
|
||||||
"do not use named labels in inline assembly",
|
"do not use named labels in inline assembly",
|
||||||
BuiltinLintDiagnostics::NamedAsmLabel("Only GAS local labels of the form `N:` where N is a number may be used in inline asm".to_string()),
|
BuiltinLintDiagnostics::NamedAsmLabel("only GAS local labels of the form `N:` where N is a number may be used in inline asm".to_string()),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// If there were labels but we couldn't find a span, combine the warnings and use the template span
|
// If there were labels but we couldn't find a span, combine the warnings and use the template span
|
||||||
ecx.parse_sess().buffer_lint_with_diagnostic(
|
ecx.parse_sess().buffer_lint_with_diagnostic(
|
||||||
lint::builtin::NAMED_ASM_LABELS,
|
lint::builtin::NAMED_ASM_LABELS,
|
||||||
template_span,
|
template_sp,
|
||||||
ecx.current_expansion.lint_node_id,
|
ecx.current_expansion.lint_node_id,
|
||||||
"do not use named labels in inline assembly",
|
"do not use named labels in inline assembly",
|
||||||
BuiltinLintDiagnostics::NamedAsmLabel("Only GAS local labels of the form `N:` where N is a number may be used in inline asm".to_string()),
|
BuiltinLintDiagnostics::NamedAsmLabel("only GAS local labels of the form `N:` where N is a number may be used in inline asm".to_string()),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -760,7 +760,7 @@ pub trait LintContext: Sized {
|
||||||
}
|
}
|
||||||
BuiltinLintDiagnostics::NamedAsmLabel(help) => {
|
BuiltinLintDiagnostics::NamedAsmLabel(help) => {
|
||||||
db.help(&help);
|
db.help(&help);
|
||||||
db.note("See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information");
|
db.note("see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Rewrap `db`, and pass control to the user.
|
// Rewrap `db`, and pass control to the user.
|
||||||
|
|
|
@ -2990,6 +2990,7 @@ declare_lint_pass! {
|
||||||
INLINE_NO_SANITIZE,
|
INLINE_NO_SANITIZE,
|
||||||
BAD_ASM_STYLE,
|
BAD_ASM_STYLE,
|
||||||
ASM_SUB_REGISTER,
|
ASM_SUB_REGISTER,
|
||||||
|
NAMED_ASM_LABELS,
|
||||||
UNSAFE_OP_IN_UNSAFE_FN,
|
UNSAFE_OP_IN_UNSAFE_FN,
|
||||||
INCOMPLETE_INCLUDE,
|
INCOMPLETE_INCLUDE,
|
||||||
CENUM_IMPL_DROP_CAST,
|
CENUM_IMPL_DROP_CAST,
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#![no_core]
|
#![no_core]
|
||||||
#![feature(no_core, lang_items, rustc_attrs)]
|
#![feature(no_core, lang_items, rustc_attrs)]
|
||||||
#![crate_type = "rlib"]
|
#![crate_type = "rlib"]
|
||||||
|
#![allow(named_asm_labels)]
|
||||||
|
|
||||||
#[rustc_builtin_macro]
|
#[rustc_builtin_macro]
|
||||||
macro_rules! asm {
|
macro_rules! asm {
|
||||||
|
|
|
@ -114,6 +114,20 @@ fn main() {
|
||||||
asm!(":lo12:FOO"); // this is apparently valid aarch64
|
asm!(":lo12:FOO"); // this is apparently valid aarch64
|
||||||
// is there an example that is valid x86 for this test?
|
// is there an example that is valid x86 for this test?
|
||||||
asm!(":bbb nop");
|
asm!(":bbb nop");
|
||||||
|
|
||||||
|
// Test include_str in asm
|
||||||
|
asm!(include_str!("named-asm-labels.s")); //~ ERROR do not use named labels
|
||||||
|
|
||||||
|
// Test allowing or warning on the lint instead
|
||||||
|
#[allow(named_asm_labels)]
|
||||||
|
{
|
||||||
|
asm!("allowed: nop"); // Should not emit anything
|
||||||
|
}
|
||||||
|
|
||||||
|
#[warn(named_asm_labels)]
|
||||||
|
{
|
||||||
|
asm!("warned: nop"); //~ WARNING do not use named labels
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
5
src/test/ui/asm/named-asm-labels.s
Normal file
5
src/test/ui/asm/named-asm-labels.s
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
lab1: nop
|
||||||
|
// do more things
|
||||||
|
lab2: nop // does bar
|
||||||
|
// a: b
|
||||||
|
lab3: nop; lab4: nop
|
|
@ -1,300 +1,323 @@
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:11:15
|
--> $DIR/named-asm-labels.rs:11:15
|
||||||
|
|
|
|
||||||
LL | asm!("bar: nop");
|
LL | asm!("bar: nop");
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
|
|
||||||
= note: `#[deny(named_asm_labels)]` on by default
|
= note: `#[deny(named_asm_labels)]` on by default
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:14:15
|
--> $DIR/named-asm-labels.rs:14:15
|
||||||
|
|
|
|
||||||
LL | asm!("abcd:");
|
LL | asm!("abcd:");
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:17:15
|
--> $DIR/named-asm-labels.rs:17:15
|
||||||
|
|
|
|
||||||
LL | asm!("foo: bar1: nop");
|
LL | asm!("foo: bar1: nop");
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:17:20
|
--> $DIR/named-asm-labels.rs:17:20
|
||||||
|
|
|
|
||||||
LL | asm!("foo: bar1: nop");
|
LL | asm!("foo: bar1: nop");
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:22:15
|
--> $DIR/named-asm-labels.rs:22:15
|
||||||
|
|
|
|
||||||
LL | asm!("foo1: nop", "nop");
|
LL | asm!("foo1: nop", "nop");
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:23:15
|
--> $DIR/named-asm-labels.rs:23:15
|
||||||
|
|
|
|
||||||
LL | asm!("foo2: foo3: nop", "nop");
|
LL | asm!("foo2: foo3: nop", "nop");
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:23:21
|
--> $DIR/named-asm-labels.rs:23:21
|
||||||
|
|
|
|
||||||
LL | asm!("foo2: foo3: nop", "nop");
|
LL | asm!("foo2: foo3: nop", "nop");
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:26:22
|
--> $DIR/named-asm-labels.rs:26:22
|
||||||
|
|
|
|
||||||
LL | asm!("nop", "foo4: nop");
|
LL | asm!("nop", "foo4: nop");
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:27:15
|
--> $DIR/named-asm-labels.rs:27:15
|
||||||
|
|
|
|
||||||
LL | asm!("foo5: nop", "foo6: nop");
|
LL | asm!("foo5: nop", "foo6: nop");
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:27:28
|
--> $DIR/named-asm-labels.rs:27:28
|
||||||
|
|
|
|
||||||
LL | asm!("foo5: nop", "foo6: nop");
|
LL | asm!("foo5: nop", "foo6: nop");
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:32:15
|
--> $DIR/named-asm-labels.rs:32:15
|
||||||
|
|
|
|
||||||
LL | asm!("foo7: nop; foo8: nop");
|
LL | asm!("foo7: nop; foo8: nop");
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:32:26
|
--> $DIR/named-asm-labels.rs:32:26
|
||||||
|
|
|
|
||||||
LL | asm!("foo7: nop; foo8: nop");
|
LL | asm!("foo7: nop; foo8: nop");
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:35:15
|
--> $DIR/named-asm-labels.rs:35:15
|
||||||
|
|
|
|
||||||
LL | asm!("foo9: nop; nop");
|
LL | asm!("foo9: nop; nop");
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:36:20
|
--> $DIR/named-asm-labels.rs:36:20
|
||||||
|
|
|
|
||||||
LL | asm!("nop; foo10: nop");
|
LL | asm!("nop; foo10: nop");
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:39:15
|
--> $DIR/named-asm-labels.rs:39:15
|
||||||
|
|
|
|
||||||
LL | asm!("bar2: nop\n bar3: nop");
|
LL | asm!("bar2: nop\n bar3: nop");
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:39:27
|
--> $DIR/named-asm-labels.rs:39:27
|
||||||
|
|
|
|
||||||
LL | asm!("bar2: nop\n bar3: nop");
|
LL | asm!("bar2: nop\n bar3: nop");
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:42:15
|
--> $DIR/named-asm-labels.rs:42:15
|
||||||
|
|
|
|
||||||
LL | asm!("bar4: nop\n nop");
|
LL | asm!("bar4: nop\n nop");
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:43:21
|
--> $DIR/named-asm-labels.rs:43:21
|
||||||
|
|
|
|
||||||
LL | asm!("nop\n bar5: nop");
|
LL | asm!("nop\n bar5: nop");
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:44:21
|
--> $DIR/named-asm-labels.rs:44:21
|
||||||
|
|
|
|
||||||
LL | asm!("nop\n bar6: bar7: nop");
|
LL | asm!("nop\n bar6: bar7: nop");
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:44:27
|
--> $DIR/named-asm-labels.rs:44:27
|
||||||
|
|
|
|
||||||
LL | asm!("nop\n bar6: bar7: nop");
|
LL | asm!("nop\n bar6: bar7: nop");
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:51:13
|
--> $DIR/named-asm-labels.rs:51:13
|
||||||
|
|
|
|
||||||
LL | blah2: nop
|
LL | blah2: nop
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:52:13
|
--> $DIR/named-asm-labels.rs:52:13
|
||||||
|
|
|
|
||||||
LL | blah3: nop
|
LL | blah3: nop
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:60:19
|
--> $DIR/named-asm-labels.rs:60:19
|
||||||
|
|
|
|
||||||
LL | nop ; blah4: nop
|
LL | nop ; blah4: nop
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:74:15
|
--> $DIR/named-asm-labels.rs:74:15
|
||||||
|
|
|
|
||||||
LL | asm!("blah1: 2bar: nop");
|
LL | asm!("blah1: 2bar: nop");
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:77:15
|
--> $DIR/named-asm-labels.rs:77:15
|
||||||
|
|
|
|
||||||
LL | asm!("def: def: nop");
|
LL | asm!("def: def: nop");
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:78:15
|
--> $DIR/named-asm-labels.rs:78:15
|
||||||
|
|
|
|
||||||
LL | asm!("def: nop\ndef: nop");
|
LL | asm!("def: nop\ndef: nop");
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:79:15
|
--> $DIR/named-asm-labels.rs:79:15
|
||||||
|
|
|
|
||||||
LL | asm!("def: nop; def: nop");
|
LL | asm!("def: nop; def: nop");
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:87:15
|
--> $DIR/named-asm-labels.rs:87:15
|
||||||
|
|
|
|
||||||
LL | asm!("fooo\u{003A} nop");
|
LL | asm!("fooo\u{003A} nop");
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:88:15
|
--> $DIR/named-asm-labels.rs:88:15
|
||||||
|
|
|
|
||||||
LL | asm!("foooo\x3A nop");
|
LL | asm!("foooo\x3A nop");
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:91:15
|
--> $DIR/named-asm-labels.rs:91:15
|
||||||
|
|
|
|
||||||
LL | asm!("fooooo:\u{000A} nop");
|
LL | asm!("fooooo:\u{000A} nop");
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:92:15
|
--> $DIR/named-asm-labels.rs:92:15
|
||||||
|
|
|
|
||||||
LL | asm!("foooooo:\x0A nop");
|
LL | asm!("foooooo:\x0A nop");
|
||||||
| ^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:96:14
|
--> $DIR/named-asm-labels.rs:96:14
|
||||||
|
|
|
|
||||||
LL | asm!("\x41\x42\x43\x3A\x20\x6E\x6F\x70");
|
LL | asm!("\x41\x42\x43\x3A\x20\x6E\x6F\x70");
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: do not use named labels in inline assembly
|
error: do not use named labels in inline assembly
|
||||||
--> $DIR/named_asm_labels.rs:107:13
|
--> $DIR/named-asm-labels.rs:107:13
|
||||||
|
|
|
|
||||||
LL | ab: nop // ab: does foo
|
LL | ab: nop // ab: does foo
|
||||||
| ^^
|
| ^^
|
||||||
|
|
|
|
||||||
= help: Only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
= note: See the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
error: aborting due to 33 previous errors
|
error: do not use named labels in inline assembly
|
||||||
|
--> $DIR/named-asm-labels.rs:119:14
|
||||||
|
|
|
||||||
|
LL | asm!(include_str!("named-asm-labels.s"));
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
||||||
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
|
warning: do not use named labels in inline assembly
|
||||||
|
--> $DIR/named-asm-labels.rs:129:19
|
||||||
|
|
|
||||||
|
LL | asm!("warned: nop");
|
||||||
|
| ^^^^^^
|
||||||
|
|
|
||||||
|
note: the lint level is defined here
|
||||||
|
--> $DIR/named-asm-labels.rs:127:16
|
||||||
|
|
|
||||||
|
LL | #[warn(named_asm_labels)]
|
||||||
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
= help: only GAS local labels of the form `N:` where N is a number may be used in inline asm
|
||||||
|
= note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
|
||||||
|
|
||||||
|
error: aborting due to 34 previous errors; 1 warning emitted
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue