Auto merge of #152187 - cuviper:beta-next, r=cuviper

[beta] backports, plus stable versions in stdarch

- Replace `stdarch` version placeholders with 1.94
- Parse ident with allowing recovery when trying to diagnose rust-lang/rust#151249
- Revert enabling `outline-atomics` on various platforms rust-lang/rust#151896
- Revert doc attribute parsing errors to future warnings rust-lang/rust#151952
- Remove the 4 failing tests from rustdoc-gui rust-lang/rust#152194
- Remove rustdoc GUI flaky test rust-lang/rust#152116
- Align `ArrayWindows` trait impls with `Windows` rust-lang/rust#151613
- Fix suppression of `unused_assignment` in binding of `unused_variable` rust-lang/rust#151556
- layout: handle rigid aliases without params rust-lang/rust#151814
- Fix missing unused_variables lint when using a match guard rust-lang/rust#151990
- Partially revert "resolve: Update `NameBindingData::vis` in place" rust-lang/rust#152498
- [BETA]: parse array lengths without stripping const blocks rust-lang/rust#152237

r? cuviper
This commit is contained in:
bors 2026-02-12 23:54:59 +00:00
commit 2e10913d41
112 changed files with 2209 additions and 2420 deletions

View file

@ -70,6 +70,42 @@ fn check_attr_crate_level<S: Stage>(cx: &mut AcceptContext<'_, '_, S>, span: Spa
true true
} }
// FIXME: To be removed once merged and replace with `cx.expected_name_value(span, _name)`.
fn expected_name_value<S: Stage>(
cx: &mut AcceptContext<'_, '_, S>,
span: Span,
_name: Option<Symbol>,
) {
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
AttributeLintKind::ExpectedNameValue,
span,
);
}
// FIXME: remove this method once merged and use `cx.expected_no_args(span)` instead.
fn expected_no_args<S: Stage>(cx: &mut AcceptContext<'_, '_, S>, span: Span) {
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
AttributeLintKind::ExpectedNoArgs,
span,
);
}
// FIXME: remove this method once merged and use `cx.expected_no_args(span)` instead.
// cx.expected_string_literal(span, _actual_literal);
fn expected_string_literal<S: Stage>(
cx: &mut AcceptContext<'_, '_, S>,
span: Span,
_actual_literal: Option<&MetaItemLit>,
) {
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
AttributeLintKind::MalformedDoc,
span,
);
}
fn parse_keyword_and_attribute<S: Stage>( fn parse_keyword_and_attribute<S: Stage>(
cx: &mut AcceptContext<'_, '_, S>, cx: &mut AcceptContext<'_, '_, S>,
path: &OwnedPathParser, path: &OwnedPathParser,
@ -78,12 +114,12 @@ fn parse_keyword_and_attribute<S: Stage>(
attr_name: Symbol, attr_name: Symbol,
) { ) {
let Some(nv) = args.name_value() else { let Some(nv) = args.name_value() else {
cx.expected_name_value(args.span().unwrap_or(path.span()), path.word_sym()); expected_name_value(cx, args.span().unwrap_or(path.span()), path.word_sym());
return; return;
}; };
let Some(value) = nv.value_as_str() else { let Some(value) = nv.value_as_str() else {
cx.expected_string_literal(nv.value_span, Some(nv.value_as_lit())); expected_string_literal(cx, nv.value_span, Some(nv.value_as_lit()));
return; return;
}; };
@ -127,12 +163,21 @@ impl DocParser {
match path.word_sym() { match path.word_sym() {
Some(sym::no_crate_inject) => { Some(sym::no_crate_inject) => {
if let Err(span) = args.no_args() { if let Err(span) = args.no_args() {
cx.expected_no_args(span); expected_no_args(cx, span);
return; return;
} }
if self.attribute.no_crate_inject.is_some() { if let Some(used_span) = self.attribute.no_crate_inject {
cx.duplicate_key(path.span(), sym::no_crate_inject); let unused_span = path.span();
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
AttributeLintKind::UnusedDuplicate {
this: unused_span,
other: used_span,
warning: true,
},
unused_span,
);
return; return;
} }
@ -144,7 +189,14 @@ impl DocParser {
} }
Some(sym::attr) => { Some(sym::attr) => {
let Some(list) = args.list() else { let Some(list) = args.list() else {
cx.expected_list(cx.attr_span, args); // FIXME: remove this method once merged and uncomment the line below instead.
// cx.expected_list(cx.attr_span, args);
let span = cx.attr_span;
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
AttributeLintKind::MalformedDoc,
span,
);
return; return;
}; };
@ -246,7 +298,7 @@ impl DocParser {
inline: DocInline, inline: DocInline,
) { ) {
if let Err(span) = args.no_args() { if let Err(span) = args.no_args() {
cx.expected_no_args(span); expected_no_args(cx, span);
return; return;
} }
@ -328,7 +380,14 @@ impl DocParser {
match sub_item.args() { match sub_item.args() {
a @ (ArgParser::NoArgs | ArgParser::NameValue(_)) => { a @ (ArgParser::NoArgs | ArgParser::NameValue(_)) => {
let Some(name) = sub_item.path().word_sym() else { let Some(name) = sub_item.path().word_sym() else {
cx.expected_identifier(sub_item.path().span()); // FIXME: remove this method once merged and uncomment the line
// below instead.
// cx.expected_identifier(sub_item.path().span());
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
AttributeLintKind::MalformedDoc,
sub_item.path().span(),
);
continue; continue;
}; };
if let Ok(CfgEntry::NameValue { name, value, .. }) = if let Ok(CfgEntry::NameValue { name, value, .. }) =
@ -391,7 +450,7 @@ impl DocParser {
macro_rules! no_args { macro_rules! no_args {
($ident: ident) => {{ ($ident: ident) => {{
if let Err(span) = args.no_args() { if let Err(span) = args.no_args() {
cx.expected_no_args(span); expected_no_args(cx, span);
return; return;
} }
@ -410,7 +469,7 @@ impl DocParser {
macro_rules! no_args_and_not_crate_level { macro_rules! no_args_and_not_crate_level {
($ident: ident) => {{ ($ident: ident) => {{
if let Err(span) = args.no_args() { if let Err(span) = args.no_args() {
cx.expected_no_args(span); expected_no_args(cx, span);
return; return;
} }
let span = path.span(); let span = path.span();
@ -423,7 +482,7 @@ impl DocParser {
macro_rules! no_args_and_crate_level { macro_rules! no_args_and_crate_level {
($ident: ident) => {{ ($ident: ident) => {{
if let Err(span) = args.no_args() { if let Err(span) = args.no_args() {
cx.expected_no_args(span); expected_no_args(cx, span);
return; return;
} }
let span = path.span(); let span = path.span();
@ -436,12 +495,12 @@ impl DocParser {
macro_rules! string_arg_and_crate_level { macro_rules! string_arg_and_crate_level {
($ident: ident) => {{ ($ident: ident) => {{
let Some(nv) = args.name_value() else { let Some(nv) = args.name_value() else {
cx.expected_name_value(args.span().unwrap_or(path.span()), path.word_sym()); expected_name_value(cx, args.span().unwrap_or(path.span()), path.word_sym());
return; return;
}; };
let Some(s) = nv.value_as_str() else { let Some(s) = nv.value_as_str() else {
cx.expected_string_literal(nv.value_span, Some(nv.value_as_lit())); expected_string_literal(cx, nv.value_span, Some(nv.value_as_lit()));
return; return;
}; };
@ -512,7 +571,14 @@ impl DocParser {
self.parse_single_test_doc_attr_item(cx, mip); self.parse_single_test_doc_attr_item(cx, mip);
} }
MetaItemOrLitParser::Lit(lit) => { MetaItemOrLitParser::Lit(lit) => {
cx.unexpected_literal(lit.span); // FIXME: remove this method once merged and uncomment the line
// below instead.
// cx.unexpected_literal(lit.span);
cx.emit_lint(
rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
AttributeLintKind::MalformedDoc,
lit.span,
);
} }
} }
} }
@ -582,7 +648,7 @@ impl DocParser {
let suggestions = cx.suggestions(); let suggestions = cx.suggestions();
let span = cx.attr_span; let span = cx.attr_span;
cx.emit_lint( cx.emit_lint(
rustc_session::lint::builtin::ILL_FORMED_ATTRIBUTE_INPUT, rustc_session::lint::builtin::INVALID_DOC_ATTRIBUTES,
AttributeLintKind::IllFormedAttributeInput { suggestions, docs: None }, AttributeLintKind::IllFormedAttributeInput { suggestions, docs: None },
span, span,
); );
@ -595,14 +661,14 @@ impl DocParser {
self.parse_single_doc_attr_item(cx, mip); self.parse_single_doc_attr_item(cx, mip);
} }
MetaItemOrLitParser::Lit(lit) => { MetaItemOrLitParser::Lit(lit) => {
cx.expected_name_value(lit.span, None); expected_name_value(cx, lit.span, None);
} }
} }
} }
} }
ArgParser::NameValue(nv) => { ArgParser::NameValue(nv) => {
if nv.value_as_str().is_none() { if nv.value_as_str().is_none() {
cx.expected_string_literal(nv.value_span, Some(nv.value_as_lit())); expected_string_literal(cx, nv.value_span, Some(nv.value_as_lit()));
} else { } else {
unreachable!( unreachable!(
"Should have been handled at the same time as sugar-syntaxed doc comments" "Should have been handled at the same time as sugar-syntaxed doc comments"

View file

@ -329,6 +329,14 @@ lint_expectation = this lint expectation is unfulfilled
.note = the `unfulfilled_lint_expectations` lint can't be expected and will always produce this message .note = the `unfulfilled_lint_expectations` lint can't be expected and will always produce this message
.rationale = {$rationale} .rationale = {$rationale}
lint_expected_name_value =
expected this to be of the form `... = "..."`
.warn = {-lint_previously_accepted}
lint_expected_no_args =
didn't expect any arguments here
.warn = {-lint_previously_accepted}
lint_for_loops_over_fallibles = lint_for_loops_over_fallibles =
for loop over {$article} `{$ref_prefix}{$ty}`. This is more readably written as an `if let` statement for loop over {$article} `{$ref_prefix}{$ty}`. This is more readably written as an `if let` statement
.suggestion = consider using `if let` to clear intent .suggestion = consider using `if let` to clear intent
@ -558,6 +566,10 @@ lint_macro_expr_fragment_specifier_2024_migration =
lint_malformed_attribute = malformed lint attribute input lint_malformed_attribute = malformed lint attribute input
lint_malformed_doc =
malformed `doc` attribute input
.warn = {-lint_previously_accepted}
lint_map_unit_fn = `Iterator::map` call that discard the iterator's values lint_map_unit_fn = `Iterator::map` call that discard the iterator's values
.note = `Iterator::map`, like many of the methods on `Iterator`, gets executed lazily, meaning that its effects won't be visible until it is iterated .note = `Iterator::map`, like many of the methods on `Iterator`, gets executed lazily, meaning that its effects won't be visible until it is iterated
.function_label = this function returns `()`, which is likely not what you wanted .function_label = this function returns `()`, which is likely not what you wanted

View file

@ -423,5 +423,11 @@ pub fn decorate_attribute_lint(
&AttributeLintKind::DoNotRecommendDoesNotExpectArgs => { &AttributeLintKind::DoNotRecommendDoesNotExpectArgs => {
lints::DoNotRecommendDoesNotExpectArgs.decorate_lint(diag) lints::DoNotRecommendDoesNotExpectArgs.decorate_lint(diag)
} }
&AttributeLintKind::MalformedDoc => lints::MalformedDoc.decorate_lint(diag),
&AttributeLintKind::ExpectedNoArgs => lints::ExpectedNoArgs.decorate_lint(diag),
&AttributeLintKind::ExpectedNameValue => lints::ExpectedNameValue.decorate_lint(diag),
} }
} }

View file

@ -3196,6 +3196,21 @@ pub(crate) struct UnusedDuplicate {
pub warning: bool, pub warning: bool,
} }
#[derive(LintDiagnostic)]
#[diag(lint_malformed_doc)]
#[warning]
pub(crate) struct MalformedDoc;
#[derive(LintDiagnostic)]
#[diag(lint_expected_no_args)]
#[warning]
pub(crate) struct ExpectedNoArgs;
#[derive(LintDiagnostic)]
#[diag(lint_expected_name_value)]
#[warning]
pub(crate) struct ExpectedNameValue;
#[derive(LintDiagnostic)] #[derive(LintDiagnostic)]
#[diag(lint_unsafe_attr_outside_unsafe)] #[diag(lint_unsafe_attr_outside_unsafe)]
pub(crate) struct UnsafeAttrOutsideUnsafeLint { pub(crate) struct UnsafeAttrOutsideUnsafeLint {

View file

@ -3456,7 +3456,7 @@ declare_lint! {
/// but this lint was introduced to avoid breaking any existing /// but this lint was introduced to avoid breaking any existing
/// crates which included them. /// crates which included them.
pub INVALID_DOC_ATTRIBUTES, pub INVALID_DOC_ATTRIBUTES,
Deny, Warn,
"detects invalid `#[doc(...)]` attributes", "detects invalid `#[doc(...)]` attributes",
} }

View file

@ -822,6 +822,9 @@ pub enum AttributeLintKind {
DocTestLiteral, DocTestLiteral,
AttrCrateLevelOnly, AttrCrateLevelOnly,
DoNotRecommendDoesNotExpectArgs, DoNotRecommendDoesNotExpectArgs,
MalformedDoc,
ExpectedNoArgs,
ExpectedNameValue,
} }
pub type RegisteredTools = FxIndexSet<Ident>; pub type RegisteredTools = FxIndexSet<Ident>;

View file

@ -986,7 +986,7 @@ impl<'a, 'tcx> AssignmentResult<'a, 'tcx> {
// warn twice, for the unused local and for the unused assignment. Therefore, we remove // warn twice, for the unused local and for the unused assignment. Therefore, we remove
// from the list of assignments the ones that happen at the definition site. // from the list of assignments the ones that happen at the definition site.
statements.retain(|source_info, _| { statements.retain(|source_info, _| {
source_info.span.find_ancestor_inside(binding.pat_span).is_none() !binding.introductions.iter().any(|intro| intro.span == source_info.span)
}); });
// Extra assignments that we recognize thanks to the initialization span. We need to // Extra assignments that we recognize thanks to the initialization span. We need to
@ -1238,9 +1238,12 @@ struct TransferFunction<'a, 'tcx> {
impl<'tcx> Visitor<'tcx> for TransferFunction<'_, 'tcx> { impl<'tcx> Visitor<'tcx> for TransferFunction<'_, 'tcx> {
fn visit_statement(&mut self, statement: &Statement<'tcx>, location: Location) { fn visit_statement(&mut self, statement: &Statement<'tcx>, location: Location) {
match statement.kind { match statement.kind {
// `ForLet(None)` fake read erroneously marks the just-assigned local as live. // `ForLet(None)` and `ForGuardBinding` fake reads erroneously mark the just-assigned
// This defeats the purpose of the analysis for `let` bindings. // locals as live. This defeats the purpose of the analysis for such bindings.
StatementKind::FakeRead(box (FakeReadCause::ForLet(None), _)) => return, StatementKind::FakeRead(box (
FakeReadCause::ForLet(None) | FakeReadCause::ForGuardBinding,
_,
)) => return,
// Handle self-assignment by restricting the read/write they do. // Handle self-assignment by restricting the read/write they do.
StatementKind::Assign(box (ref dest, ref rvalue)) StatementKind::Assign(box (ref dest, ref rvalue))
if self.self_assignment.contains(&location) => if self.self_assignment.contains(&location) =>

View file

@ -2264,7 +2264,7 @@ impl<'a> Parser<'a> {
&& self.look_ahead(1, |t| *t == token::Comma || *t == token::CloseParen) && self.look_ahead(1, |t| *t == token::Comma || *t == token::CloseParen)
{ {
// `fn foo(String s) {}` // `fn foo(String s) {}`
let ident = self.parse_ident().unwrap(); let ident = self.parse_ident_common(true).unwrap();
let span = pat.span.with_hi(ident.span.hi()); let span = pat.span.with_hi(ident.span.hi());
err.span_suggestion( err.span_suggestion(

View file

@ -1622,16 +1622,8 @@ impl<'a> Parser<'a> {
let first_expr = self.parse_expr()?; let first_expr = self.parse_expr()?;
if self.eat(exp!(Semi)) { if self.eat(exp!(Semi)) {
// Repeating array syntax: `[ 0; 512 ]` // Repeating array syntax: `[ 0; 512 ]`
let count = if self.eat_keyword(exp!(Const)) { let count =
// While we could just disambiguate `Direct` from `AnonConst` by self.parse_expr_anon_const(|this, expr| this.mgca_direct_lit_hack(expr))?;
// treating all const block exprs as `AnonConst`, that would
// complicate the DefCollector and likely all other visitors.
// So we strip the const blockiness and just store it as a block
// in the AST with the extra disambiguator on the AnonConst
self.parse_mgca_const_block(false)?
} else {
self.parse_expr_anon_const(|this, expr| this.mgca_direct_lit_hack(expr))?
};
self.expect(close)?; self.expect(close)?;
ExprKind::Repeat(first_expr, count) ExprKind::Repeat(first_expr, count)
} else if self.eat(exp!(Comma)) { } else if self.eat(exp!(Comma)) {

View file

@ -408,12 +408,11 @@ impl<'a> Parser<'a> {
let insert_span = ident_span.shrink_to_lo(); let insert_span = ident_span.shrink_to_lo();
let ident = if self.token.is_ident() let ident = if self.token.is_ident()
&& self.token.is_non_reserved_ident()
&& (!is_const || self.look_ahead(1, |t| *t == token::OpenParen)) && (!is_const || self.look_ahead(1, |t| *t == token::OpenParen))
&& self.look_ahead(1, |t| { && self.look_ahead(1, |t| {
matches!(t.kind, token::Lt | token::OpenBrace | token::OpenParen) matches!(t.kind, token::Lt | token::OpenBrace | token::OpenParen)
}) { }) {
self.parse_ident().unwrap() self.parse_ident_common(true).unwrap()
} else { } else {
return Ok(()); return Ok(());
}; };

View file

@ -469,7 +469,7 @@ impl<'a> Parser<'a> {
self.parse_ident_common(self.may_recover()) self.parse_ident_common(self.may_recover())
} }
fn parse_ident_common(&mut self, recover: bool) -> PResult<'a, Ident> { pub(crate) fn parse_ident_common(&mut self, recover: bool) -> PResult<'a, Ident> {
let (ident, is_raw) = self.ident_or_err(recover)?; let (ident, is_raw) = self.ident_or_err(recover)?;
if is_raw == IdentIsRaw::No && ident.is_reserved() { if is_raw == IdentIsRaw::No && ident.is_reserved() {

View file

@ -658,16 +658,8 @@ impl<'a> Parser<'a> {
}; };
let ty = if self.eat(exp!(Semi)) { let ty = if self.eat(exp!(Semi)) {
let mut length = if self.eat_keyword(exp!(Const)) { let mut length =
// While we could just disambiguate `Direct` from `AnonConst` by self.parse_expr_anon_const(|this, expr| this.mgca_direct_lit_hack(expr))?;
// treating all const block exprs as `AnonConst`, that would
// complicate the DefCollector and likely all other visitors.
// So we strip the const blockiness and just store it as a block
// in the AST with the extra disambiguator on the AnonConst
self.parse_mgca_const_block(false)?
} else {
self.parse_expr_anon_const(|this, expr| this.mgca_direct_lit_hack(expr))?
};
if let Err(e) = self.expect(exp!(CloseBracket)) { if let Err(e) = self.expect(exp!(CloseBracket)) {
// Try to recover from `X<Y, ...>` when `X::<Y, ...>` works // Try to recover from `X<Y, ...>` when `X::<Y, ...>` works

View file

@ -401,8 +401,9 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
} }
} else if !old_glob_decl.vis().is_at_least(glob_decl.vis(), self.tcx) { } else if !old_glob_decl.vis().is_at_least(glob_decl.vis(), self.tcx) {
// We are glob-importing the same item but with greater visibility. // We are glob-importing the same item but with greater visibility.
old_glob_decl.vis.set_unchecked(glob_decl.vis()); // FIXME: Update visibility in place, but without regressions
old_glob_decl // (#152004, #151124, #152347).
glob_decl
} else if glob_decl.is_ambiguity_recursive() && !old_glob_decl.is_ambiguity_recursive() { } else if glob_decl.is_ambiguity_recursive() && !old_glob_decl.is_ambiguity_recursive() {
// Overwriting a non-ambiguous glob import with an ambiguous glob import. // Overwriting a non-ambiguous glob import with an ambiguous glob import.
old_glob_decl.ambiguity.set_unchecked(Some(glob_decl)); old_glob_decl.ambiguity.set_unchecked(Some(glob_decl));

View file

@ -21,7 +21,7 @@ pub(crate) fn target() -> Target {
max_atomic_width: Some(128), max_atomic_width: Some(128),
// As documented in https://developer.android.com/ndk/guides/cpu-features.html // As documented in https://developer.android.com/ndk/guides/cpu-features.html
// the neon (ASIMD) and FP must exist on all android aarch64 targets. // the neon (ASIMD) and FP must exist on all android aarch64 targets.
features: "+v8a,+neon,+outline-atomics".into(), features: "+v8a,+neon".into(),
// the AAPCS64 expects use of non-leaf frame pointers per // the AAPCS64 expects use of non-leaf frame pointers per
// https://github.com/ARM-software/abi-aa/blob/4492d1570eb70c8fd146623e0db65b2d241f12e7/aapcs64/aapcs64.rst#the-frame-pointer // https://github.com/ARM-software/abi-aa/blob/4492d1570eb70c8fd146623e0db65b2d241f12e7/aapcs64/aapcs64.rst#the-frame-pointer
// and we tend to encounter interesting bugs in AArch64 unwinding code if we do not // and we tend to encounter interesting bugs in AArch64 unwinding code if we do not

View file

@ -3,7 +3,7 @@ use crate::spec::{Arch, Cc, FramePointer, LinkerFlavor, Lld, Target, TargetMetad
pub(crate) fn target() -> Target { pub(crate) fn target() -> Target {
let mut base = base::windows_gnullvm::opts(); let mut base = base::windows_gnullvm::opts();
base.max_atomic_width = Some(128); base.max_atomic_width = Some(128);
base.features = "+v8a,+neon,+outline-atomics".into(); base.features = "+v8a,+neon".into();
base.linker = Some("aarch64-w64-mingw32-clang".into()); base.linker = Some("aarch64-w64-mingw32-clang".into());
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::No, Lld::No), &["-m", "arm64pe"]); base.add_pre_link_args(LinkerFlavor::Gnu(Cc::No, Lld::No), &["-m", "arm64pe"]);

View file

@ -3,7 +3,7 @@ use crate::spec::{Arch, FramePointer, Target, TargetMetadata, base};
pub(crate) fn target() -> Target { pub(crate) fn target() -> Target {
let mut base = base::windows_msvc::opts(); let mut base = base::windows_msvc::opts();
base.max_atomic_width = Some(128); base.max_atomic_width = Some(128);
base.features = "+v8a,+neon,+outline-atomics".into(); base.features = "+v8a,+neon".into();
// Microsoft recommends enabling frame pointers on Arm64 Windows. // Microsoft recommends enabling frame pointers on Arm64 Windows.
// From https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#integer-registers // From https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#integer-registers

View file

@ -15,7 +15,7 @@ pub(crate) fn target() -> Target {
data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
arch: Arch::AArch64, arch: Arch::AArch64,
options: TargetOptions { options: TargetOptions {
features: "+v8a,+outline-atomics".into(), features: "+v8a".into(),
max_atomic_width: Some(128), max_atomic_width: Some(128),
stack_probes: StackProbeType::Inline, stack_probes: StackProbeType::Inline,
supported_sanitizers: SanitizerSet::ADDRESS supported_sanitizers: SanitizerSet::ADDRESS

View file

@ -5,7 +5,7 @@ use crate::spec::{
pub(crate) fn target() -> Target { pub(crate) fn target() -> Target {
let mut base = base::fuchsia::opts(); let mut base = base::fuchsia::opts();
base.cpu = "generic".into(); base.cpu = "generic".into();
base.features = "+v8a,+crc,+aes,+sha2,+neon,+outline-atomics".into(); base.features = "+v8a,+crc,+aes,+sha2,+neon".into();
base.max_atomic_width = Some(128); base.max_atomic_width = Some(128);
base.stack_probes = StackProbeType::Inline; base.stack_probes = StackProbeType::Inline;
base.supported_sanitizers = SanitizerSet::ADDRESS base.supported_sanitizers = SanitizerSet::ADDRESS

View file

@ -13,7 +13,7 @@ pub(crate) fn target() -> Target {
data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
arch: Arch::AArch64, arch: Arch::AArch64,
options: TargetOptions { options: TargetOptions {
features: "+v8a,+outline-atomics".into(), features: "+v8a".into(),
max_atomic_width: Some(128), max_atomic_width: Some(128),
stack_probes: StackProbeType::Inline, stack_probes: StackProbeType::Inline,
..base::openbsd::opts() ..base::openbsd::opts()

View file

@ -764,14 +764,20 @@ fn layout_of_uncached<'tcx>(
} }
ty::Alias(..) => { ty::Alias(..) => {
// NOTE(eddyb) `layout_of` query should've normalized these away, // In case we're still in a generic context, aliases might be rigid. E.g.
// if that was possible, so there's no reason to try again here. // if we've got a `T: Trait` where-bound, `T::Assoc` cannot be normalized
let err = if ty.has_param() { // in the current context.
//
// For some builtin traits, generic aliases can be rigid even in an empty environment,
// e.g. `<T as Pointee>::Metadata`.
//
// Due to trivial bounds, this can even be the case if the alias does not reference
// any generic parameters, e.g. a `for<'a> u32: Trait<'a>` where-bound means that
// `<u32 as Trait<'static>>::Assoc` is rigid.
let err = if ty.has_param() || !cx.typing_env.param_env.caller_bounds().is_empty() {
LayoutError::TooGeneric(ty) LayoutError::TooGeneric(ty)
} else { } else {
// This is only reachable with unsatisfiable predicates. For example, if we have unreachable!("invalid rigid alias in layout_of after normalization: {ty:?}");
// `u8: Iterator`, then we can't compute the layout of `<u8 as Iterator>::Item`.
LayoutError::Unknown(ty)
}; };
return Err(error(cx, err)); return Err(error(cx, err));
} }

View file

@ -2175,7 +2175,7 @@ unsafe impl<T> Sync for ChunksExactMut<'_, T> where T: Sync {}
/// ///
/// [`array_windows`]: slice::array_windows /// [`array_windows`]: slice::array_windows
/// [slices]: slice /// [slices]: slice
#[derive(Debug, Clone, Copy)] #[derive(Debug)]
#[stable(feature = "array_windows", since = "1.94.0")] #[stable(feature = "array_windows", since = "1.94.0")]
#[must_use = "iterators are lazy and do nothing unless consumed"] #[must_use = "iterators are lazy and do nothing unless consumed"]
pub struct ArrayWindows<'a, T: 'a, const N: usize> { pub struct ArrayWindows<'a, T: 'a, const N: usize> {
@ -2189,6 +2189,14 @@ impl<'a, T: 'a, const N: usize> ArrayWindows<'a, T, N> {
} }
} }
// FIXME(#26925) Remove in favor of `#[derive(Clone)]`
#[stable(feature = "array_windows", since = "1.94.0")]
impl<T, const N: usize> Clone for ArrayWindows<'_, T, N> {
fn clone(&self) -> Self {
Self { v: self.v }
}
}
#[stable(feature = "array_windows", since = "1.94.0")] #[stable(feature = "array_windows", since = "1.94.0")]
impl<'a, T, const N: usize> Iterator for ArrayWindows<'a, T, N> { impl<'a, T, const N: usize> Iterator for ArrayWindows<'a, T, N> {
type Item = &'a [T; N]; type Item = &'a [T; N];
@ -2224,6 +2232,14 @@ impl<'a, T, const N: usize> Iterator for ArrayWindows<'a, T, N> {
fn last(self) -> Option<Self::Item> { fn last(self) -> Option<Self::Item> {
self.v.last_chunk() self.v.last_chunk()
} }
unsafe fn __iterator_get_unchecked(&mut self, idx: usize) -> Self::Item {
// SAFETY: since the caller guarantees that `idx` is in bounds,
// which means that `idx` cannot overflow an `isize`, and the
// "slice" created by `cast_array` is a subslice of `self.v`
// thus is guaranteed to be valid for the lifetime `'a` of `self.v`.
unsafe { &*self.v.as_ptr().add(idx).cast_array() }
}
} }
#[stable(feature = "array_windows", since = "1.94.0")] #[stable(feature = "array_windows", since = "1.94.0")]
@ -2252,6 +2268,22 @@ impl<T, const N: usize> ExactSizeIterator for ArrayWindows<'_, T, N> {
} }
} }
#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<T, const N: usize> TrustedLen for ArrayWindows<'_, T, N> {}
#[stable(feature = "array_windows", since = "1.94.0")]
impl<T, const N: usize> FusedIterator for ArrayWindows<'_, T, N> {}
#[doc(hidden)]
#[unstable(feature = "trusted_random_access", issue = "none")]
unsafe impl<T, const N: usize> TrustedRandomAccess for ArrayWindows<'_, T, N> {}
#[doc(hidden)]
#[unstable(feature = "trusted_random_access", issue = "none")]
unsafe impl<T, const N: usize> TrustedRandomAccessNoCoerce for ArrayWindows<'_, T, N> {
const MAY_HAVE_SIDE_EFFECT: bool = false;
}
/// An iterator over a slice in (non-overlapping) chunks (`chunk_size` elements at a /// An iterator over a slice in (non-overlapping) chunks (`chunk_size` elements at a
/// time), starting at the end of the slice. /// time), starting at the end of the slice.
/// ///

View file

@ -1501,7 +1501,7 @@ pub fn vceqh_f16(a: f16, b: f16) -> u16 {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fcmeq))] #[cfg_attr(test, assert_instr(fcmeq))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vceqz_f16(a: float16x4_t) -> uint16x4_t { pub fn vceqz_f16(a: float16x4_t) -> uint16x4_t {
let b: f16x4 = f16x4::new(0.0, 0.0, 0.0, 0.0); let b: f16x4 = f16x4::new(0.0, 0.0, 0.0, 0.0);
@ -1512,7 +1512,7 @@ pub fn vceqz_f16(a: float16x4_t) -> uint16x4_t {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fcmeq))] #[cfg_attr(test, assert_instr(fcmeq))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vceqzq_f16(a: float16x8_t) -> uint16x8_t { pub fn vceqzq_f16(a: float16x8_t) -> uint16x8_t {
let b: f16x8 = f16x8::new(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); let b: f16x8 = f16x8::new(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
@ -7219,7 +7219,7 @@ pub fn vcvtq_f64_u64(a: uint64x2_t) -> float64x2_t {
#[inline] #[inline]
#[target_feature(enable = "neon")] #[target_feature(enable = "neon")]
#[cfg_attr(test, assert_instr(fcvtn2))] #[cfg_attr(test, assert_instr(fcvtn2))]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vcvt_high_f16_f32(a: float16x4_t, b: float32x4_t) -> float16x8_t { pub fn vcvt_high_f16_f32(a: float16x4_t, b: float32x4_t) -> float16x8_t {
vcombine_f16(a, vcvt_f16_f32(b)) vcombine_f16(a, vcvt_f16_f32(b))
@ -7229,7 +7229,7 @@ pub fn vcvt_high_f16_f32(a: float16x4_t, b: float32x4_t) -> float16x8_t {
#[inline] #[inline]
#[target_feature(enable = "neon")] #[target_feature(enable = "neon")]
#[cfg_attr(test, assert_instr(fcvtl2))] #[cfg_attr(test, assert_instr(fcvtl2))]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vcvt_high_f32_f16(a: float16x8_t) -> float32x4_t { pub fn vcvt_high_f32_f16(a: float16x8_t) -> float32x4_t {
vcvt_f32_f16(vget_high_f16(a)) vcvt_f32_f16(vget_high_f16(a))
@ -7468,7 +7468,7 @@ pub fn vcvtq_u64_f64(a: float64x2_t) -> uint64x2_t {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fcvtas))] #[cfg_attr(test, assert_instr(fcvtas))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vcvta_s16_f16(a: float16x4_t) -> int16x4_t { pub fn vcvta_s16_f16(a: float16x4_t) -> int16x4_t {
unsafe extern "unadjusted" { unsafe extern "unadjusted" {
@ -7485,7 +7485,7 @@ pub fn vcvta_s16_f16(a: float16x4_t) -> int16x4_t {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fcvtas))] #[cfg_attr(test, assert_instr(fcvtas))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vcvtaq_s16_f16(a: float16x8_t) -> int16x8_t { pub fn vcvtaq_s16_f16(a: float16x8_t) -> int16x8_t {
unsafe extern "unadjusted" { unsafe extern "unadjusted" {
@ -7566,7 +7566,7 @@ pub fn vcvtaq_s64_f64(a: float64x2_t) -> int64x2_t {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fcvtau))] #[cfg_attr(test, assert_instr(fcvtau))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vcvta_u16_f16(a: float16x4_t) -> uint16x4_t { pub fn vcvta_u16_f16(a: float16x4_t) -> uint16x4_t {
unsafe extern "unadjusted" { unsafe extern "unadjusted" {
@ -7583,7 +7583,7 @@ pub fn vcvta_u16_f16(a: float16x4_t) -> uint16x4_t {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fcvtau))] #[cfg_attr(test, assert_instr(fcvtau))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vcvtaq_u16_f16(a: float16x8_t) -> uint16x8_t { pub fn vcvtaq_u16_f16(a: float16x8_t) -> uint16x8_t {
unsafe extern "unadjusted" { unsafe extern "unadjusted" {
@ -8154,7 +8154,7 @@ pub fn vcvth_u64_f16(a: f16) -> u64 {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fcvtms))] #[cfg_attr(test, assert_instr(fcvtms))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vcvtm_s16_f16(a: float16x4_t) -> int16x4_t { pub fn vcvtm_s16_f16(a: float16x4_t) -> int16x4_t {
unsafe extern "unadjusted" { unsafe extern "unadjusted" {
@ -8171,7 +8171,7 @@ pub fn vcvtm_s16_f16(a: float16x4_t) -> int16x4_t {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fcvtms))] #[cfg_attr(test, assert_instr(fcvtms))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vcvtmq_s16_f16(a: float16x8_t) -> int16x8_t { pub fn vcvtmq_s16_f16(a: float16x8_t) -> int16x8_t {
unsafe extern "unadjusted" { unsafe extern "unadjusted" {
@ -8252,7 +8252,7 @@ pub fn vcvtmq_s64_f64(a: float64x2_t) -> int64x2_t {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fcvtmu))] #[cfg_attr(test, assert_instr(fcvtmu))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vcvtm_u16_f16(a: float16x4_t) -> uint16x4_t { pub fn vcvtm_u16_f16(a: float16x4_t) -> uint16x4_t {
unsafe extern "unadjusted" { unsafe extern "unadjusted" {
@ -8269,7 +8269,7 @@ pub fn vcvtm_u16_f16(a: float16x4_t) -> uint16x4_t {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fcvtmu))] #[cfg_attr(test, assert_instr(fcvtmu))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vcvtmq_u16_f16(a: float16x8_t) -> uint16x8_t { pub fn vcvtmq_u16_f16(a: float16x8_t) -> uint16x8_t {
unsafe extern "unadjusted" { unsafe extern "unadjusted" {
@ -8502,7 +8502,7 @@ pub fn vcvtmd_u64_f64(a: f64) -> u64 {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fcvtns))] #[cfg_attr(test, assert_instr(fcvtns))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vcvtn_s16_f16(a: float16x4_t) -> int16x4_t { pub fn vcvtn_s16_f16(a: float16x4_t) -> int16x4_t {
unsafe extern "unadjusted" { unsafe extern "unadjusted" {
@ -8519,7 +8519,7 @@ pub fn vcvtn_s16_f16(a: float16x4_t) -> int16x4_t {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fcvtns))] #[cfg_attr(test, assert_instr(fcvtns))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vcvtnq_s16_f16(a: float16x8_t) -> int16x8_t { pub fn vcvtnq_s16_f16(a: float16x8_t) -> int16x8_t {
unsafe extern "unadjusted" { unsafe extern "unadjusted" {
@ -8600,7 +8600,7 @@ pub fn vcvtnq_s64_f64(a: float64x2_t) -> int64x2_t {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fcvtnu))] #[cfg_attr(test, assert_instr(fcvtnu))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vcvtn_u16_f16(a: float16x4_t) -> uint16x4_t { pub fn vcvtn_u16_f16(a: float16x4_t) -> uint16x4_t {
unsafe extern "unadjusted" { unsafe extern "unadjusted" {
@ -8617,7 +8617,7 @@ pub fn vcvtn_u16_f16(a: float16x4_t) -> uint16x4_t {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fcvtnu))] #[cfg_attr(test, assert_instr(fcvtnu))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vcvtnq_u16_f16(a: float16x8_t) -> uint16x8_t { pub fn vcvtnq_u16_f16(a: float16x8_t) -> uint16x8_t {
unsafe extern "unadjusted" { unsafe extern "unadjusted" {
@ -8850,7 +8850,7 @@ pub fn vcvtnd_u64_f64(a: f64) -> u64 {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fcvtps))] #[cfg_attr(test, assert_instr(fcvtps))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vcvtp_s16_f16(a: float16x4_t) -> int16x4_t { pub fn vcvtp_s16_f16(a: float16x4_t) -> int16x4_t {
unsafe extern "unadjusted" { unsafe extern "unadjusted" {
@ -8867,7 +8867,7 @@ pub fn vcvtp_s16_f16(a: float16x4_t) -> int16x4_t {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fcvtps))] #[cfg_attr(test, assert_instr(fcvtps))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vcvtpq_s16_f16(a: float16x8_t) -> int16x8_t { pub fn vcvtpq_s16_f16(a: float16x8_t) -> int16x8_t {
unsafe extern "unadjusted" { unsafe extern "unadjusted" {
@ -8948,7 +8948,7 @@ pub fn vcvtpq_s64_f64(a: float64x2_t) -> int64x2_t {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fcvtpu))] #[cfg_attr(test, assert_instr(fcvtpu))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vcvtp_u16_f16(a: float16x4_t) -> uint16x4_t { pub fn vcvtp_u16_f16(a: float16x4_t) -> uint16x4_t {
unsafe extern "unadjusted" { unsafe extern "unadjusted" {
@ -8965,7 +8965,7 @@ pub fn vcvtp_u16_f16(a: float16x4_t) -> uint16x4_t {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fcvtpu))] #[cfg_attr(test, assert_instr(fcvtpu))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vcvtpq_u16_f16(a: float16x8_t) -> uint16x8_t { pub fn vcvtpq_u16_f16(a: float16x8_t) -> uint16x8_t {
unsafe extern "unadjusted" { unsafe extern "unadjusted" {
@ -9429,7 +9429,7 @@ pub fn vcvtxd_f32_f64(a: f64) -> f32 {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vdiv_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vdiv_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fdiv))] #[cfg_attr(test, assert_instr(fdiv))]
pub fn vdiv_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { pub fn vdiv_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
@ -9439,7 +9439,7 @@ pub fn vdiv_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vdivq_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vdivq_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fdiv))] #[cfg_attr(test, assert_instr(fdiv))]
pub fn vdivq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { pub fn vdivq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t {
@ -10106,7 +10106,7 @@ pub fn vfma_f64(a: float64x1_t, b: float64x1_t, c: float64x1_t) -> float64x1_t {
#[cfg_attr(test, assert_instr(fmla, LANE = 0))] #[cfg_attr(test, assert_instr(fmla, LANE = 0))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfma_lane_f16<const LANE: i32>( pub fn vfma_lane_f16<const LANE: i32>(
a: float16x4_t, a: float16x4_t,
@ -10122,7 +10122,7 @@ pub fn vfma_lane_f16<const LANE: i32>(
#[cfg_attr(test, assert_instr(fmla, LANE = 0))] #[cfg_attr(test, assert_instr(fmla, LANE = 0))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfma_laneq_f16<const LANE: i32>( pub fn vfma_laneq_f16<const LANE: i32>(
a: float16x4_t, a: float16x4_t,
@ -10138,7 +10138,7 @@ pub fn vfma_laneq_f16<const LANE: i32>(
#[cfg_attr(test, assert_instr(fmla, LANE = 0))] #[cfg_attr(test, assert_instr(fmla, LANE = 0))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmaq_lane_f16<const LANE: i32>( pub fn vfmaq_lane_f16<const LANE: i32>(
a: float16x8_t, a: float16x8_t,
@ -10154,7 +10154,7 @@ pub fn vfmaq_lane_f16<const LANE: i32>(
#[cfg_attr(test, assert_instr(fmla, LANE = 0))] #[cfg_attr(test, assert_instr(fmla, LANE = 0))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmaq_laneq_f16<const LANE: i32>( pub fn vfmaq_laneq_f16<const LANE: i32>(
a: float16x8_t, a: float16x8_t,
@ -10432,7 +10432,7 @@ pub fn vfmad_laneq_f64<const LANE: i32>(a: f64, b: f64, c: float64x2_t) -> f64 {
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fmlal2))] #[cfg_attr(test, assert_instr(fmlal2))]
pub fn vfmlal_high_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float32x2_t { pub fn vfmlal_high_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float32x2_t {
@ -10450,7 +10450,7 @@ pub fn vfmlal_high_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float3
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fmlal2))] #[cfg_attr(test, assert_instr(fmlal2))]
pub fn vfmlalq_high_f16(r: float32x4_t, a: float16x8_t, b: float16x8_t) -> float32x4_t { pub fn vfmlalq_high_f16(r: float32x4_t, a: float16x8_t, b: float16x8_t) -> float32x4_t {
@ -10470,7 +10470,7 @@ pub fn vfmlalq_high_f16(r: float32x4_t, a: float16x8_t, b: float16x8_t) -> float
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmlal_lane_high_f16<const LANE: i32>( pub fn vfmlal_lane_high_f16<const LANE: i32>(
r: float32x2_t, r: float32x2_t,
@ -10487,7 +10487,7 @@ pub fn vfmlal_lane_high_f16<const LANE: i32>(
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmlal_laneq_high_f16<const LANE: i32>( pub fn vfmlal_laneq_high_f16<const LANE: i32>(
r: float32x2_t, r: float32x2_t,
@ -10504,7 +10504,7 @@ pub fn vfmlal_laneq_high_f16<const LANE: i32>(
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmlalq_lane_high_f16<const LANE: i32>( pub fn vfmlalq_lane_high_f16<const LANE: i32>(
r: float32x4_t, r: float32x4_t,
@ -10521,7 +10521,7 @@ pub fn vfmlalq_lane_high_f16<const LANE: i32>(
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmlalq_laneq_high_f16<const LANE: i32>( pub fn vfmlalq_laneq_high_f16<const LANE: i32>(
r: float32x4_t, r: float32x4_t,
@ -10538,7 +10538,7 @@ pub fn vfmlalq_laneq_high_f16<const LANE: i32>(
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmlal_lane_low_f16<const LANE: i32>( pub fn vfmlal_lane_low_f16<const LANE: i32>(
r: float32x2_t, r: float32x2_t,
@ -10555,7 +10555,7 @@ pub fn vfmlal_lane_low_f16<const LANE: i32>(
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmlal_laneq_low_f16<const LANE: i32>( pub fn vfmlal_laneq_low_f16<const LANE: i32>(
r: float32x2_t, r: float32x2_t,
@ -10572,7 +10572,7 @@ pub fn vfmlal_laneq_low_f16<const LANE: i32>(
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmlalq_lane_low_f16<const LANE: i32>( pub fn vfmlalq_lane_low_f16<const LANE: i32>(
r: float32x4_t, r: float32x4_t,
@ -10589,7 +10589,7 @@ pub fn vfmlalq_lane_low_f16<const LANE: i32>(
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmlalq_laneq_low_f16<const LANE: i32>( pub fn vfmlalq_laneq_low_f16<const LANE: i32>(
r: float32x4_t, r: float32x4_t,
@ -10604,7 +10604,7 @@ pub fn vfmlalq_laneq_low_f16<const LANE: i32>(
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fmlal))] #[cfg_attr(test, assert_instr(fmlal))]
pub fn vfmlal_low_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float32x2_t { pub fn vfmlal_low_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float32x2_t {
@ -10622,7 +10622,7 @@ pub fn vfmlal_low_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float32
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fmlal))] #[cfg_attr(test, assert_instr(fmlal))]
pub fn vfmlalq_low_f16(r: float32x4_t, a: float16x8_t, b: float16x8_t) -> float32x4_t { pub fn vfmlalq_low_f16(r: float32x4_t, a: float16x8_t, b: float16x8_t) -> float32x4_t {
@ -10640,7 +10640,7 @@ pub fn vfmlalq_low_f16(r: float32x4_t, a: float16x8_t, b: float16x8_t) -> float3
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fmlsl2))] #[cfg_attr(test, assert_instr(fmlsl2))]
pub fn vfmlsl_high_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float32x2_t { pub fn vfmlsl_high_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float32x2_t {
@ -10658,7 +10658,7 @@ pub fn vfmlsl_high_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float3
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fmlsl2))] #[cfg_attr(test, assert_instr(fmlsl2))]
pub fn vfmlslq_high_f16(r: float32x4_t, a: float16x8_t, b: float16x8_t) -> float32x4_t { pub fn vfmlslq_high_f16(r: float32x4_t, a: float16x8_t, b: float16x8_t) -> float32x4_t {
@ -10678,7 +10678,7 @@ pub fn vfmlslq_high_f16(r: float32x4_t, a: float16x8_t, b: float16x8_t) -> float
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmlsl_lane_high_f16<const LANE: i32>( pub fn vfmlsl_lane_high_f16<const LANE: i32>(
r: float32x2_t, r: float32x2_t,
@ -10695,7 +10695,7 @@ pub fn vfmlsl_lane_high_f16<const LANE: i32>(
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmlsl_laneq_high_f16<const LANE: i32>( pub fn vfmlsl_laneq_high_f16<const LANE: i32>(
r: float32x2_t, r: float32x2_t,
@ -10712,7 +10712,7 @@ pub fn vfmlsl_laneq_high_f16<const LANE: i32>(
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmlslq_lane_high_f16<const LANE: i32>( pub fn vfmlslq_lane_high_f16<const LANE: i32>(
r: float32x4_t, r: float32x4_t,
@ -10729,7 +10729,7 @@ pub fn vfmlslq_lane_high_f16<const LANE: i32>(
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmlslq_laneq_high_f16<const LANE: i32>( pub fn vfmlslq_laneq_high_f16<const LANE: i32>(
r: float32x4_t, r: float32x4_t,
@ -10746,7 +10746,7 @@ pub fn vfmlslq_laneq_high_f16<const LANE: i32>(
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmlsl_lane_low_f16<const LANE: i32>( pub fn vfmlsl_lane_low_f16<const LANE: i32>(
r: float32x2_t, r: float32x2_t,
@ -10763,7 +10763,7 @@ pub fn vfmlsl_lane_low_f16<const LANE: i32>(
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmlsl_laneq_low_f16<const LANE: i32>( pub fn vfmlsl_laneq_low_f16<const LANE: i32>(
r: float32x2_t, r: float32x2_t,
@ -10780,7 +10780,7 @@ pub fn vfmlsl_laneq_low_f16<const LANE: i32>(
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmlslq_lane_low_f16<const LANE: i32>( pub fn vfmlslq_lane_low_f16<const LANE: i32>(
r: float32x4_t, r: float32x4_t,
@ -10797,7 +10797,7 @@ pub fn vfmlslq_lane_low_f16<const LANE: i32>(
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmlslq_laneq_low_f16<const LANE: i32>( pub fn vfmlslq_laneq_low_f16<const LANE: i32>(
r: float32x4_t, r: float32x4_t,
@ -10812,7 +10812,7 @@ pub fn vfmlslq_laneq_low_f16<const LANE: i32>(
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fmlsl))] #[cfg_attr(test, assert_instr(fmlsl))]
pub fn vfmlsl_low_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float32x2_t { pub fn vfmlsl_low_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float32x2_t {
@ -10830,7 +10830,7 @@ pub fn vfmlsl_low_f16(r: float32x2_t, a: float16x4_t, b: float16x4_t) -> float32
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))] #[cfg_attr(not(target_arch = "arm"), target_feature(enable = "fhm"))]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fmlsl))] #[cfg_attr(test, assert_instr(fmlsl))]
pub fn vfmlslq_low_f16(r: float32x4_t, a: float16x8_t, b: float16x8_t) -> float32x4_t { pub fn vfmlslq_low_f16(r: float32x4_t, a: float16x8_t, b: float16x8_t) -> float32x4_t {
@ -10861,7 +10861,7 @@ pub fn vfms_f64(a: float64x1_t, b: float64x1_t, c: float64x1_t) -> float64x1_t {
#[cfg_attr(test, assert_instr(fmls, LANE = 0))] #[cfg_attr(test, assert_instr(fmls, LANE = 0))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfms_lane_f16<const LANE: i32>( pub fn vfms_lane_f16<const LANE: i32>(
a: float16x4_t, a: float16x4_t,
@ -10877,7 +10877,7 @@ pub fn vfms_lane_f16<const LANE: i32>(
#[cfg_attr(test, assert_instr(fmls, LANE = 0))] #[cfg_attr(test, assert_instr(fmls, LANE = 0))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfms_laneq_f16<const LANE: i32>( pub fn vfms_laneq_f16<const LANE: i32>(
a: float16x4_t, a: float16x4_t,
@ -10893,7 +10893,7 @@ pub fn vfms_laneq_f16<const LANE: i32>(
#[cfg_attr(test, assert_instr(fmls, LANE = 0))] #[cfg_attr(test, assert_instr(fmls, LANE = 0))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmsq_lane_f16<const LANE: i32>( pub fn vfmsq_lane_f16<const LANE: i32>(
a: float16x8_t, a: float16x8_t,
@ -10909,7 +10909,7 @@ pub fn vfmsq_lane_f16<const LANE: i32>(
#[cfg_attr(test, assert_instr(fmls, LANE = 0))] #[cfg_attr(test, assert_instr(fmls, LANE = 0))]
#[rustc_legacy_const_generics(3)] #[rustc_legacy_const_generics(3)]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vfmsq_laneq_f16<const LANE: i32>( pub fn vfmsq_laneq_f16<const LANE: i32>(
a: float16x8_t, a: float16x8_t,
@ -14739,7 +14739,7 @@ pub fn vmul_lane_f64<const LANE: i32>(a: float64x1_t, b: float64x1_t) -> float64
#[cfg_attr(test, assert_instr(fmul, LANE = 0))] #[cfg_attr(test, assert_instr(fmul, LANE = 0))]
#[rustc_legacy_const_generics(2)] #[rustc_legacy_const_generics(2)]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vmul_laneq_f16<const LANE: i32>(a: float16x4_t, b: float16x8_t) -> float16x4_t { pub fn vmul_laneq_f16<const LANE: i32>(a: float16x4_t, b: float16x8_t) -> float16x4_t {
static_assert_uimm_bits!(LANE, 3); static_assert_uimm_bits!(LANE, 3);
@ -14756,7 +14756,7 @@ pub fn vmul_laneq_f16<const LANE: i32>(a: float16x4_t, b: float16x8_t) -> float1
#[cfg_attr(test, assert_instr(fmul, LANE = 0))] #[cfg_attr(test, assert_instr(fmul, LANE = 0))]
#[rustc_legacy_const_generics(2)] #[rustc_legacy_const_generics(2)]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vmulq_laneq_f16<const LANE: i32>(a: float16x8_t, b: float16x8_t) -> float16x8_t { pub fn vmulq_laneq_f16<const LANE: i32>(a: float16x8_t, b: float16x8_t) -> float16x8_t {
static_assert_uimm_bits!(LANE, 3); static_assert_uimm_bits!(LANE, 3);
@ -15263,7 +15263,7 @@ pub fn vmuld_laneq_f64<const LANE: i32>(a: f64, b: float64x2_t) -> f64 {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vmulx_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vmulx_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fmulx))] #[cfg_attr(test, assert_instr(fmulx))]
pub fn vmulx_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { pub fn vmulx_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
@ -15280,7 +15280,7 @@ pub fn vmulx_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vmulxq_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vmulxq_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fmulx))] #[cfg_attr(test, assert_instr(fmulx))]
pub fn vmulxq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { pub fn vmulxq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t {
@ -15363,7 +15363,7 @@ pub fn vmulxq_f64(a: float64x2_t, b: float64x2_t) -> float64x2_t {
#[cfg_attr(test, assert_instr(fmulx, LANE = 0))] #[cfg_attr(test, assert_instr(fmulx, LANE = 0))]
#[rustc_legacy_const_generics(2)] #[rustc_legacy_const_generics(2)]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vmulx_lane_f16<const LANE: i32>(a: float16x4_t, b: float16x4_t) -> float16x4_t { pub fn vmulx_lane_f16<const LANE: i32>(a: float16x4_t, b: float16x4_t) -> float16x4_t {
static_assert_uimm_bits!(LANE, 2); static_assert_uimm_bits!(LANE, 2);
@ -15380,7 +15380,7 @@ pub fn vmulx_lane_f16<const LANE: i32>(a: float16x4_t, b: float16x4_t) -> float1
#[cfg_attr(test, assert_instr(fmulx, LANE = 0))] #[cfg_attr(test, assert_instr(fmulx, LANE = 0))]
#[rustc_legacy_const_generics(2)] #[rustc_legacy_const_generics(2)]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vmulx_laneq_f16<const LANE: i32>(a: float16x4_t, b: float16x8_t) -> float16x4_t { pub fn vmulx_laneq_f16<const LANE: i32>(a: float16x4_t, b: float16x8_t) -> float16x4_t {
static_assert_uimm_bits!(LANE, 3); static_assert_uimm_bits!(LANE, 3);
@ -15397,7 +15397,7 @@ pub fn vmulx_laneq_f16<const LANE: i32>(a: float16x4_t, b: float16x8_t) -> float
#[cfg_attr(test, assert_instr(fmulx, LANE = 0))] #[cfg_attr(test, assert_instr(fmulx, LANE = 0))]
#[rustc_legacy_const_generics(2)] #[rustc_legacy_const_generics(2)]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vmulxq_lane_f16<const LANE: i32>(a: float16x8_t, b: float16x4_t) -> float16x8_t { pub fn vmulxq_lane_f16<const LANE: i32>(a: float16x8_t, b: float16x4_t) -> float16x8_t {
static_assert_uimm_bits!(LANE, 2); static_assert_uimm_bits!(LANE, 2);
@ -15427,7 +15427,7 @@ pub fn vmulxq_lane_f16<const LANE: i32>(a: float16x8_t, b: float16x4_t) -> float
#[cfg_attr(test, assert_instr(fmulx, LANE = 0))] #[cfg_attr(test, assert_instr(fmulx, LANE = 0))]
#[rustc_legacy_const_generics(2)] #[rustc_legacy_const_generics(2)]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vmulxq_laneq_f16<const LANE: i32>(a: float16x8_t, b: float16x8_t) -> float16x8_t { pub fn vmulxq_laneq_f16<const LANE: i32>(a: float16x8_t, b: float16x8_t) -> float16x8_t {
static_assert_uimm_bits!(LANE, 3); static_assert_uimm_bits!(LANE, 3);
@ -15789,7 +15789,7 @@ pub fn vpaddd_u64(a: uint64x2_t) -> u64 {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpaddq_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpaddq_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(faddp))] #[cfg_attr(test, assert_instr(faddp))]
pub fn vpaddq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { pub fn vpaddq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t {
@ -16008,7 +16008,7 @@ pub fn vpaddq_u64(a: uint64x2_t, b: uint64x2_t) -> uint64x2_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpmax_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpmax_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fmaxp))] #[cfg_attr(test, assert_instr(fmaxp))]
pub fn vpmax_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { pub fn vpmax_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
@ -16025,7 +16025,7 @@ pub fn vpmax_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpmaxq_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpmaxq_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fmaxp))] #[cfg_attr(test, assert_instr(fmaxp))]
pub fn vpmaxq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { pub fn vpmaxq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t {
@ -16042,7 +16042,7 @@ pub fn vpmaxq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpmaxnm_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpmaxnm_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fmaxnmp))] #[cfg_attr(test, assert_instr(fmaxnmp))]
pub fn vpmaxnm_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { pub fn vpmaxnm_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
@ -16059,7 +16059,7 @@ pub fn vpmaxnm_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpmaxnmq_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpmaxnmq_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fmaxnmp))] #[cfg_attr(test, assert_instr(fmaxnmp))]
pub fn vpmaxnmq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { pub fn vpmaxnmq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t {
@ -16316,7 +16316,7 @@ pub fn vpmaxs_f32(a: float32x2_t) -> f32 {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpmin_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpmin_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fminp))] #[cfg_attr(test, assert_instr(fminp))]
pub fn vpmin_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { pub fn vpmin_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
@ -16333,7 +16333,7 @@ pub fn vpmin_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpminq_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpminq_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fminp))] #[cfg_attr(test, assert_instr(fminp))]
pub fn vpminq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { pub fn vpminq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t {
@ -16350,7 +16350,7 @@ pub fn vpminq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpminnm_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpminnm_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fminnmp))] #[cfg_attr(test, assert_instr(fminnmp))]
pub fn vpminnm_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { pub fn vpminnm_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
@ -16367,7 +16367,7 @@ pub fn vpminnm_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpminnmq_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vpminnmq_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(fminnmp))] #[cfg_attr(test, assert_instr(fminnmp))]
pub fn vpminnmq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { pub fn vpminnmq_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t {
@ -21493,7 +21493,7 @@ pub fn vrecpxh_f16(a: f16) -> f16 {
#[inline] #[inline]
#[cfg(target_endian = "little")] #[cfg(target_endian = "little")]
#[target_feature(enable = "neon")] #[target_feature(enable = "neon")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(nop))] #[cfg_attr(test, assert_instr(nop))]
pub fn vreinterpret_f64_f16(a: float16x4_t) -> float64x1_t { pub fn vreinterpret_f64_f16(a: float16x4_t) -> float64x1_t {
@ -21504,7 +21504,7 @@ pub fn vreinterpret_f64_f16(a: float16x4_t) -> float64x1_t {
#[inline] #[inline]
#[cfg(target_endian = "big")] #[cfg(target_endian = "big")]
#[target_feature(enable = "neon")] #[target_feature(enable = "neon")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(nop))] #[cfg_attr(test, assert_instr(nop))]
pub fn vreinterpret_f64_f16(a: float16x4_t) -> float64x1_t { pub fn vreinterpret_f64_f16(a: float16x4_t) -> float64x1_t {
@ -21516,7 +21516,7 @@ pub fn vreinterpret_f64_f16(a: float16x4_t) -> float64x1_t {
#[inline] #[inline]
#[cfg(target_endian = "little")] #[cfg(target_endian = "little")]
#[target_feature(enable = "neon")] #[target_feature(enable = "neon")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(nop))] #[cfg_attr(test, assert_instr(nop))]
pub fn vreinterpretq_f64_f16(a: float16x8_t) -> float64x2_t { pub fn vreinterpretq_f64_f16(a: float16x8_t) -> float64x2_t {
@ -21527,7 +21527,7 @@ pub fn vreinterpretq_f64_f16(a: float16x8_t) -> float64x2_t {
#[inline] #[inline]
#[cfg(target_endian = "big")] #[cfg(target_endian = "big")]
#[target_feature(enable = "neon")] #[target_feature(enable = "neon")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(nop))] #[cfg_attr(test, assert_instr(nop))]
pub fn vreinterpretq_f64_f16(a: float16x8_t) -> float64x2_t { pub fn vreinterpretq_f64_f16(a: float16x8_t) -> float64x2_t {
@ -21542,7 +21542,7 @@ pub fn vreinterpretq_f64_f16(a: float16x8_t) -> float64x2_t {
#[inline] #[inline]
#[cfg(target_endian = "little")] #[cfg(target_endian = "little")]
#[target_feature(enable = "neon")] #[target_feature(enable = "neon")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(nop))] #[cfg_attr(test, assert_instr(nop))]
pub fn vreinterpret_f16_f64(a: float64x1_t) -> float16x4_t { pub fn vreinterpret_f16_f64(a: float64x1_t) -> float16x4_t {
@ -21553,7 +21553,7 @@ pub fn vreinterpret_f16_f64(a: float64x1_t) -> float16x4_t {
#[inline] #[inline]
#[cfg(target_endian = "big")] #[cfg(target_endian = "big")]
#[target_feature(enable = "neon")] #[target_feature(enable = "neon")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(nop))] #[cfg_attr(test, assert_instr(nop))]
pub fn vreinterpret_f16_f64(a: float64x1_t) -> float16x4_t { pub fn vreinterpret_f16_f64(a: float64x1_t) -> float16x4_t {
@ -21567,7 +21567,7 @@ pub fn vreinterpret_f16_f64(a: float64x1_t) -> float16x4_t {
#[inline] #[inline]
#[cfg(target_endian = "little")] #[cfg(target_endian = "little")]
#[target_feature(enable = "neon")] #[target_feature(enable = "neon")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(nop))] #[cfg_attr(test, assert_instr(nop))]
pub fn vreinterpretq_f16_f64(a: float64x2_t) -> float16x8_t { pub fn vreinterpretq_f16_f64(a: float64x2_t) -> float16x8_t {
@ -21578,7 +21578,7 @@ pub fn vreinterpretq_f16_f64(a: float64x2_t) -> float16x8_t {
#[inline] #[inline]
#[cfg(target_endian = "big")] #[cfg(target_endian = "big")]
#[target_feature(enable = "neon")] #[target_feature(enable = "neon")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(nop))] #[cfg_attr(test, assert_instr(nop))]
pub fn vreinterpretq_f16_f64(a: float64x2_t) -> float16x8_t { pub fn vreinterpretq_f16_f64(a: float64x2_t) -> float16x8_t {
@ -23157,7 +23157,7 @@ pub fn vrnd64z_f64(a: float64x1_t) -> float64x1_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrnd_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrnd_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(frintz))] #[cfg_attr(test, assert_instr(frintz))]
pub fn vrnd_f16(a: float16x4_t) -> float16x4_t { pub fn vrnd_f16(a: float16x4_t) -> float16x4_t {
@ -23167,7 +23167,7 @@ pub fn vrnd_f16(a: float16x4_t) -> float16x4_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndq_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndq_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(frintz))] #[cfg_attr(test, assert_instr(frintz))]
pub fn vrndq_f16(a: float16x8_t) -> float16x8_t { pub fn vrndq_f16(a: float16x8_t) -> float16x8_t {
@ -23213,7 +23213,7 @@ pub fn vrndq_f64(a: float64x2_t) -> float64x2_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrnda_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrnda_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(frinta))] #[cfg_attr(test, assert_instr(frinta))]
pub fn vrnda_f16(a: float16x4_t) -> float16x4_t { pub fn vrnda_f16(a: float16x4_t) -> float16x4_t {
@ -23223,7 +23223,7 @@ pub fn vrnda_f16(a: float16x4_t) -> float16x4_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndaq_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndaq_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(frinta))] #[cfg_attr(test, assert_instr(frinta))]
pub fn vrndaq_f16(a: float16x8_t) -> float16x8_t { pub fn vrndaq_f16(a: float16x8_t) -> float16x8_t {
@ -23289,7 +23289,7 @@ pub fn vrndh_f16(a: f16) -> f16 {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndi_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndi_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(frinti))] #[cfg_attr(test, assert_instr(frinti))]
pub fn vrndi_f16(a: float16x4_t) -> float16x4_t { pub fn vrndi_f16(a: float16x4_t) -> float16x4_t {
@ -23306,7 +23306,7 @@ pub fn vrndi_f16(a: float16x4_t) -> float16x4_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndiq_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndiq_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(frinti))] #[cfg_attr(test, assert_instr(frinti))]
pub fn vrndiq_f16(a: float16x8_t) -> float16x8_t { pub fn vrndiq_f16(a: float16x8_t) -> float16x8_t {
@ -23404,7 +23404,7 @@ pub fn vrndih_f16(a: f16) -> f16 {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndm_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndm_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(frintm))] #[cfg_attr(test, assert_instr(frintm))]
pub fn vrndm_f16(a: float16x4_t) -> float16x4_t { pub fn vrndm_f16(a: float16x4_t) -> float16x4_t {
@ -23414,7 +23414,7 @@ pub fn vrndm_f16(a: float16x4_t) -> float16x4_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndmq_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndmq_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(frintm))] #[cfg_attr(test, assert_instr(frintm))]
pub fn vrndmq_f16(a: float16x8_t) -> float16x8_t { pub fn vrndmq_f16(a: float16x8_t) -> float16x8_t {
@ -23535,7 +23535,7 @@ pub fn vrndns_f32(a: f32) -> f32 {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndp_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndp_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(frintp))] #[cfg_attr(test, assert_instr(frintp))]
pub fn vrndp_f16(a: float16x4_t) -> float16x4_t { pub fn vrndp_f16(a: float16x4_t) -> float16x4_t {
@ -23545,7 +23545,7 @@ pub fn vrndp_f16(a: float16x4_t) -> float16x4_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndpq_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndpq_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(frintp))] #[cfg_attr(test, assert_instr(frintp))]
pub fn vrndpq_f16(a: float16x8_t) -> float16x8_t { pub fn vrndpq_f16(a: float16x8_t) -> float16x8_t {
@ -23601,7 +23601,7 @@ pub fn vrndph_f16(a: f16) -> f16 {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndx_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndx_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(frintx))] #[cfg_attr(test, assert_instr(frintx))]
pub fn vrndx_f16(a: float16x4_t) -> float16x4_t { pub fn vrndx_f16(a: float16x4_t) -> float16x4_t {
@ -23611,7 +23611,7 @@ pub fn vrndx_f16(a: float16x4_t) -> float16x4_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndxq_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vrndxq_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(test, assert_instr(frintx))] #[cfg_attr(test, assert_instr(frintx))]
pub fn vrndxq_f16(a: float16x8_t) -> float16x8_t { pub fn vrndxq_f16(a: float16x8_t) -> float16x8_t {
@ -25034,7 +25034,7 @@ pub fn vsqadds_u32(a: u32, b: i32) -> u32 {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fsqrt))] #[cfg_attr(test, assert_instr(fsqrt))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vsqrt_f16(a: float16x4_t) -> float16x4_t { pub fn vsqrt_f16(a: float16x4_t) -> float16x4_t {
unsafe { simd_fsqrt(a) } unsafe { simd_fsqrt(a) }
@ -25044,7 +25044,7 @@ pub fn vsqrt_f16(a: float16x4_t) -> float16x4_t {
#[inline] #[inline]
#[cfg_attr(test, assert_instr(fsqrt))] #[cfg_attr(test, assert_instr(fsqrt))]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
pub fn vsqrtq_f16(a: float16x8_t) -> float16x8_t { pub fn vsqrtq_f16(a: float16x8_t) -> float16x8_t {
unsafe { simd_fsqrt(a) } unsafe { simd_fsqrt(a) }
@ -27532,7 +27532,7 @@ pub fn vtbx4_p8(a: poly8x8_t, b: poly8x8x4_t, c: uint8x8_t) -> poly8x8_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vtrn1_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vtrn1_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(trn1))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(trn1))]
pub fn vtrn1_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { pub fn vtrn1_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
@ -27542,7 +27542,7 @@ pub fn vtrn1_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vtrn1q_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vtrn1q_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(trn1))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(trn1))]
pub fn vtrn1q_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { pub fn vtrn1q_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t {
@ -27768,7 +27768,7 @@ pub fn vtrn1q_p16(a: poly16x8_t, b: poly16x8_t) -> poly16x8_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vtrn2_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vtrn2_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(trn2))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(trn2))]
pub fn vtrn2_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { pub fn vtrn2_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
@ -27778,7 +27778,7 @@ pub fn vtrn2_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vtrn2q_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vtrn2q_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(trn2))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(trn2))]
pub fn vtrn2q_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { pub fn vtrn2q_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t {
@ -28309,7 +28309,7 @@ pub fn vusdotq_laneq_s32<const LANE: i32>(a: int32x4_t, b: uint8x16_t, c: int8x1
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vuzp1_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vuzp1_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(uzp1))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(uzp1))]
pub fn vuzp1_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { pub fn vuzp1_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
@ -28319,7 +28319,7 @@ pub fn vuzp1_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vuzp1q_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vuzp1q_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(uzp1))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(uzp1))]
pub fn vuzp1q_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { pub fn vuzp1q_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t {
@ -28545,7 +28545,7 @@ pub fn vuzp1q_p16(a: poly16x8_t, b: poly16x8_t) -> poly16x8_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vuzp2_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vuzp2_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(uzp2))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(uzp2))]
pub fn vuzp2_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { pub fn vuzp2_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
@ -28555,7 +28555,7 @@ pub fn vuzp2_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vuzp2q_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vuzp2q_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(uzp2))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(uzp2))]
pub fn vuzp2q_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { pub fn vuzp2q_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t {
@ -28799,7 +28799,7 @@ pub fn vxarq_u64<const IMM6: i32>(a: uint64x2_t, b: uint64x2_t) -> uint64x2_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vzip1_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vzip1_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(zip1))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(zip1))]
pub fn vzip1_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { pub fn vzip1_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
@ -28809,7 +28809,7 @@ pub fn vzip1_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vzip1q_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vzip1q_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(zip1))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(zip1))]
pub fn vzip1q_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { pub fn vzip1q_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t {
@ -29035,7 +29035,7 @@ pub fn vzip1q_p64(a: poly64x2_t, b: poly64x2_t) -> poly64x2_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vzip2_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vzip2_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(zip2))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(zip2))]
pub fn vzip2_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t { pub fn vzip2_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
@ -29045,7 +29045,7 @@ pub fn vzip2_f16(a: float16x4_t, b: float16x4_t) -> float16x4_t {
#[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vzip2q_f16)"] #[doc = "[Arm's documentation](https://developer.arm.com/architectures/instruction-sets/intrinsics/vzip2q_f16)"]
#[inline] #[inline]
#[target_feature(enable = "neon,fp16")] #[target_feature(enable = "neon,fp16")]
#[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
#[cfg(not(target_arch = "arm64ec"))] #[cfg(not(target_arch = "arm64ec"))]
#[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(zip2))] #[cfg_attr(all(test, not(target_env = "msvc")), assert_instr(zip2))]
pub fn vzip2q_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t { pub fn vzip2q_f16(a: float16x8_t, b: float16x8_t) -> float16x8_t {

View file

@ -104,7 +104,7 @@ types! {
} }
types! { types! {
#![cfg_attr(not(target_arch = "arm"), stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION"))] #![cfg_attr(not(target_arch = "arm"), stable(feature = "stdarch_neon_fp16", since = "1.94.0"))]
#![cfg_attr(target_arch = "arm", unstable(feature = "stdarch_arm_neon_intrinsics", issue = "111800"))] #![cfg_attr(target_arch = "arm", unstable(feature = "stdarch_arm_neon_intrinsics", issue = "111800"))]
/// Arm-specific 64-bit wide vector of four packed `f16`. /// Arm-specific 64-bit wide vector of four packed `f16`.
@ -750,7 +750,7 @@ pub struct uint32x4x4_t(
#[derive(Copy, Clone, Debug)] #[derive(Copy, Clone, Debug)]
#[cfg_attr( #[cfg_attr(
not(target_arch = "arm"), not(target_arch = "arm"),
stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") stable(feature = "stdarch_neon_fp16", since = "1.94.0")
)] )]
#[cfg_attr( #[cfg_attr(
target_arch = "arm", target_arch = "arm",
@ -763,7 +763,7 @@ pub struct float16x4x2_t(pub float16x4_t, pub float16x4_t);
#[derive(Copy, Clone, Debug)] #[derive(Copy, Clone, Debug)]
#[cfg_attr( #[cfg_attr(
not(target_arch = "arm"), not(target_arch = "arm"),
stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") stable(feature = "stdarch_neon_fp16", since = "1.94.0")
)] )]
#[cfg_attr( #[cfg_attr(
target_arch = "arm", target_arch = "arm",
@ -776,7 +776,7 @@ pub struct float16x4x3_t(pub float16x4_t, pub float16x4_t, pub float16x4_t);
#[derive(Copy, Clone, Debug)] #[derive(Copy, Clone, Debug)]
#[cfg_attr( #[cfg_attr(
not(target_arch = "arm"), not(target_arch = "arm"),
stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") stable(feature = "stdarch_neon_fp16", since = "1.94.0")
)] )]
#[cfg_attr( #[cfg_attr(
target_arch = "arm", target_arch = "arm",
@ -794,7 +794,7 @@ pub struct float16x4x4_t(
#[derive(Copy, Clone, Debug)] #[derive(Copy, Clone, Debug)]
#[cfg_attr( #[cfg_attr(
not(target_arch = "arm"), not(target_arch = "arm"),
stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") stable(feature = "stdarch_neon_fp16", since = "1.94.0")
)] )]
#[cfg_attr( #[cfg_attr(
target_arch = "arm", target_arch = "arm",
@ -807,7 +807,7 @@ pub struct float16x8x2_t(pub float16x8_t, pub float16x8_t);
#[derive(Copy, Clone, Debug)] #[derive(Copy, Clone, Debug)]
#[cfg_attr( #[cfg_attr(
not(target_arch = "arm"), not(target_arch = "arm"),
stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") stable(feature = "stdarch_neon_fp16", since = "1.94.0")
)] )]
#[cfg_attr( #[cfg_attr(
target_arch = "arm", target_arch = "arm",
@ -820,7 +820,7 @@ pub struct float16x8x3_t(pub float16x8_t, pub float16x8_t, pub float16x8_t);
#[derive(Copy, Clone, Debug)] #[derive(Copy, Clone, Debug)]
#[cfg_attr( #[cfg_attr(
not(target_arch = "arm"), not(target_arch = "arm"),
stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION") stable(feature = "stdarch_neon_fp16", since = "1.94.0")
)] )]
#[cfg_attr( #[cfg_attr(
target_arch = "arm", target_arch = "arm",

File diff suppressed because it is too large Load diff

View file

@ -87,7 +87,7 @@ pub unsafe fn _mm256_cvtneebf16_ps(a: *const __m256bh) -> __m256 {
#[inline] #[inline]
#[target_feature(enable = "avxneconvert")] #[target_feature(enable = "avxneconvert")]
#[cfg_attr(test, assert_instr(vcvtneeph2ps))] #[cfg_attr(test, assert_instr(vcvtneeph2ps))]
#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
pub unsafe fn _mm_cvtneeph_ps(a: *const __m128h) -> __m128 { pub unsafe fn _mm_cvtneeph_ps(a: *const __m128h) -> __m128 {
transmute(cvtneeph2ps_128(a)) transmute(cvtneeph2ps_128(a))
} }
@ -99,7 +99,7 @@ pub unsafe fn _mm_cvtneeph_ps(a: *const __m128h) -> __m128 {
#[inline] #[inline]
#[target_feature(enable = "avxneconvert")] #[target_feature(enable = "avxneconvert")]
#[cfg_attr(test, assert_instr(vcvtneeph2ps))] #[cfg_attr(test, assert_instr(vcvtneeph2ps))]
#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
pub unsafe fn _mm256_cvtneeph_ps(a: *const __m256h) -> __m256 { pub unsafe fn _mm256_cvtneeph_ps(a: *const __m256h) -> __m256 {
transmute(cvtneeph2ps_256(a)) transmute(cvtneeph2ps_256(a))
} }
@ -135,7 +135,7 @@ pub unsafe fn _mm256_cvtneobf16_ps(a: *const __m256bh) -> __m256 {
#[inline] #[inline]
#[target_feature(enable = "avxneconvert")] #[target_feature(enable = "avxneconvert")]
#[cfg_attr(test, assert_instr(vcvtneoph2ps))] #[cfg_attr(test, assert_instr(vcvtneoph2ps))]
#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
pub unsafe fn _mm_cvtneoph_ps(a: *const __m128h) -> __m128 { pub unsafe fn _mm_cvtneoph_ps(a: *const __m128h) -> __m128 {
transmute(cvtneoph2ps_128(a)) transmute(cvtneoph2ps_128(a))
} }
@ -147,7 +147,7 @@ pub unsafe fn _mm_cvtneoph_ps(a: *const __m128h) -> __m128 {
#[inline] #[inline]
#[target_feature(enable = "avxneconvert")] #[target_feature(enable = "avxneconvert")]
#[cfg_attr(test, assert_instr(vcvtneoph2ps))] #[cfg_attr(test, assert_instr(vcvtneoph2ps))]
#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
pub unsafe fn _mm256_cvtneoph_ps(a: *const __m256h) -> __m256 { pub unsafe fn _mm256_cvtneoph_ps(a: *const __m256h) -> __m256 {
transmute(cvtneoph2ps_256(a)) transmute(cvtneoph2ps_256(a))
} }

View file

@ -401,7 +401,7 @@ types! {
} }
types! { types! {
#![stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] #![stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
/// 128-bit wide set of 8 `f16` types, x86-specific /// 128-bit wide set of 8 `f16` types, x86-specific
/// ///
@ -768,7 +768,7 @@ mod avxneconvert;
pub use self::avxneconvert::*; pub use self::avxneconvert::*;
mod avx512fp16; mod avx512fp16;
#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
pub use self::avx512fp16::*; pub use self::avx512fp16::*;
mod kl; mod kl;

View file

@ -10,7 +10,7 @@ use stdarch_test::assert_instr;
#[inline] #[inline]
#[target_feature(enable = "avx512fp16")] #[target_feature(enable = "avx512fp16")]
#[cfg_attr(test, assert_instr(vcvtsi2sh))] #[cfg_attr(test, assert_instr(vcvtsi2sh))]
#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
pub fn _mm_cvti64_sh(a: __m128h, b: i64) -> __m128h { pub fn _mm_cvti64_sh(a: __m128h, b: i64) -> __m128h {
unsafe { vcvtsi642sh(a, b, _MM_FROUND_CUR_DIRECTION) } unsafe { vcvtsi642sh(a, b, _MM_FROUND_CUR_DIRECTION) }
} }
@ -32,7 +32,7 @@ pub fn _mm_cvti64_sh(a: __m128h, b: i64) -> __m128h {
#[target_feature(enable = "avx512fp16")] #[target_feature(enable = "avx512fp16")]
#[cfg_attr(test, assert_instr(vcvtsi2sh, ROUNDING = 8))] #[cfg_attr(test, assert_instr(vcvtsi2sh, ROUNDING = 8))]
#[rustc_legacy_const_generics(2)] #[rustc_legacy_const_generics(2)]
#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
pub fn _mm_cvt_roundi64_sh<const ROUNDING: i32>(a: __m128h, b: i64) -> __m128h { pub fn _mm_cvt_roundi64_sh<const ROUNDING: i32>(a: __m128h, b: i64) -> __m128h {
unsafe { unsafe {
static_assert_rounding!(ROUNDING); static_assert_rounding!(ROUNDING);
@ -48,7 +48,7 @@ pub fn _mm_cvt_roundi64_sh<const ROUNDING: i32>(a: __m128h, b: i64) -> __m128h {
#[inline] #[inline]
#[target_feature(enable = "avx512fp16")] #[target_feature(enable = "avx512fp16")]
#[cfg_attr(test, assert_instr(vcvtusi2sh))] #[cfg_attr(test, assert_instr(vcvtusi2sh))]
#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
pub fn _mm_cvtu64_sh(a: __m128h, b: u64) -> __m128h { pub fn _mm_cvtu64_sh(a: __m128h, b: u64) -> __m128h {
unsafe { vcvtusi642sh(a, b, _MM_FROUND_CUR_DIRECTION) } unsafe { vcvtusi642sh(a, b, _MM_FROUND_CUR_DIRECTION) }
} }
@ -70,7 +70,7 @@ pub fn _mm_cvtu64_sh(a: __m128h, b: u64) -> __m128h {
#[target_feature(enable = "avx512fp16")] #[target_feature(enable = "avx512fp16")]
#[cfg_attr(test, assert_instr(vcvtusi2sh, ROUNDING = 8))] #[cfg_attr(test, assert_instr(vcvtusi2sh, ROUNDING = 8))]
#[rustc_legacy_const_generics(2)] #[rustc_legacy_const_generics(2)]
#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
pub fn _mm_cvt_roundu64_sh<const ROUNDING: i32>(a: __m128h, b: u64) -> __m128h { pub fn _mm_cvt_roundu64_sh<const ROUNDING: i32>(a: __m128h, b: u64) -> __m128h {
unsafe { unsafe {
static_assert_rounding!(ROUNDING); static_assert_rounding!(ROUNDING);
@ -85,7 +85,7 @@ pub fn _mm_cvt_roundu64_sh<const ROUNDING: i32>(a: __m128h, b: u64) -> __m128h {
#[inline] #[inline]
#[target_feature(enable = "avx512fp16")] #[target_feature(enable = "avx512fp16")]
#[cfg_attr(test, assert_instr(vcvtsh2si))] #[cfg_attr(test, assert_instr(vcvtsh2si))]
#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
pub fn _mm_cvtsh_i64(a: __m128h) -> i64 { pub fn _mm_cvtsh_i64(a: __m128h) -> i64 {
unsafe { vcvtsh2si64(a, _MM_FROUND_CUR_DIRECTION) } unsafe { vcvtsh2si64(a, _MM_FROUND_CUR_DIRECTION) }
} }
@ -106,7 +106,7 @@ pub fn _mm_cvtsh_i64(a: __m128h) -> i64 {
#[target_feature(enable = "avx512fp16")] #[target_feature(enable = "avx512fp16")]
#[cfg_attr(test, assert_instr(vcvtsh2si, ROUNDING = 8))] #[cfg_attr(test, assert_instr(vcvtsh2si, ROUNDING = 8))]
#[rustc_legacy_const_generics(1)] #[rustc_legacy_const_generics(1)]
#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
pub fn _mm_cvt_roundsh_i64<const ROUNDING: i32>(a: __m128h) -> i64 { pub fn _mm_cvt_roundsh_i64<const ROUNDING: i32>(a: __m128h) -> i64 {
unsafe { unsafe {
static_assert_rounding!(ROUNDING); static_assert_rounding!(ROUNDING);
@ -121,7 +121,7 @@ pub fn _mm_cvt_roundsh_i64<const ROUNDING: i32>(a: __m128h) -> i64 {
#[inline] #[inline]
#[target_feature(enable = "avx512fp16")] #[target_feature(enable = "avx512fp16")]
#[cfg_attr(test, assert_instr(vcvtsh2usi))] #[cfg_attr(test, assert_instr(vcvtsh2usi))]
#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
pub fn _mm_cvtsh_u64(a: __m128h) -> u64 { pub fn _mm_cvtsh_u64(a: __m128h) -> u64 {
unsafe { vcvtsh2usi64(a, _MM_FROUND_CUR_DIRECTION) } unsafe { vcvtsh2usi64(a, _MM_FROUND_CUR_DIRECTION) }
} }
@ -142,7 +142,7 @@ pub fn _mm_cvtsh_u64(a: __m128h) -> u64 {
#[target_feature(enable = "avx512fp16")] #[target_feature(enable = "avx512fp16")]
#[cfg_attr(test, assert_instr(vcvtsh2usi, ROUNDING = 8))] #[cfg_attr(test, assert_instr(vcvtsh2usi, ROUNDING = 8))]
#[rustc_legacy_const_generics(1)] #[rustc_legacy_const_generics(1)]
#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
pub fn _mm_cvt_roundsh_u64<const ROUNDING: i32>(a: __m128h) -> u64 { pub fn _mm_cvt_roundsh_u64<const ROUNDING: i32>(a: __m128h) -> u64 {
unsafe { unsafe {
static_assert_rounding!(ROUNDING); static_assert_rounding!(ROUNDING);
@ -157,7 +157,7 @@ pub fn _mm_cvt_roundsh_u64<const ROUNDING: i32>(a: __m128h) -> u64 {
#[inline] #[inline]
#[target_feature(enable = "avx512fp16")] #[target_feature(enable = "avx512fp16")]
#[cfg_attr(test, assert_instr(vcvttsh2si))] #[cfg_attr(test, assert_instr(vcvttsh2si))]
#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
pub fn _mm_cvttsh_i64(a: __m128h) -> i64 { pub fn _mm_cvttsh_i64(a: __m128h) -> i64 {
unsafe { vcvttsh2si64(a, _MM_FROUND_CUR_DIRECTION) } unsafe { vcvttsh2si64(a, _MM_FROUND_CUR_DIRECTION) }
} }
@ -172,7 +172,7 @@ pub fn _mm_cvttsh_i64(a: __m128h) -> i64 {
#[target_feature(enable = "avx512fp16")] #[target_feature(enable = "avx512fp16")]
#[cfg_attr(test, assert_instr(vcvttsh2si, SAE = 8))] #[cfg_attr(test, assert_instr(vcvttsh2si, SAE = 8))]
#[rustc_legacy_const_generics(1)] #[rustc_legacy_const_generics(1)]
#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
pub fn _mm_cvtt_roundsh_i64<const SAE: i32>(a: __m128h) -> i64 { pub fn _mm_cvtt_roundsh_i64<const SAE: i32>(a: __m128h) -> i64 {
unsafe { unsafe {
static_assert_sae!(SAE); static_assert_sae!(SAE);
@ -187,7 +187,7 @@ pub fn _mm_cvtt_roundsh_i64<const SAE: i32>(a: __m128h) -> i64 {
#[inline] #[inline]
#[target_feature(enable = "avx512fp16")] #[target_feature(enable = "avx512fp16")]
#[cfg_attr(test, assert_instr(vcvttsh2usi))] #[cfg_attr(test, assert_instr(vcvttsh2usi))]
#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
pub fn _mm_cvttsh_u64(a: __m128h) -> u64 { pub fn _mm_cvttsh_u64(a: __m128h) -> u64 {
unsafe { vcvttsh2usi64(a, _MM_FROUND_CUR_DIRECTION) } unsafe { vcvttsh2usi64(a, _MM_FROUND_CUR_DIRECTION) }
} }
@ -202,7 +202,7 @@ pub fn _mm_cvttsh_u64(a: __m128h) -> u64 {
#[target_feature(enable = "avx512fp16")] #[target_feature(enable = "avx512fp16")]
#[cfg_attr(test, assert_instr(vcvttsh2usi, SAE = 8))] #[cfg_attr(test, assert_instr(vcvttsh2usi, SAE = 8))]
#[rustc_legacy_const_generics(1)] #[rustc_legacy_const_generics(1)]
#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
pub fn _mm_cvtt_roundsh_u64<const SAE: i32>(a: __m128h) -> u64 { pub fn _mm_cvtt_roundsh_u64<const SAE: i32>(a: __m128h) -> u64 {
unsafe { unsafe {
static_assert_sae!(SAE); static_assert_sae!(SAE);

View file

@ -75,7 +75,7 @@ mod bt;
pub use self::bt::*; pub use self::bt::*;
mod avx512fp16; mod avx512fp16;
#[stable(feature = "stdarch_x86_avx512fp16", since = "CURRENT_RUSTC_VERSION")] #[stable(feature = "stdarch_x86_avx512fp16", since = "1.94.0")]
pub use self::avx512fp16::*; pub use self::avx512fp16::*;
mod amx; mod amx;

View file

@ -13,9 +13,9 @@ auto_llvm_sign_conversion: false
neon-stable: &neon-stable neon-stable: &neon-stable
FnCall: [stable, ['feature = "neon_intrinsics"', 'since = "1.59.0"']] FnCall: [stable, ['feature = "neon_intrinsics"', 'since = "1.59.0"']]
# #[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] # #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
neon-stable-fp16: &neon-stable-fp16 neon-stable-fp16: &neon-stable-fp16
FnCall: [stable, ['feature = "stdarch_neon_fp16"', 'since = "CURRENT_RUSTC_VERSION"']] FnCall: [stable, ['feature = "stdarch_neon_fp16"', 'since = "1.94.0"']]
# #[cfg(not(target_arch = "arm64ec"))] # #[cfg(not(target_arch = "arm64ec"))]
target-not-arm64ec: &target-not-arm64ec target-not-arm64ec: &target-not-arm64ec

View file

@ -10,9 +10,9 @@ auto_big_endian: true
neon-stable: &neon-stable neon-stable: &neon-stable
FnCall: [stable, ['feature = "neon_intrinsics"', 'since = "1.59.0"']] FnCall: [stable, ['feature = "neon_intrinsics"', 'since = "1.59.0"']]
# #[stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION")] # #[stable(feature = "stdarch_neon_fp16", since = "1.94.0")]
neon-stable-fp16: &neon-stable-fp16 neon-stable-fp16: &neon-stable-fp16
FnCall: [stable, ['feature = "stdarch_neon_fp16"', 'since = "CURRENT_RUSTC_VERSION"']] FnCall: [stable, ['feature = "stdarch_neon_fp16"', 'since = "1.94.0"']]
# #[cfg_attr(target_arch = "arm", unstable(feature = "stdarch_arm_neon_intrinsics", issue = "111800"))] # #[cfg_attr(target_arch = "arm", unstable(feature = "stdarch_arm_neon_intrinsics", issue = "111800"))]
neon-cfg-arm-unstable: &neon-cfg-arm-unstable neon-cfg-arm-unstable: &neon-cfg-arm-unstable
@ -55,9 +55,9 @@ neon-target-aarch64-arm64ec: &neon-target-aarch64-arm64ec
neon-not-arm-stable: &neon-not-arm-stable neon-not-arm-stable: &neon-not-arm-stable
FnCall: [cfg_attr, [{ FnCall: [not, ['target_arch = "arm"']]}, {FnCall: [stable, ['feature = "neon_intrinsics"', 'since = "1.59.0"']]}]] FnCall: [cfg_attr, [{ FnCall: [not, ['target_arch = "arm"']]}, {FnCall: [stable, ['feature = "neon_intrinsics"', 'since = "1.59.0"']]}]]
# #[cfg_attr(not(target_arch = "arm"), stable(feature = "stdarch_neon_fp16", since = "CURRENT_RUSTC_VERSION"))] # #[cfg_attr(not(target_arch = "arm"), stable(feature = "stdarch_neon_fp16", since = "1.94.0"))]
neon-not-arm-stable-fp16: &neon-not-arm-stable-fp16 neon-not-arm-stable-fp16: &neon-not-arm-stable-fp16
FnCall: [cfg_attr, [{ FnCall: [not, ['target_arch = "arm"']]}, {FnCall: [stable, ['feature = "stdarch_neon_fp16"', 'since = "CURRENT_RUSTC_VERSION"']]}]] FnCall: [cfg_attr, [{ FnCall: [not, ['target_arch = "arm"']]}, {FnCall: [stable, ['feature = "stdarch_neon_fp16"', 'since = "1.94.0"']]}]]
# #[cfg_attr(all(test, not(target_env = "msvc"))] # #[cfg_attr(all(test, not(target_env = "msvc"))]
msvc-disabled: &msvc-disabled msvc-disabled: &msvc-disabled

View file

@ -85,7 +85,7 @@ impl LateLintPass<'_> for UncheckedTimeSubtraction {
fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) { fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) {
let (lhs, rhs) = match expr.kind { let (lhs, rhs) = match expr.kind {
ExprKind::Binary(op, lhs, rhs) if matches!(op.node, BinOpKind::Sub,) => (lhs, rhs), ExprKind::Binary(op, lhs, rhs) if matches!(op.node, BinOpKind::Sub,) => (lhs, rhs),
ExprKind::MethodCall(fn_name, lhs, [rhs], _) if cx.ty_based_def(expr).is_diag_item(cx, sym::sub) => { ExprKind::MethodCall(_, lhs, [rhs], _) if cx.ty_based_def(expr).is_diag_item(cx, sym::sub) => {
(lhs, rhs) (lhs, rhs)
}, },
_ => return, _ => return,

View file

@ -0,0 +1,7 @@
fn foo() {
let a = [(); const { let x = 1; x }];
}
fn foo() {
let x = [(); const { 1 }];
}

View file

@ -0,0 +1,10 @@
fn foo() {
let a = [(); const {
let x = 1;
x
}];
}
fn foo() {
let x = [(); const { 1 }];
}

View file

@ -1,20 +0,0 @@
// Make sure search stores its data in `window`
// It needs to use a global to avoid racing on search-index.js and search.js
// https://github.com/rust-lang/rust/pull/118961
include: "utils.goml"
// URL query
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=sa'%3Bda'%3Bds"
wait-for: "#search-tabs"
assert-window-property-false: {"searchIndex": null}
// Form input
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
call-function: ("perform-search", {"query": "Foo"})
assert-window-property-false: {"searchIndex": null}
// source sidebar
go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
click: "#sidebar-button"
wait-for: "#src-sidebar details"
assert-window-property: {"searchIndex": null}

View file

@ -1,71 +0,0 @@
// This test check for headings text and background colors for the different themes.
include: "utils.goml"
define-function: (
"check-colors",
[theme, color, code_header_color, focus_background_color, headings_color],
block {
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
// This is needed so that the text color is computed.
show-text: true
call-function: ("switch-theme", {"theme": |theme|})
assert-css: (
".impl",
{"color": |color|, "background-color": "rgba(0, 0, 0, 0)"},
ALL,
)
assert-css: (
".impl .code-header",
{"color": |code_header_color|, "background-color": "rgba(0, 0, 0, 0)"},
ALL,
)
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#impl-Foo"
assert-css: (
"#impl-Foo",
{"color": |color|, "background-color": |focus_background_color|},
)
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#method.must_use"
assert-css: (
"#method\.must_use",
{"color": |color|, "background-color": |focus_background_color|},
ALL,
)
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
assert-css: (".section-header a", {"color": |color|}, ALL)
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
// We select headings (h2, h3, h...).
assert-css: (".docblock > :not(p) > a", {"color": |headings_color|}, ALL)
},
)
call-function: (
"check-colors",
{
"theme": "ayu",
"color": "#c5c5c5",
"code_header_color": "#e6e1cf",
"focus_background_color": "rgba(255, 236, 164, 0.06)",
"headings_color": "#c5c5c5",
},
)
call-function: (
"check-colors",
{
"theme": "dark",
"color": "#ddd",
"code_header_color": "#ddd",
"focus_background_color": "#494a3d",
"headings_color": "#ddd",
},
)
call-function: (
"check-colors",
{
"theme": "light",
"color": "black",
"code_header_color": "black",
"focus_background_color": "#fdffd3",
"headings_color": "black",
},
)

View file

@ -1,256 +0,0 @@
// This test checks the position of the `i` for the notable traits.
include: "utils.goml"
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.NotableStructWithLongName.html"
show-text: true
define-function: (
"check-notable-tooltip-position",
[x, i_x],
block {
// Checking they have the same y position.
compare-elements-position-near: (
"//*[@id='method.create_an_iterator_from_read']//a[normalize-space()='NotableStructWithLongName']",
"//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']",
{"y": 1},
)
// Checking they don't have the same x position.
compare-elements-position-false: (
"//*[@id='method.create_an_iterator_from_read']//a[normalize-space()='NotableStructWithLongName']",
"//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']",
["x"],
)
// The `i` should be *after* the type.
assert-position: (
"//*[@id='method.create_an_iterator_from_read']//a[normalize-space()='NotableStructWithLongName']",
{"x": |x|},
)
assert-position: (
"//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']",
{"x": |i_x|},
)
},
)
define-function: (
"check-notable-tooltip-position-complete",
[x, i_x, popover_x],
block {
call-function: ("check-notable-tooltip-position", {"x": |x|, "i_x": |i_x|})
assert-count: ("//*[@class='tooltip popover']", 0)
click: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
assert-count: ("//*[@class='tooltip popover']", 1)
compare-elements-position-near: (
"//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']",
"//*[@class='tooltip popover']",
{"y": 30}
)
compare-elements-position-false: (
"//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']",
"//*[@class='tooltip popover']",
["x"]
)
assert-position: (
"//*[@class='tooltip popover']",
{"x": |popover_x|}
)
click: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
move-cursor-to: "//h1"
assert-count: ("//*[@class='tooltip popover']", 0)
},
)
// We start with a wide screen.
set-window-size: (1100, 600)
call-function: ("check-notable-tooltip-position-complete", {
"x": 682,
"i_x": 960,
"popover_x": 468,
})
// Now only the `i` should be on the next line.
set-window-size: (1055, 600)
compare-elements-position-false: (
"//*[@id='method.create_an_iterator_from_read']//a[normalize-space()='NotableStructWithLongName']",
"//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']",
["y", "x"],
)
// Now both the `i` and the struct name should be on the next line.
set-window-size: (980, 600)
call-function: ("check-notable-tooltip-position", {
"x": 250,
"i_x": 528,
})
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.NotableStructWithLongName.html"
// This is needed to ensure that the text color is computed.
show-text: true
// Now check the colors.
define-function: (
"check-colors",
[theme, header_color, content_color, type_color, trait_color, link_color],
block {
call-function: ("switch-theme", {"theme": |theme|})
assert-css: (
"//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']",
{"color": |content_color|},
ALL,
)
move-cursor-to: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
wait-for-count: (".tooltip.popover", 1)
assert-css: (
"//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']",
{"color": |link_color|},
ALL,
)
assert-css: (
".tooltip.popover h3",
{"color": |header_color|},
ALL,
)
assert-css: (
".tooltip.popover pre",
{"color": |content_color|},
ALL,
)
assert-css: (
".tooltip.popover pre a.struct",
{"color": |type_color|},
ALL,
)
assert-css: (
".tooltip.popover pre a.trait",
{"color": |trait_color|},
ALL,
)
},
)
call-function: (
"check-colors",
{
"theme": "ayu",
"link_color": "#39afd7",
"content_color": "#e6e1cf",
"header_color": "#fff",
"type_color": "#ffa0a5",
"trait_color": "#39afd7",
},
)
call-function: (
"check-colors",
{
"theme": "dark",
"link_color": "#d2991d",
"content_color": "#ddd",
"header_color": "#ddd",
"type_color": "#2dbfb8",
"trait_color": "#b78cf2",
},
)
call-function: (
"check-colors",
{
"theme": "light",
"link_color": "#3873ad",
"content_color": "black",
"header_color": "black",
"type_color": "#ad378a",
"trait_color": "#6e4fc9",
},
)
// Checking on mobile now.
set-window-size: (650, 600)
wait-for-size: ("body", {"width": 650})
call-function: ("check-notable-tooltip-position-complete", {
"x": 26,
"i_x": 305,
"popover_x": 0,
})
reload:
// Check that pressing escape works
click: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
move-cursor-to: "//*[@class='tooltip popover']"
assert-count: ("//*[@class='tooltip popover']", 1)
press-key: "Escape"
assert-count: ("//*[@class='tooltip popover']", 0)
assert: "#method\.create_an_iterator_from_read .tooltip:focus"
// Check that clicking outside works.
click: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
assert-count: ("//*[@class='tooltip popover']", 1)
click: ".main-heading h1"
assert-count: ("//*[@class='tooltip popover']", 0)
assert-false: "#method\.create_an_iterator_from_read .tooltip:focus"
// Check that pressing tab over and over works.
click: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
move-cursor-to: "//*[@class='tooltip popover']"
assert-count: ("//*[@class='tooltip popover']", 1)
press-key: "Tab"
press-key: "Tab"
press-key: "Tab"
press-key: "Tab"
press-key: "Tab"
press-key: "Tab"
press-key: "Tab"
assert-count: ("//*[@class='tooltip popover']", 0)
assert: "#method\.create_an_iterator_from_read .tooltip:focus"
define-function: (
"setup-popup",
[],
block {
store-window-property: {"scrollY": scroll}
click: "#method\.create_an_iterator_from_read .fn"
// We ensure that the scroll position changed.
assert-window-property-false: {"scrollY": |scroll|}
// Store the new position.
store-window-property: {"scrollY": scroll}
click: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
wait-for: "//*[@class='tooltip popover']"
click: ".main-heading h1"
}
)
// Now we check that the focus isn't given back to the wrong item when opening
// another popover.
call-function: ("setup-popup", {})
click: ".main-heading h1"
// We ensure we didn't come back to the previous focused item.
assert-window-property-false: {"scrollY": |scroll|}
// Same but with Escape handling.
call-function: ("setup-popup", {})
press-key: "Escape"
// We ensure we didn't come back to the previous focused item.
assert-window-property-false: {"scrollY": |scroll|}
// Opening the mobile sidebar should close the popover.
set-window-size: (650, 600)
click: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
assert-count: ("//*[@class='tooltip popover']", 1)
click: ".sidebar-menu-toggle"
assert: "//*[@class='sidebar shown']"
assert-count: ("//*[@class='tooltip popover']", 0)
assert-false: "#method\.create_an_iterator_from_read .tooltip:focus"
// Also check the focus handling for the settings button.
set-window-size: (1100, 600)
reload:
assert-count: ("//*[@class='tooltip popover']", 0)
click: "//*[@id='method.create_an_iterator_from_read']//*[@class='tooltip']"
wait-for-count: ("//*[@class='tooltip popover']", 1)
call-function: ("open-settings-menu", {})
wait-for-count: ("//*[@class='tooltip popover']", 0)
assert-false: "#method\.create_an_iterator_from_read .tooltip:focus"

View file

@ -1,86 +0,0 @@
// Checks that the crate search filtering is handled correctly and changes the results.
include: "utils.goml"
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
show-text: true
call-function: ("perform-search", {"query": "test"})
assert-text: ("#results .externcrate", "test_docs")
wait-for: "#crate-search"
// We now want to change the crate filter.
click: "#crate-search"
// We select "lib2" option then press enter to change the filter.
press-key: "ArrowDown"
press-key: "ArrowDown"
press-key: "ArrowDown"
press-key: "ArrowDown"
press-key: "ArrowDown"
press-key: "Enter"
// Waiting for the search results to appear...
wait-for: "#search-tabs"
wait-for-false: "#search-tabs .count.loading"
assert-document-property: ({"URL": "&filter-crate="}, CONTAINS)
// We check that there is no more "test_docs" appearing.
assert-false: "#results .externcrate"
// We also check that "lib2" is the filter crate.
assert-property: ("#crate-search", {"value": "lib2"})
// Now we check that leaving the search results and putting them back keeps the
// crate filtering.
press-key: "Escape"
wait-for-css: ("#main-content", {"display": "block"})
click: "#search-button"
wait-for: ".search-input"
wait-for-css: ("#main-content", {"display": "none"})
// We check that there is no more "test_docs" appearing.
assert-false: "#results .externcrate"
assert-property: ("#crate-search", {"value": "lib2"})
// Selecting back "All crates"
click: "#crate-search"
press-key: "ArrowUp"
press-key: "ArrowUp"
press-key: "ArrowUp"
press-key: "ArrowUp"
press-key: "ArrowUp"
press-key: "Enter"
// Waiting for the search results to appear...
wait-for: "#search-tabs"
wait-for-false: "#search-tabs .count.loading"
assert-property: ("#crate-search", {"value": "all crates"})
// Checking that the URL parameter is taken into account for crate filtering.
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=test&filter-crate=lib2"
wait-for: "#crate-search"
assert-property: ("#crate-search", {"value": "lib2"})
assert-false: "#results .externcrate"
// Checking that the text for the "title" is correct (the "all crates" comes from the "<select>").
assert-text: (".search-switcher", "Search results in all crates", STARTS_WITH)
// Checking the display of the crate filter.
// We start with the light theme.
call-function: ("switch-theme", {"theme": "light"})
set-timeout: 2000
wait-for: "#crate-search"
assert-css: ("#crate-search", {
"border": "1px solid #e0e0e0",
"color": "black",
"background-color": "white",
})
// We now check the dark theme.
call-function: ("switch-theme", {"theme": "dark"})
wait-for-css: ("#crate-search", {
"border": "1px solid #e0e0e0",
"color": "#ddd",
"background-color": "#353535",
})
// And finally we check the ayu theme.
call-function: ("switch-theme", {"theme": "ayu"})
wait-for-css: ("#crate-search", {
"border": "1px solid #5c6773",
"color": "#c5c5c5",
"background-color": "#0f1419",
})

View file

@ -1,114 +0,0 @@
// ignore-tidy-linelength
// Checks that the search results have the expected width.
include: "utils.goml"
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
set-window-size: (900, 1000)
write-into: (".search-input", "test")
// To be SURE that the search will be run.
press-key: 'Enter'
wait-for: "#crate-search"
wait-for-false: "#search-tabs .count.loading"
// The width is returned by "getComputedStyle" which returns the exact number instead of the
// CSS rule which is "50%"...
assert-size: (".search-results div.desc", {"width": 248})
store-size: (".search-results .result-name .typename", {"width": width})
set-window-size: (600, 100)
// As counter-intuitive as it may seem, in this width, the width is "100%", which is why
// when computed it's larger.
assert-size: (".search-results div.desc", {"width": 566})
// The result set is all on one line.
compare-elements-position-near: (
".search-results .result-name .typename",
".search-results .result-name .path",
{"y": 2},
)
compare-elements-position-near-false: (
".search-results .result-name .typename",
".search-results .result-name .path",
{"x": 5},
)
// The width of the "typename" isn't fixed anymore in this display mode.
store-size: (".search-results .result-name .typename", {"width": new_width})
assert: |new_width| < |width| - 10
// Check that if the search is too long on mobile, it'll go under the "typename".
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html?search=SuperIncrediblyLongLongLongLongLongLongLongGigaGigaGigaMegaLongLongLongStructName"
wait-for: "#crate-search"
wait-for-false: "#search-tabs .count.loading"
compare-elements-position-near: (
".search-results .result-name .typename",
".search-results .result-name .path",
{"y": 2, "x": 0},
)
compare-elements-size-near: (
".search-results .result-name",
".search-results .result-name .path",
{"width": 8, "height": 8},
)
// Check that the crate filter `<select>` is correctly handled when it goes to next line.
// To do so we need to update the length of one of its `<option>`.
set-window-size: (900, 900)
// First we check the current width, height and position.
assert-css: ("#crate-search", {"width": "159px"})
store-size: (".search-switcher", {
"height": search_results_title_height,
"width": search_results_title_width,
})
assert-css: ("#search", {"width": "640px"})
// Then we update the text of one of the `<option>`.
set-text: (
"#crate-search option",
"sdjfaksdjfaksjdbfkadsbfkjsadbfkdsbkfbsadkjfbkdsabfkadsfkjdsafa",
)
// Then we compare again to confirm the height didn't change.
assert-size: ("#crate-search", {"width": 185})
assert-size: (".search-switcher", {
"height": |search_results_title_height|,
})
assert-css: ("#search", {"width": "640px"})
assert: |search_results_title_width| <= 640
// Now checking that the crate filter is working as expected too.
show-text: true
define-function: (
"check-filter",
[theme, border, filter, hover_border, hover_filter],
block {
call-function: ("switch-theme", {"theme": |theme|})
wait-for: "#crate-search"
wait-for-false: "#search-tabs .count.loading"
assert-css: ("#crate-search", {"border": "1px solid " + |border|})
assert-css: ("#crate-search-div::after", {"filter": |filter|})
move-cursor-to: "#crate-search"
assert-css: ("#crate-search", {"border": "1px solid " + |hover_border|})
assert-css: ("#crate-search-div::after", {"filter": |hover_filter|})
move-cursor-to: ".search-input"
},
)
call-function: ("check-filter", {
"theme": "ayu",
"border": "#5c6773",
"filter": "invert(0.41) sepia(0.12) saturate(4.87) hue-rotate(171deg) brightness(0.94) contrast(0.94)",
"hover_border": "#e0e0e0",
"hover_filter": "invert(0.98) sepia(0.12) saturate(0.81) hue-rotate(343deg) brightness(1.13) contrast(0.76)",
})
call-function: ("check-filter", {
"theme": "dark",
"border": "#e0e0e0",
"filter": "invert(0.94) sepia(0) saturate(7.21) hue-rotate(255deg) brightness(0.9) contrast(0.9)",
"hover_border": "#2196f3",
"hover_filter": "invert(0.69) sepia(0.6) saturate(66.13) hue-rotate(184deg) brightness(1) contrast(0.91)",
})
call-function: ("check-filter", {
"theme": "light",
"border": "#e0e0e0",
"filter": "invert(1) sepia(0) saturate(42.23) hue-rotate(289deg) brightness(1.14) contrast(0.76)",
"hover_border": "#717171",
"hover_filter": "invert(0.44) sepia(0.18) saturate(0.23) hue-rotate(317deg) brightness(0.96) contrast(0.93)",
})

View file

@ -64,6 +64,12 @@ pub type GenericTypeAlias = (Generic<(u32, ())>, Generic<u32>);
//@ hasraw type_layout/type.Edges.html 'Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.' //@ hasraw type_layout/type.Edges.html 'Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.'
pub type Edges<'a, E> = std::borrow::Cow<'a, [E]>; pub type Edges<'a, E> = std::borrow::Cow<'a, [E]>;
pub trait Project { type Assoc; }
// We can't compute layout as the alias stays rigid. A `LayoutError::TooGeneric` is returned.
//@ hasraw type_layout/struct.RigidAlias.html 'Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.'
//@ !hasraw - 'Size: '
pub struct RigidAlias(<() as Project>::Assoc) where for<'a> (): Project;
//@ !hasraw type_layout/trait.MyTrait.html 'Size: ' //@ !hasraw type_layout/trait.MyTrait.html 'Size: '
pub trait MyTrait {} pub trait MyTrait {}
@ -92,9 +98,3 @@ pub enum Uninhabited {}
//@ hasraw type_layout/struct.Uninhabited2.html 'Size: ' //@ hasraw type_layout/struct.Uninhabited2.html 'Size: '
//@ hasraw - '8 bytes (<a href="{{channel}}/reference/glossary.html#uninhabited">uninhabited</a>)' //@ hasraw - '8 bytes (<a href="{{channel}}/reference/glossary.html#uninhabited">uninhabited</a>)'
pub struct Uninhabited2(std::convert::Infallible, u64); pub struct Uninhabited2(std::convert::Infallible, u64);
pub trait Project { type Assoc; }
// We can't compute layout. A `LayoutError::Unknown` is returned.
//@ hasraw type_layout/struct.Unknown.html 'Unable to compute type layout.'
//@ !hasraw - 'Size: '
pub struct Unknown(<() as Project>::Assoc) where for<'a> (): Project;

View file

@ -1,29 +1,30 @@
// regression test for https://github.com/rust-lang/rust/issues/149187 // regression test for https://github.com/rust-lang/rust/issues/149187
#![deny(invalid_doc_attributes)]
#![doc(html_favicon_url)] #![doc(html_favicon_url)]
//~^ ERROR: malformed `doc` attribute //~^ ERROR
//~| NOTE expected this to be of the form `html_favicon_url = "..."` //~| WARN
#![doc(html_logo_url)] #![doc(html_logo_url)]
//~^ ERROR: malformed `doc` attribute //~^ ERROR
//~| NOTE expected this to be of the form `html_logo_url = "..."` //~| WARN
#![doc(html_playground_url)] #![doc(html_playground_url)]
//~^ ERROR: malformed `doc` attribute //~^ ERROR
//~| NOTE expected this to be of the form `html_playground_url = "..."` //~| WARN
#![doc(issue_tracker_base_url)] #![doc(issue_tracker_base_url)]
//~^ ERROR: malformed `doc` attribute //~^ ERROR
//~| NOTE expected this to be of the form `issue_tracker_base_url = "..."` //~| WARN
#![doc(html_favicon_url = 1)] #![doc(html_favicon_url = 1)]
//~^ ERROR malformed `doc` attribute //~^ ERROR
//~| NOTE expected a string literal //~| WARN
#![doc(html_logo_url = 2)] #![doc(html_logo_url = 2)]
//~^ ERROR malformed `doc` attribute //~^ ERROR
//~| NOTE expected a string literal //~| WARN
#![doc(html_playground_url = 3)] #![doc(html_playground_url = 3)]
//~^ ERROR malformed `doc` attribute //~^ ERROR
//~| NOTE expected a string literal //~| WARN
#![doc(issue_tracker_base_url = 4)] #![doc(issue_tracker_base_url = 4)]
//~^ ERROR malformed `doc` attribute //~^ ERROR
//~| NOTE expected a string literal //~| WARN
#![doc(html_no_source = "asdf")] #![doc(html_no_source = "asdf")]
//~^ ERROR malformed `doc` attribute //~^ ERROR
//~| NOTE didn't expect any arguments here //~| WARN

View file

@ -1,76 +1,79 @@
error[E0539]: malformed `doc` attribute input error: expected this to be of the form `... = "..."`
--> $DIR/bad-render-options.rs:3:1 --> $DIR/bad-render-options.rs:4:8
| |
LL | #![doc(html_favicon_url)] LL | #![doc(html_favicon_url)]
| ^^^^^^^----------------^^ | ^^^^^^^^^^^^^^^^
| | |
| expected this to be of the form `html_favicon_url = "..."` = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
note: the lint level is defined here
--> $DIR/bad-render-options.rs:2:9
|
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
error[E0539]: malformed `doc` attribute input error: expected this to be of the form `... = "..."`
--> $DIR/bad-render-options.rs:6:1 --> $DIR/bad-render-options.rs:7:8
| |
LL | #![doc(html_logo_url)] LL | #![doc(html_logo_url)]
| ^^^^^^^-------------^^ | ^^^^^^^^^^^^^
| | |
| expected this to be of the form `html_logo_url = "..."` = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error[E0539]: malformed `doc` attribute input error: expected this to be of the form `... = "..."`
--> $DIR/bad-render-options.rs:9:1 --> $DIR/bad-render-options.rs:10:8
| |
LL | #![doc(html_playground_url)] LL | #![doc(html_playground_url)]
| ^^^^^^^-------------------^^ | ^^^^^^^^^^^^^^^^^^^
| | |
| expected this to be of the form `html_playground_url = "..."` = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error[E0539]: malformed `doc` attribute input error: expected this to be of the form `... = "..."`
--> $DIR/bad-render-options.rs:12:1 --> $DIR/bad-render-options.rs:13:8
| |
LL | #![doc(issue_tracker_base_url)] LL | #![doc(issue_tracker_base_url)]
| ^^^^^^^----------------------^^ | ^^^^^^^^^^^^^^^^^^^^^^
| | |
| expected this to be of the form `issue_tracker_base_url = "..."` = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error[E0539]: malformed `doc` attribute input error: malformed `doc` attribute input
--> $DIR/bad-render-options.rs:15:1 --> $DIR/bad-render-options.rs:16:27
| |
LL | #![doc(html_favicon_url = 1)] LL | #![doc(html_favicon_url = 1)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^-^^ | ^
| | |
| expected a string literal here = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error[E0539]: malformed `doc` attribute input error: malformed `doc` attribute input
--> $DIR/bad-render-options.rs:18:1 --> $DIR/bad-render-options.rs:19:24
| |
LL | #![doc(html_logo_url = 2)] LL | #![doc(html_logo_url = 2)]
| ^^^^^^^^^^^^^^^^^^^^^^^-^^ | ^
| | |
| expected a string literal here = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error[E0539]: malformed `doc` attribute input error: malformed `doc` attribute input
--> $DIR/bad-render-options.rs:21:1 --> $DIR/bad-render-options.rs:22:30
| |
LL | #![doc(html_playground_url = 3)] LL | #![doc(html_playground_url = 3)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-^^ | ^
| | |
| expected a string literal here = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error[E0539]: malformed `doc` attribute input error: malformed `doc` attribute input
--> $DIR/bad-render-options.rs:24:1 --> $DIR/bad-render-options.rs:25:33
| |
LL | #![doc(issue_tracker_base_url = 4)] LL | #![doc(issue_tracker_base_url = 4)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-^^ | ^
| | |
| expected a string literal here = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error[E0565]: malformed `doc` attribute input error: didn't expect any arguments here
--> $DIR/bad-render-options.rs:27:1 --> $DIR/bad-render-options.rs:28:23
| |
LL | #![doc(html_no_source = "asdf")] LL | #![doc(html_no_source = "asdf")]
| ^^^^^^^^^^^^^^^^^^^^^^--------^^ | ^^^^^^^^
| | |
| didn't expect any arguments here = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error: aborting due to 9 previous errors error: aborting due to 9 previous errors
Some errors have detailed explanations: E0539, E0565.
For more information about an error, try `rustc --explain E0539`.

View file

@ -1,11 +1,13 @@
//@ compile-flags: --passes unknown-pass //@ compile-flags: --passes unknown-pass
#![deny(invalid_doc_attributes)]
//~^ NOTE
#![doc(no_default_passes)] #![doc(no_default_passes)]
//~^ ERROR unknown `doc` attribute `no_default_passes` //~^ ERROR unknown `doc` attribute `no_default_passes`
//~| NOTE no longer functions //~| NOTE no longer functions
//~| NOTE see issue #44136 //~| NOTE see issue #44136
//~| NOTE `doc(no_default_passes)` is now a no-op //~| NOTE `doc(no_default_passes)` is now a no-op
//~| NOTE `#[deny(invalid_doc_attributes)]` on by default
#![doc(passes = "collapse-docs unindent-comments")] #![doc(passes = "collapse-docs unindent-comments")]
//~^ ERROR unknown `doc` attribute `passes` //~^ ERROR unknown `doc` attribute `passes`
//~| NOTE no longer functions //~| NOTE no longer functions

View file

@ -4,17 +4,21 @@ warning: the `passes` flag no longer functions
= help: you may want to use --document-private-items = help: you may want to use --document-private-items
error: unknown `doc` attribute `no_default_passes` error: unknown `doc` attribute `no_default_passes`
--> $DIR/deprecated-attrs.rs:3:8 --> $DIR/deprecated-attrs.rs:6:8
| |
LL | #![doc(no_default_passes)] LL | #![doc(no_default_passes)]
| ^^^^^^^^^^^^^^^^^ no longer functions | ^^^^^^^^^^^^^^^^^ no longer functions
| |
= note: `doc` attribute `no_default_passes` no longer functions; see issue #44136 <https://github.com/rust-lang/rust/issues/44136> = note: `doc` attribute `no_default_passes` no longer functions; see issue #44136 <https://github.com/rust-lang/rust/issues/44136>
= note: `doc(no_default_passes)` is now a no-op = note: `doc(no_default_passes)` is now a no-op
= note: `#[deny(invalid_doc_attributes)]` on by default note: the lint level is defined here
--> $DIR/deprecated-attrs.rs:3:9
|
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
error: unknown `doc` attribute `passes` error: unknown `doc` attribute `passes`
--> $DIR/deprecated-attrs.rs:9:8 --> $DIR/deprecated-attrs.rs:11:8
| |
LL | #![doc(passes = "collapse-docs unindent-comments")] LL | #![doc(passes = "collapse-docs unindent-comments")]
| ^^^^^^ no longer functions | ^^^^^^ no longer functions
@ -23,7 +27,7 @@ LL | #![doc(passes = "collapse-docs unindent-comments")]
= note: `doc(passes)` is now a no-op = note: `doc(passes)` is now a no-op
error: unknown `doc` attribute `plugins` error: unknown `doc` attribute `plugins`
--> $DIR/deprecated-attrs.rs:14:8 --> $DIR/deprecated-attrs.rs:16:8
| |
LL | #![doc(plugins = "xxx")] LL | #![doc(plugins = "xxx")]
| ^^^^^^^ no longer functions | ^^^^^^^ no longer functions

View file

@ -1,3 +1,4 @@
#![deny(invalid_doc_attributes)]
#![feature(doc_cfg)] #![feature(doc_cfg)]
#[doc(cfg(foo), cfg(bar))] #[doc(cfg(foo), cfg(bar))]

View file

@ -1,5 +1,5 @@
warning: unexpected `cfg` condition name: `foo` warning: unexpected `cfg` condition name: `foo`
--> $DIR/doc-cfg-2.rs:3:11 --> $DIR/doc-cfg-2.rs:4:11
| |
LL | #[doc(cfg(foo), cfg(bar))] LL | #[doc(cfg(foo), cfg(bar))]
| ^^^ | ^^^
@ -10,7 +10,7 @@ LL | #[doc(cfg(foo), cfg(bar))]
= note: `#[warn(unexpected_cfgs)]` on by default = note: `#[warn(unexpected_cfgs)]` on by default
warning: unexpected `cfg` condition name: `bar` warning: unexpected `cfg` condition name: `bar`
--> $DIR/doc-cfg-2.rs:3:21 --> $DIR/doc-cfg-2.rs:4:21
| |
LL | #[doc(cfg(foo), cfg(bar))] LL | #[doc(cfg(foo), cfg(bar))]
| ^^^ | ^^^
@ -19,45 +19,49 @@ LL | #[doc(cfg(foo), cfg(bar))]
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
error: only `hide` or `show` are allowed in `#[doc(auto_cfg(...))]` error: only `hide` or `show` are allowed in `#[doc(auto_cfg(...))]`
--> $DIR/doc-cfg-2.rs:6:16 --> $DIR/doc-cfg-2.rs:7:16
| |
LL | #[doc(auto_cfg(42))] LL | #[doc(auto_cfg(42))]
| ^^ | ^^
| |
= note: `#[deny(invalid_doc_attributes)]` on by default note: the lint level is defined here
--> $DIR/doc-cfg-2.rs:1:9
|
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
error: `#![doc(auto_cfg(hide(...)))]` only accepts identifiers or key/value items error: `#![doc(auto_cfg(hide(...)))]` only accepts identifiers or key/value items
--> $DIR/doc-cfg-2.rs:7:21 --> $DIR/doc-cfg-2.rs:8:21
| |
LL | #[doc(auto_cfg(hide(true)))] LL | #[doc(auto_cfg(hide(true)))]
| ^^^^ | ^^^^
error: `#![doc(auto_cfg(hide(...)))]` only accepts identifiers or key/value items error: `#![doc(auto_cfg(hide(...)))]` only accepts identifiers or key/value items
--> $DIR/doc-cfg-2.rs:8:21 --> $DIR/doc-cfg-2.rs:9:21
| |
LL | #[doc(auto_cfg(hide(42)))] LL | #[doc(auto_cfg(hide(42)))]
| ^^ | ^^
error: `#![doc(auto_cfg(hide(...)))]` only accepts identifiers or key/value items error: `#![doc(auto_cfg(hide(...)))]` only accepts identifiers or key/value items
--> $DIR/doc-cfg-2.rs:9:21 --> $DIR/doc-cfg-2.rs:10:21
| |
LL | #[doc(auto_cfg(hide("a")))] LL | #[doc(auto_cfg(hide("a")))]
| ^^^ | ^^^
error: expected boolean for `#[doc(auto_cfg = ...)]` error: expected boolean for `#[doc(auto_cfg = ...)]`
--> $DIR/doc-cfg-2.rs:10:18 --> $DIR/doc-cfg-2.rs:11:18
| |
LL | #[doc(auto_cfg = 42)] LL | #[doc(auto_cfg = 42)]
| ^^ | ^^
error: expected boolean for `#[doc(auto_cfg = ...)]` error: expected boolean for `#[doc(auto_cfg = ...)]`
--> $DIR/doc-cfg-2.rs:11:18 --> $DIR/doc-cfg-2.rs:12:18
| |
LL | #[doc(auto_cfg = "a")] LL | #[doc(auto_cfg = "a")]
| ^^^ | ^^^
warning: unexpected `cfg` condition name: `feature` warning: unexpected `cfg` condition name: `feature`
--> $DIR/doc-cfg-2.rs:14:21 --> $DIR/doc-cfg-2.rs:15:21
| |
LL | #[doc(auto_cfg(hide(feature = "windows")))] LL | #[doc(auto_cfg(hide(feature = "windows")))]
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^
@ -66,7 +70,7 @@ LL | #[doc(auto_cfg(hide(feature = "windows")))]
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
warning: unexpected `cfg` condition name: `foo` warning: unexpected `cfg` condition name: `foo`
--> $DIR/doc-cfg-2.rs:16:21 --> $DIR/doc-cfg-2.rs:17:21
| |
LL | #[doc(auto_cfg(hide(foo)))] LL | #[doc(auto_cfg(hide(foo)))]
| ^^^ | ^^^

View file

@ -1,9 +1,10 @@
#![deny(invalid_doc_attributes)]
#![feature(doc_cfg)] #![feature(doc_cfg)]
#[doc(cfg(), cfg(foo, bar))] #[doc(cfg(), cfg(foo, bar))]
//~^ ERROR malformed `doc` attribute input //~^ ERROR
//~| ERROR malformed `doc` attribute input //~| ERROR
#[doc(cfg())] //~ ERROR #[doc(cfg())] //~ ERROR
#[doc(cfg(foo, bar))] //~ ERROR #[doc(cfg(foo, bar))] //~ ERROR
#[doc(auto_cfg(hide(foo::bar)))] //~ ERROR #[doc(auto_cfg(hide(foo::bar)))]
pub fn foo() {} pub fn foo() {}

View file

@ -1,5 +1,5 @@
error[E0805]: malformed `doc` attribute input error[E0805]: malformed `doc` attribute input
--> $DIR/doc-cfg.rs:3:1 --> $DIR/doc-cfg.rs:4:1
| |
LL | #[doc(cfg(), cfg(foo, bar))] LL | #[doc(cfg(), cfg(foo, bar))]
| ^^^^^^^^^--^^^^^^^^^^^^^^^^^ | ^^^^^^^^^--^^^^^^^^^^^^^^^^^
@ -7,7 +7,7 @@ LL | #[doc(cfg(), cfg(foo, bar))]
| expected a single argument here | expected a single argument here
error[E0805]: malformed `doc` attribute input error[E0805]: malformed `doc` attribute input
--> $DIR/doc-cfg.rs:3:1 --> $DIR/doc-cfg.rs:4:1
| |
LL | #[doc(cfg(), cfg(foo, bar))] LL | #[doc(cfg(), cfg(foo, bar))]
| ^^^^^^^^^^^^^^^^----------^^ | ^^^^^^^^^^^^^^^^----------^^
@ -15,7 +15,7 @@ LL | #[doc(cfg(), cfg(foo, bar))]
| expected a single argument here | expected a single argument here
error[E0805]: malformed `doc` attribute input error[E0805]: malformed `doc` attribute input
--> $DIR/doc-cfg.rs:6:1 --> $DIR/doc-cfg.rs:7:1
| |
LL | #[doc(cfg())] LL | #[doc(cfg())]
| ^^^^^^^^^--^^ | ^^^^^^^^^--^^
@ -23,22 +23,13 @@ LL | #[doc(cfg())]
| expected a single argument here | expected a single argument here
error[E0805]: malformed `doc` attribute input error[E0805]: malformed `doc` attribute input
--> $DIR/doc-cfg.rs:7:1 --> $DIR/doc-cfg.rs:8:1
| |
LL | #[doc(cfg(foo, bar))] LL | #[doc(cfg(foo, bar))]
| ^^^^^^^^^----------^^ | ^^^^^^^^^----------^^
| | | |
| expected a single argument here | expected a single argument here
error[E0539]: malformed `doc` attribute input error: aborting due to 4 previous errors
--> $DIR/doc-cfg.rs:8:1
|
LL | #[doc(auto_cfg(hide(foo::bar)))]
| ^^^^^^^^^^^^^^^^^^^^--------^^^^
| |
| expected a valid identifier here
error: aborting due to 5 previous errors For more information about this error, try `rustc --explain E0805`.
Some errors have detailed explanations: E0539, E0805.
For more information about an error, try `rustc --explain E0539`.

View file

@ -1,6 +1,8 @@
#![deny(invalid_doc_attributes)]
//~^ NOTE
#[doc(include = "external-cross-doc.md")] #[doc(include = "external-cross-doc.md")]
//~^ ERROR unknown `doc` attribute `include` //~^ ERROR unknown `doc` attribute `include`
//~| HELP use `doc = include_str!` instead //~| HELP use `doc = include_str!` instead
// FIXME(#85497): make this a deny instead so it's more clear what's happening // FIXME(#85497): make this a deny instead so it's more clear what's happening
//~| NOTE on by default
pub struct NeedMoreDocs; pub struct NeedMoreDocs;

View file

@ -1,10 +1,14 @@
error: unknown `doc` attribute `include` error: unknown `doc` attribute `include`
--> $DIR/doc-include-suggestion.rs:1:7 --> $DIR/doc-include-suggestion.rs:4:7
| |
LL | #[doc(include = "external-cross-doc.md")] LL | #[doc(include = "external-cross-doc.md")]
| ^^^^^^^ help: use `doc = include_str!` instead: `#[doc = include_str!("external-cross-doc.md")]` | ^^^^^^^ help: use `doc = include_str!` instead: `#[doc = include_str!("external-cross-doc.md")]`
| |
= note: `#[deny(invalid_doc_attributes)]` on by default note: the lint level is defined here
--> $DIR/doc-include-suggestion.rs:1:9
|
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 1 previous error error: aborting due to 1 previous error

View file

@ -1,3 +1,4 @@
#![deny(invalid_doc_attributes)]
#![crate_type = "lib"] #![crate_type = "lib"]
#![doc(test)] #![doc(test)]

View file

@ -1,19 +1,23 @@
error: `#[doc(test(...)]` takes a list of attributes error: `#[doc(test(...)]` takes a list of attributes
--> $DIR/doc-test-attr.rs:3:8 --> $DIR/doc-test-attr.rs:4:8
| |
LL | #![doc(test)] LL | #![doc(test)]
| ^^^^ | ^^^^
| |
= note: `#[deny(invalid_doc_attributes)]` on by default note: the lint level is defined here
--> $DIR/doc-test-attr.rs:1:9
|
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
error: `#[doc(test(...)]` takes a list of attributes error: `#[doc(test(...)]` takes a list of attributes
--> $DIR/doc-test-attr.rs:5:13 --> $DIR/doc-test-attr.rs:6:13
| |
LL | #![doc(test = "hello")] LL | #![doc(test = "hello")]
| ^^^^^^^^^ | ^^^^^^^^^
error: unknown `doc(test)` attribute `a` error: unknown `doc(test)` attribute `a`
--> $DIR/doc-test-attr.rs:7:13 --> $DIR/doc-test-attr.rs:8:13
| |
LL | #![doc(test(a))] LL | #![doc(test(a))]
| ^ | ^

View file

@ -1,3 +1,4 @@
#![deny(invalid_doc_attributes)]
#![doc(as_ptr)] #![doc(as_ptr)]
//~^ ERROR unknown `doc` attribute `as_ptr` //~^ ERROR unknown `doc` attribute `as_ptr`

View file

@ -1,25 +1,29 @@
error: unknown `doc` attribute `as_ptr` error: unknown `doc` attribute `as_ptr`
--> $DIR/doc-attr-2.rs:4:7 --> $DIR/doc-attr-2.rs:5:7
| |
LL | #[doc(as_ptr)] LL | #[doc(as_ptr)]
| ^^^^^^ | ^^^^^^
| |
= note: `#[deny(invalid_doc_attributes)]` on by default note: the lint level is defined here
--> $DIR/doc-attr-2.rs:1:9
|
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
error: unknown `doc` attribute `foo::bar` error: unknown `doc` attribute `foo::bar`
--> $DIR/doc-attr-2.rs:8:7 --> $DIR/doc-attr-2.rs:9:7
| |
LL | #[doc(foo::bar, crate::bar::baz = "bye")] LL | #[doc(foo::bar, crate::bar::baz = "bye")]
| ^^^^^^^^ | ^^^^^^^^
error: unknown `doc` attribute `crate::bar::baz` error: unknown `doc` attribute `crate::bar::baz`
--> $DIR/doc-attr-2.rs:8:17 --> $DIR/doc-attr-2.rs:9:17
| |
LL | #[doc(foo::bar, crate::bar::baz = "bye")] LL | #[doc(foo::bar, crate::bar::baz = "bye")]
| ^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^
error: unknown `doc` attribute `as_ptr` error: unknown `doc` attribute `as_ptr`
--> $DIR/doc-attr-2.rs:1:8 --> $DIR/doc-attr-2.rs:2:8
| |
LL | #![doc(as_ptr)] LL | #![doc(as_ptr)]
| ^^^^^^ | ^^^^^^

View file

@ -1,8 +1,12 @@
#![crate_type = "lib"] #![crate_type = "lib"]
#![deny(invalid_doc_attributes)]
#[doc(123)] #[doc(123)]
//~^ ERROR malformed `doc` attribute //~^ ERROR
//~| WARN
#[doc("hello", "bar")] #[doc("hello", "bar")]
//~^ ERROR malformed `doc` attribute //~^ ERROR
//~| ERROR malformed `doc` attribute //~| ERROR
//~| WARN
//~| WARN
fn bar() {} fn bar() {}

View file

@ -1,27 +1,31 @@
error[E0539]: malformed `doc` attribute input error: expected this to be of the form `... = "..."`
--> $DIR/doc-attr.rs:3:1 --> $DIR/doc-attr.rs:4:7
| |
LL | #[doc(123)] LL | #[doc(123)]
| ^^^^^^---^^ | ^^^
| | |
| expected this to be of the form `... = "..."` = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
note: the lint level is defined here
--> $DIR/doc-attr.rs:2:9
|
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
error[E0539]: malformed `doc` attribute input error: expected this to be of the form `... = "..."`
--> $DIR/doc-attr.rs:5:1 --> $DIR/doc-attr.rs:7:7
| |
LL | #[doc("hello", "bar")] LL | #[doc("hello", "bar")]
| ^^^^^^-------^^^^^^^^^ | ^^^^^^^
| | |
| expected this to be of the form `... = "..."` = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error[E0539]: malformed `doc` attribute input error: expected this to be of the form `... = "..."`
--> $DIR/doc-attr.rs:5:1 --> $DIR/doc-attr.rs:7:16
| |
LL | #[doc("hello", "bar")] LL | #[doc("hello", "bar")]
| ^^^^^^^^^^^^^^^-----^^ | ^^^^^
| | |
| expected this to be of the form `... = "..."` = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error: aborting due to 3 previous errors error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0539`.

View file

@ -1,5 +1,6 @@
//@ run-rustfix //@ run-rustfix
#![feature(doc_notable_trait)] #![feature(doc_notable_trait)]
#![deny(invalid_doc_attributes)]
#[doc(notable_trait)] #[doc(notable_trait)]
//~^ ERROR unknown `doc` attribute `spotlight` //~^ ERROR unknown `doc` attribute `spotlight`

View file

@ -1,5 +1,6 @@
//@ run-rustfix //@ run-rustfix
#![feature(doc_notable_trait)] #![feature(doc_notable_trait)]
#![deny(invalid_doc_attributes)]
#[doc(spotlight)] #[doc(spotlight)]
//~^ ERROR unknown `doc` attribute `spotlight` //~^ ERROR unknown `doc` attribute `spotlight`

View file

@ -1,12 +1,16 @@
error: unknown `doc` attribute `spotlight` error: unknown `doc` attribute `spotlight`
--> $DIR/doc-spotlight.rs:4:7 --> $DIR/doc-spotlight.rs:5:7
| |
LL | #[doc(spotlight)] LL | #[doc(spotlight)]
| ^^^^^^^^^ help: use `notable_trait` instead | ^^^^^^^^^ help: use `notable_trait` instead
| |
= note: `doc(spotlight)` was renamed to `doc(notable_trait)` = note: `doc(spotlight)` was renamed to `doc(notable_trait)`
= note: `doc(spotlight)` is now a no-op = note: `doc(spotlight)` is now a no-op
= note: `#[deny(invalid_doc_attributes)]` on by default note: the lint level is defined here
--> $DIR/doc-spotlight.rs:3:9
|
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 1 previous error error: aborting due to 1 previous error

View file

@ -1,3 +1,4 @@
#![deny(invalid_doc_attributes)]
#![feature(doc_cfg)] #![feature(doc_cfg)]
#![doc(auto_cfg(hide = "test"))] //~ ERROR #![doc(auto_cfg(hide = "test"))] //~ ERROR
#![doc(auto_cfg(hide))] //~ ERROR #![doc(auto_cfg(hide))] //~ ERROR

View file

@ -1,19 +1,23 @@
error: `#![doc(auto_cfg(hide(...)))]` expects a list of items error: `#![doc(auto_cfg(hide(...)))]` expects a list of items
--> $DIR/doc_cfg_hide.rs:2:17 --> $DIR/doc_cfg_hide.rs:3:17
| |
LL | #![doc(auto_cfg(hide = "test"))] LL | #![doc(auto_cfg(hide = "test"))]
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^
| |
= note: `#[deny(invalid_doc_attributes)]` on by default note: the lint level is defined here
--> $DIR/doc_cfg_hide.rs:1:9
|
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
error: `#![doc(auto_cfg(hide(...)))]` expects a list of items error: `#![doc(auto_cfg(hide(...)))]` expects a list of items
--> $DIR/doc_cfg_hide.rs:3:17 --> $DIR/doc_cfg_hide.rs:4:17
| |
LL | #![doc(auto_cfg(hide))] LL | #![doc(auto_cfg(hide))]
| ^^^^ | ^^^^
error: `#![doc(auto_cfg(hide(...)))]` only accepts identifiers or key/value items error: `#![doc(auto_cfg(hide(...)))]` only accepts identifiers or key/value items
--> $DIR/doc_cfg_hide.rs:4:22 --> $DIR/doc_cfg_hide.rs:5:22
| |
LL | #![doc(auto_cfg(hide(not(windows))))] LL | #![doc(auto_cfg(hide(not(windows))))]
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^

View file

@ -0,0 +1,6 @@
#![deny(invalid_doc_attributes)]
#![expect(unused_attributes)]
#![doc(test(no_crate_inject))]
#![doc(test(no_crate_inject))]
//~^ ERROR
//~| WARN

View file

@ -0,0 +1,20 @@
error: unused attribute
--> $DIR/duplicated-attr.rs:4:13
|
LL | #![doc(test(no_crate_inject))]
| ^^^^^^^^^^^^^^^ help: remove this attribute
|
note: attribute also specified here
--> $DIR/duplicated-attr.rs:3:13
|
LL | #![doc(test(no_crate_inject))]
| ^^^^^^^^^^^^^^^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
note: the lint level is defined here
--> $DIR/duplicated-attr.rs:1:9
|
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 1 previous error

View file

@ -1,3 +1,4 @@
#![deny(invalid_doc_attributes)]
#![crate_type = "lib"] #![crate_type = "lib"]
#[doc(test(no_crate_inject))] #[doc(test(no_crate_inject))]

View file

@ -1,14 +1,18 @@
error: this attribute can only be applied at the crate level error: this attribute can only be applied at the crate level
--> $DIR/invalid-crate-level-lint.rs:3:12 --> $DIR/invalid-crate-level-lint.rs:4:12
| |
LL | #[doc(test(no_crate_inject))] LL | #[doc(test(no_crate_inject))]
| ^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^
| |
= note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information = note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
= note: `#[deny(invalid_doc_attributes)]` on by default note: the lint level is defined here
--> $DIR/invalid-crate-level-lint.rs:1:9
|
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
error: this attribute can only be applied at the crate level error: this attribute can only be applied at the crate level
--> $DIR/invalid-crate-level-lint.rs:7:17 --> $DIR/invalid-crate-level-lint.rs:8:17
| |
LL | #![doc(test(no_crate_inject))] LL | #![doc(test(no_crate_inject))]
| ^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^
@ -16,7 +20,7 @@ LL | #![doc(test(no_crate_inject))]
= note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information = note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
error: this attribute can only be applied at the crate level error: this attribute can only be applied at the crate level
--> $DIR/invalid-crate-level-lint.rs:10:16 --> $DIR/invalid-crate-level-lint.rs:11:16
| |
LL | #[doc(test(no_crate_inject))] LL | #[doc(test(no_crate_inject))]
| ^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^

View file

@ -0,0 +1,7 @@
#![deny(invalid_doc_attributes)]
#![doc("other attribute")]
//~^ ERROR
//~| WARN
#![doc]
//~^ ERROR

View file

@ -0,0 +1,21 @@
error: expected this to be of the form `... = "..."`
--> $DIR/invalid-doc-attr-2.rs:3:8
|
LL | #![doc("other attribute")]
| ^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
note: the lint level is defined here
--> $DIR/invalid-doc-attr-2.rs:1:9
|
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
error: valid forms for the attribute are `#![doc = "string"]`, `#![doc(alias)]`, `#![doc(attribute)]`, `#![doc(auto_cfg)]`, `#![doc(cfg)]`, `#![doc(fake_variadic)]`, `#![doc(hidden)]`, `#![doc(html_favicon_url)]`, `#![doc(html_logo_url)]`, `#![doc(html_no_source)]`, `#![doc(html_playground_url)]`, `#![doc(html_root_url)]`, `#![doc(include)]`, `#![doc(inline)]`, `#![doc(issue_tracker_base_url)]`, `#![doc(keyword)]`, `#![doc(masked)]`, `#![doc(no_default_passes)]`, `#![doc(no_inline)]`, `#![doc(notable_trait)]`, `#![doc(passes)]`, `#![doc(plugins)]`, `#![doc(rust_logo)]`, `#![doc(search_unbox)]`, `#![doc(spotlight)]`, and `#![doc(test)]`
--> $DIR/invalid-doc-attr-2.rs:6:1
|
LL | #![doc]
| ^^^^^^^
error: aborting due to 2 previous errors

View file

@ -0,0 +1,22 @@
#![deny(invalid_doc_attributes)]
#![doc(test(no_crate_inject = 1))]
//~^ ERROR
//~| WARN
#![doc(test(attr = 1))]
//~^ ERROR
//~| WARN
#[doc(hidden = true)]
//~^ ERROR
//~| WARN
#[doc(hidden("or you will be fired"))]
//~^ ERROR
//~| WARN
#[doc(hidden = "handled transparently by codegen")]
//~^ ERROR
//~| WARN
#[doc = 1]
//~^ ERROR
//~| WARN
pub struct X;

View file

@ -0,0 +1,55 @@
error: didn't expect any arguments here
--> $DIR/invalid-doc-attr-3.rs:10:14
|
LL | #[doc(hidden = true)]
| ^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
note: the lint level is defined here
--> $DIR/invalid-doc-attr-3.rs:1:9
|
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
error: didn't expect any arguments here
--> $DIR/invalid-doc-attr-3.rs:13:13
|
LL | #[doc(hidden("or you will be fired"))]
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error: didn't expect any arguments here
--> $DIR/invalid-doc-attr-3.rs:16:14
|
LL | #[doc(hidden = "handled transparently by codegen")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error: malformed `doc` attribute input
--> $DIR/invalid-doc-attr-3.rs:19:9
|
LL | #[doc = 1]
| ^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error: didn't expect any arguments here
--> $DIR/invalid-doc-attr-3.rs:3:29
|
LL | #![doc(test(no_crate_inject = 1))]
| ^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error: malformed `doc` attribute input
--> $DIR/invalid-doc-attr-3.rs:6:1
|
LL | #![doc(test(attr = 1))]
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error: aborting due to 6 previous errors

View file

@ -1,3 +1,4 @@
#![deny(invalid_doc_attributes)]
#![crate_type = "lib"] #![crate_type = "lib"]
#![feature(doc_masked)] #![feature(doc_masked)]

View file

@ -1,5 +1,5 @@
error: this attribute can only be applied to a `use` item error: this attribute can only be applied to a `use` item
--> $DIR/invalid-doc-attr.rs:7:7 --> $DIR/invalid-doc-attr.rs:8:7
| |
LL | #[doc(inline)] LL | #[doc(inline)]
| ^^^^^^ only applicable on `use` items | ^^^^^^ only applicable on `use` items
@ -8,10 +8,14 @@ LL | pub fn foo() {}
| ------------ not a `use` item | ------------ not a `use` item
| |
= note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#inline-and-no_inline> for more information = note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#inline-and-no_inline> for more information
= note: `#[deny(invalid_doc_attributes)]` on by default note: the lint level is defined here
--> $DIR/invalid-doc-attr.rs:1:9
|
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
error: conflicting doc inlining attributes error: conflicting doc inlining attributes
--> $DIR/invalid-doc-attr.rs:17:7 --> $DIR/invalid-doc-attr.rs:18:7
| |
LL | #[doc(inline)] LL | #[doc(inline)]
| ^^^^^^ this attribute... | ^^^^^^ this attribute...
@ -21,7 +25,7 @@ LL | #[doc(no_inline)]
= help: remove one of the conflicting attributes = help: remove one of the conflicting attributes
error: this attribute can only be applied to an `extern crate` item error: this attribute can only be applied to an `extern crate` item
--> $DIR/invalid-doc-attr.rs:23:7 --> $DIR/invalid-doc-attr.rs:24:7
| |
LL | #[doc(masked)] LL | #[doc(masked)]
| ^^^^^^ only applicable on `extern crate` items | ^^^^^^ only applicable on `extern crate` items
@ -32,7 +36,7 @@ LL | pub struct Masked;
= note: read <https://doc.rust-lang.org/unstable-book/language-features/doc-masked.html> for more information = note: read <https://doc.rust-lang.org/unstable-book/language-features/doc-masked.html> for more information
error: this attribute cannot be applied to an `extern crate self` item error: this attribute cannot be applied to an `extern crate self` item
--> $DIR/invalid-doc-attr.rs:27:7 --> $DIR/invalid-doc-attr.rs:28:7
| |
LL | #[doc(masked)] LL | #[doc(masked)]
| ^^^^^^ not applicable on `extern crate self` items | ^^^^^^ not applicable on `extern crate self` items
@ -41,9 +45,10 @@ LL | pub extern crate self as reexport;
| --------------------------------- `extern crate self` defined here | --------------------------------- `extern crate self` defined here
error: this attribute can only be applied to an `extern crate` item error: this attribute can only be applied to an `extern crate` item
--> $DIR/invalid-doc-attr.rs:4:8 --> $DIR/invalid-doc-attr.rs:5:8
| |
LL | / #![crate_type = "lib"] LL | / #![deny(invalid_doc_attributes)]
LL | | #![crate_type = "lib"]
LL | | #![feature(doc_masked)] LL | | #![feature(doc_masked)]
LL | | LL | |
LL | | #![doc(masked)] LL | | #![doc(masked)]
@ -55,7 +60,7 @@ LL | | pub extern crate self as reexport;
= note: read <https://doc.rust-lang.org/unstable-book/language-features/doc-masked.html> for more information = note: read <https://doc.rust-lang.org/unstable-book/language-features/doc-masked.html> for more information
error: this attribute can only be applied to a `use` item error: this attribute can only be applied to a `use` item
--> $DIR/invalid-doc-attr.rs:12:11 --> $DIR/invalid-doc-attr.rs:13:11
| |
LL | #[doc(inline)] LL | #[doc(inline)]
| ^^^^^^ only applicable on `use` items | ^^^^^^ only applicable on `use` items

View file

@ -1,3 +1,4 @@
#![deny(invalid_doc_attributes)]
#![crate_type = "lib"] #![crate_type = "lib"]
#![doc(as_ptr)] #![doc(as_ptr)]
//~^ ERROR unknown `doc` attribute //~^ ERROR unknown `doc` attribute
@ -7,10 +8,13 @@
pub fn foo() {} pub fn foo() {}
#[doc(123)] #[doc(123)]
//~^ ERROR malformed `doc` attribute //~^ ERROR
//~| WARN
#[doc("hello", "bar")] #[doc("hello", "bar")]
//~^ ERROR malformed `doc` attribute //~^ ERROR
//~| ERROR malformed `doc` attribute //~| ERROR
//~| WARN
//~| WARN
#[doc(foo::bar, crate::bar::baz = "bye")] #[doc(foo::bar, crate::bar::baz = "bye")]
//~^ ERROR unknown `doc` attribute //~^ ERROR unknown `doc` attribute
//~| ERROR unknown `doc` attribute //~| ERROR unknown `doc` attribute

View file

@ -1,53 +1,56 @@
error[E0539]: malformed `doc` attribute input
--> $DIR/doc-attr.rs:9:1
|
LL | #[doc(123)]
| ^^^^^^---^^
| |
| expected this to be of the form `... = "..."`
error[E0539]: malformed `doc` attribute input
--> $DIR/doc-attr.rs:11:1
|
LL | #[doc("hello", "bar")]
| ^^^^^^-------^^^^^^^^^
| |
| expected this to be of the form `... = "..."`
error[E0539]: malformed `doc` attribute input
--> $DIR/doc-attr.rs:11:1
|
LL | #[doc("hello", "bar")]
| ^^^^^^^^^^^^^^^-----^^
| |
| expected this to be of the form `... = "..."`
error: unknown `doc` attribute `as_ptr` error: unknown `doc` attribute `as_ptr`
--> $DIR/doc-attr.rs:5:7 --> $DIR/doc-attr.rs:6:7
| |
LL | #[doc(as_ptr)] LL | #[doc(as_ptr)]
| ^^^^^^ | ^^^^^^
| |
= note: `#[deny(invalid_doc_attributes)]` on by default note: the lint level is defined here
--> $DIR/doc-attr.rs:1:9
|
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
error: expected this to be of the form `... = "..."`
--> $DIR/doc-attr.rs:10:7
|
LL | #[doc(123)]
| ^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error: expected this to be of the form `... = "..."`
--> $DIR/doc-attr.rs:13:7
|
LL | #[doc("hello", "bar")]
| ^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error: expected this to be of the form `... = "..."`
--> $DIR/doc-attr.rs:13:16
|
LL | #[doc("hello", "bar")]
| ^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
error: unknown `doc` attribute `foo::bar` error: unknown `doc` attribute `foo::bar`
--> $DIR/doc-attr.rs:14:7 --> $DIR/doc-attr.rs:18:7
| |
LL | #[doc(foo::bar, crate::bar::baz = "bye")] LL | #[doc(foo::bar, crate::bar::baz = "bye")]
| ^^^^^^^^ | ^^^^^^^^
error: unknown `doc` attribute `crate::bar::baz` error: unknown `doc` attribute `crate::bar::baz`
--> $DIR/doc-attr.rs:14:17 --> $DIR/doc-attr.rs:18:17
| |
LL | #[doc(foo::bar, crate::bar::baz = "bye")] LL | #[doc(foo::bar, crate::bar::baz = "bye")]
| ^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^
error: unknown `doc` attribute `as_ptr` error: unknown `doc` attribute `as_ptr`
--> $DIR/doc-attr.rs:2:8 --> $DIR/doc-attr.rs:3:8
| |
LL | #![doc(as_ptr)] LL | #![doc(as_ptr)]
| ^^^^^^ | ^^^^^^
error: aborting due to 7 previous errors error: aborting due to 7 previous errors
For more information about this error, try `rustc --explain E0539`.

View file

@ -1,4 +1,7 @@
#![deny(invalid_doc_attributes)]
#![doc(test(""))] #![doc(test(""))]
//~^ ERROR malformed `doc` attribute input //~^ ERROR
//~| WARN
fn main() {} fn main() {}

View file

@ -1,11 +1,15 @@
error[E0565]: malformed `doc` attribute input error: malformed `doc` attribute input
--> $DIR/doc-test-literal.rs:1:1 --> $DIR/doc-test-literal.rs:3:13
| |
LL | #![doc(test(""))] LL | #![doc(test(""))]
| ^^^^^^^^^^^^--^^^ | ^^
| | |
| didn't expect a literal here = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
note: the lint level is defined here
--> $DIR/doc-test-literal.rs:1:9
|
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 1 previous error error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0565`.

View file

@ -1,5 +1,6 @@
// This file contains a bunch of malformed attributes. // This file contains a bunch of malformed attributes.
// We enable a bunch of features to not get feature-gate errs in this test. // We enable a bunch of features to not get feature-gate errs in this test.
#![deny(invalid_doc_attributes)]
#![feature(rustc_attrs)] #![feature(rustc_attrs)]
#![feature(rustc_allow_const_fn_unstable)] #![feature(rustc_allow_const_fn_unstable)]
#![feature(allow_internal_unstable)] #![feature(allow_internal_unstable)]
@ -39,8 +40,7 @@
#[deprecated = 5] #[deprecated = 5]
//~^ ERROR malformed //~^ ERROR malformed
#[doc] #[doc]
//~^ ERROR valid forms for the attribute are //~^ ERROR
//~| WARN this was previously accepted by the compiler
#[rustc_macro_transparency] #[rustc_macro_transparency]
//~^ ERROR malformed //~^ ERROR malformed
//~| ERROR attribute cannot be used on //~| ERROR attribute cannot be used on
@ -75,8 +75,7 @@
//~^ ERROR malformed //~^ ERROR malformed
//~| WARN crate-level attribute should be an inner attribute //~| WARN crate-level attribute should be an inner attribute
#[doc] #[doc]
//~^ ERROR valid forms for the attribute are //~^ ERROR
//~| WARN this was previously accepted by the compiler
#[target_feature] #[target_feature]
//~^ ERROR malformed //~^ ERROR malformed
#[export_stable = 1] #[export_stable = 1]

View file

@ -1,5 +1,5 @@
error[E0539]: malformed `cfg` attribute input error[E0539]: malformed `cfg` attribute input
--> $DIR/malformed-attrs.rs:108:1 --> $DIR/malformed-attrs.rs:107:1
| |
LL | #[cfg] LL | #[cfg]
| ^^^^^^ | ^^^^^^
@ -10,7 +10,7 @@ LL | #[cfg]
= note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute> = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg-attribute>
error[E0539]: malformed `cfg_attr` attribute input error[E0539]: malformed `cfg_attr` attribute input
--> $DIR/malformed-attrs.rs:110:1 --> $DIR/malformed-attrs.rs:109:1
| |
LL | #[cfg_attr] LL | #[cfg_attr]
| ^^^^^^^^^^^ | ^^^^^^^^^^^
@ -21,19 +21,19 @@ LL | #[cfg_attr]
= note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute> = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute>
error[E0463]: can't find crate for `wloop` error[E0463]: can't find crate for `wloop`
--> $DIR/malformed-attrs.rs:218:1 --> $DIR/malformed-attrs.rs:217:1
| |
LL | extern crate wloop; LL | extern crate wloop;
| ^^^^^^^^^^^^^^^^^^^ can't find crate | ^^^^^^^^^^^^^^^^^^^ can't find crate
error: malformed `patchable_function_entry` attribute input error: malformed `patchable_function_entry` attribute input
--> $DIR/malformed-attrs.rs:114:1 --> $DIR/malformed-attrs.rs:113:1
| |
LL | #[patchable_function_entry] LL | #[patchable_function_entry]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[patchable_function_entry(prefix_nops = m, entry_nops = n)]` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[patchable_function_entry(prefix_nops = m, entry_nops = n)]`
error: malformed `allow` attribute input error: malformed `allow` attribute input
--> $DIR/malformed-attrs.rs:184:1 --> $DIR/malformed-attrs.rs:183:1
| |
LL | #[allow] LL | #[allow]
| ^^^^^^^^ | ^^^^^^^^
@ -49,7 +49,7 @@ LL | #[allow(lint1, lint2, lint3, reason = "...")]
| +++++++++++++++++++++++++++++++++++++ | +++++++++++++++++++++++++++++++++++++
error: malformed `expect` attribute input error: malformed `expect` attribute input
--> $DIR/malformed-attrs.rs:186:1 --> $DIR/malformed-attrs.rs:185:1
| |
LL | #[expect] LL | #[expect]
| ^^^^^^^^^ | ^^^^^^^^^
@ -65,7 +65,7 @@ LL | #[expect(lint1, lint2, lint3, reason = "...")]
| +++++++++++++++++++++++++++++++++++++ | +++++++++++++++++++++++++++++++++++++
error: malformed `warn` attribute input error: malformed `warn` attribute input
--> $DIR/malformed-attrs.rs:188:1 --> $DIR/malformed-attrs.rs:187:1
| |
LL | #[warn] LL | #[warn]
| ^^^^^^^ | ^^^^^^^
@ -81,7 +81,7 @@ LL | #[warn(lint1, lint2, lint3, reason = "...")]
| +++++++++++++++++++++++++++++++++++++ | +++++++++++++++++++++++++++++++++++++
error: malformed `deny` attribute input error: malformed `deny` attribute input
--> $DIR/malformed-attrs.rs:190:1 --> $DIR/malformed-attrs.rs:189:1
| |
LL | #[deny] LL | #[deny]
| ^^^^^^^ | ^^^^^^^
@ -97,7 +97,7 @@ LL | #[deny(lint1, lint2, lint3, reason = "...")]
| +++++++++++++++++++++++++++++++++++++ | +++++++++++++++++++++++++++++++++++++
error: malformed `forbid` attribute input error: malformed `forbid` attribute input
--> $DIR/malformed-attrs.rs:192:1 --> $DIR/malformed-attrs.rs:191:1
| |
LL | #[forbid] LL | #[forbid]
| ^^^^^^^^^ | ^^^^^^^^^
@ -113,25 +113,25 @@ LL | #[forbid(lint1, lint2, lint3, reason = "...")]
| +++++++++++++++++++++++++++++++++++++ | +++++++++++++++++++++++++++++++++++++
error: the `#[proc_macro]` attribute is only usable with crates of the `proc-macro` crate type error: the `#[proc_macro]` attribute is only usable with crates of the `proc-macro` crate type
--> $DIR/malformed-attrs.rs:105:1 --> $DIR/malformed-attrs.rs:104:1
| |
LL | #[proc_macro = 18] LL | #[proc_macro = 18]
| ^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^
error: the `#[proc_macro_attribute]` attribute is only usable with crates of the `proc-macro` crate type error: the `#[proc_macro_attribute]` attribute is only usable with crates of the `proc-macro` crate type
--> $DIR/malformed-attrs.rs:122:1 --> $DIR/malformed-attrs.rs:121:1
| |
LL | #[proc_macro_attribute = 19] LL | #[proc_macro_attribute = 19]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type error: the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type
--> $DIR/malformed-attrs.rs:129:1 --> $DIR/malformed-attrs.rs:128:1
| |
LL | #[proc_macro_derive] LL | #[proc_macro_derive]
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^
error[E0658]: allow_internal_unsafe side-steps the unsafe_code lint error[E0658]: allow_internal_unsafe side-steps the unsafe_code lint
--> $DIR/malformed-attrs.rs:223:1 --> $DIR/malformed-attrs.rs:222:1
| |
LL | #[allow_internal_unsafe = 1] LL | #[allow_internal_unsafe = 1]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -140,7 +140,7 @@ LL | #[allow_internal_unsafe = 1]
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0539]: malformed `windows_subsystem` attribute input error[E0539]: malformed `windows_subsystem` attribute input
--> $DIR/malformed-attrs.rs:26:1 --> $DIR/malformed-attrs.rs:27:1
| |
LL | #![windows_subsystem] LL | #![windows_subsystem]
| ^^^-----------------^ | ^^^-----------------^
@ -156,25 +156,25 @@ LL | #![windows_subsystem = "windows"]
| +++++++++++ | +++++++++++
error[E0539]: malformed `export_name` attribute input error[E0539]: malformed `export_name` attribute input
--> $DIR/malformed-attrs.rs:29:1 --> $DIR/malformed-attrs.rs:30:1
| |
LL | #[unsafe(export_name)] LL | #[unsafe(export_name)]
| ^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[export_name = "name"]` | ^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[export_name = "name"]`
error: `rustc_allow_const_fn_unstable` expects a list of feature names error: `rustc_allow_const_fn_unstable` expects a list of feature names
--> $DIR/malformed-attrs.rs:31:1 --> $DIR/malformed-attrs.rs:32:1
| |
LL | #[rustc_allow_const_fn_unstable] LL | #[rustc_allow_const_fn_unstable]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `allow_internal_unstable` expects a list of feature names error: `allow_internal_unstable` expects a list of feature names
--> $DIR/malformed-attrs.rs:34:1 --> $DIR/malformed-attrs.rs:35:1
| |
LL | #[allow_internal_unstable] LL | #[allow_internal_unstable]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0539]: malformed `rustc_confusables` attribute input error[E0539]: malformed `rustc_confusables` attribute input
--> $DIR/malformed-attrs.rs:36:1 --> $DIR/malformed-attrs.rs:37:1
| |
LL | #[rustc_confusables] LL | #[rustc_confusables]
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^
@ -183,7 +183,7 @@ LL | #[rustc_confusables]
| help: must be of the form: `#[rustc_confusables("name1", "name2", ...)]` | help: must be of the form: `#[rustc_confusables("name1", "name2", ...)]`
error: `#[rustc_confusables]` attribute cannot be used on functions error: `#[rustc_confusables]` attribute cannot be used on functions
--> $DIR/malformed-attrs.rs:36:1 --> $DIR/malformed-attrs.rs:37:1
| |
LL | #[rustc_confusables] LL | #[rustc_confusables]
| ^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^
@ -191,7 +191,7 @@ LL | #[rustc_confusables]
= help: `#[rustc_confusables]` can only be applied to inherent methods = help: `#[rustc_confusables]` can only be applied to inherent methods
error[E0539]: malformed `deprecated` attribute input error[E0539]: malformed `deprecated` attribute input
--> $DIR/malformed-attrs.rs:39:1 --> $DIR/malformed-attrs.rs:40:1
| |
LL | #[deprecated = 5] LL | #[deprecated = 5]
| ^^^^^^^^^^^^^^^-^ | ^^^^^^^^^^^^^^^-^
@ -355,7 +355,7 @@ LL | #[crate_name]
| ^^^^^^^^^^^^^ help: must be of the form: `#[crate_name = "name"]` | ^^^^^^^^^^^^^ help: must be of the form: `#[crate_name = "name"]`
error[E0539]: malformed `target_feature` attribute input error[E0539]: malformed `target_feature` attribute input
--> $DIR/malformed-attrs.rs:80:1 --> $DIR/malformed-attrs.rs:79:1
| |
LL | #[target_feature] LL | #[target_feature]
| ^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^
@ -364,7 +364,7 @@ LL | #[target_feature]
| help: must be of the form: `#[target_feature(enable = "feat1, feat2")]` | help: must be of the form: `#[target_feature(enable = "feat1, feat2")]`
error[E0565]: malformed `export_stable` attribute input error[E0565]: malformed `export_stable` attribute input
--> $DIR/malformed-attrs.rs:82:1 --> $DIR/malformed-attrs.rs:81:1
| |
LL | #[export_stable = 1] LL | #[export_stable = 1]
| ^^^^^^^^^^^^^^^^---^ | ^^^^^^^^^^^^^^^^---^
@ -373,7 +373,7 @@ LL | #[export_stable = 1]
| help: must be of the form: `#[export_stable]` | help: must be of the form: `#[export_stable]`
error[E0539]: malformed `link` attribute input error[E0539]: malformed `link` attribute input
--> $DIR/malformed-attrs.rs:84:1 --> $DIR/malformed-attrs.rs:83:1
| |
LL | #[link] LL | #[link]
| ^^^^^^^ expected this to be a list | ^^^^^^^ expected this to be a list
@ -381,7 +381,7 @@ LL | #[link]
= note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link-attribute> = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link-attribute>
error[E0539]: malformed `link_name` attribute input error[E0539]: malformed `link_name` attribute input
--> $DIR/malformed-attrs.rs:88:1 --> $DIR/malformed-attrs.rs:87:1
| |
LL | #[link_name] LL | #[link_name]
| ^^^^^^^^^^^^ help: must be of the form: `#[link_name = "name"]` | ^^^^^^^^^^^^ help: must be of the form: `#[link_name = "name"]`
@ -389,7 +389,7 @@ LL | #[link_name]
= note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link_name-attribute> = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link_name-attribute>
error[E0539]: malformed `link_section` attribute input error[E0539]: malformed `link_section` attribute input
--> $DIR/malformed-attrs.rs:92:1 --> $DIR/malformed-attrs.rs:91:1
| |
LL | #[link_section] LL | #[link_section]
| ^^^^^^^^^^^^^^^ help: must be of the form: `#[link_section = "name"]` | ^^^^^^^^^^^^^^^ help: must be of the form: `#[link_section = "name"]`
@ -397,7 +397,7 @@ LL | #[link_section]
= note: for more information, visit <https://doc.rust-lang.org/reference/abi.html#the-link_section-attribute> = note: for more information, visit <https://doc.rust-lang.org/reference/abi.html#the-link_section-attribute>
error[E0539]: malformed `coverage` attribute input error[E0539]: malformed `coverage` attribute input
--> $DIR/malformed-attrs.rs:94:1 --> $DIR/malformed-attrs.rs:93:1
| |
LL | #[coverage] LL | #[coverage]
| ^^^^^^^^^^^ this attribute is only valid with either `on` or `off` as an argument | ^^^^^^^^^^^ this attribute is only valid with either `on` or `off` as an argument
@ -410,13 +410,13 @@ LL | #[coverage(on)]
| ++++ | ++++
error[E0539]: malformed `sanitize` attribute input error[E0539]: malformed `sanitize` attribute input
--> $DIR/malformed-attrs.rs:96:1 --> $DIR/malformed-attrs.rs:95:1
| |
LL | #[sanitize] LL | #[sanitize]
| ^^^^^^^^^^^ expected this to be a list | ^^^^^^^^^^^ expected this to be a list
error[E0565]: malformed `no_implicit_prelude` attribute input error[E0565]: malformed `no_implicit_prelude` attribute input
--> $DIR/malformed-attrs.rs:101:1 --> $DIR/malformed-attrs.rs:100:1
| |
LL | #[no_implicit_prelude = 23] LL | #[no_implicit_prelude = 23]
| ^^^^^^^^^^^^^^^^^^^^^^----^ | ^^^^^^^^^^^^^^^^^^^^^^----^
@ -425,7 +425,7 @@ LL | #[no_implicit_prelude = 23]
| help: must be of the form: `#[no_implicit_prelude]` | help: must be of the form: `#[no_implicit_prelude]`
error[E0565]: malformed `proc_macro` attribute input error[E0565]: malformed `proc_macro` attribute input
--> $DIR/malformed-attrs.rs:105:1 --> $DIR/malformed-attrs.rs:104:1
| |
LL | #[proc_macro = 18] LL | #[proc_macro = 18]
| ^^^^^^^^^^^^^----^ | ^^^^^^^^^^^^^----^
@ -434,7 +434,7 @@ LL | #[proc_macro = 18]
| help: must be of the form: `#[proc_macro]` | help: must be of the form: `#[proc_macro]`
error[E0539]: malformed `instruction_set` attribute input error[E0539]: malformed `instruction_set` attribute input
--> $DIR/malformed-attrs.rs:112:1 --> $DIR/malformed-attrs.rs:111:1
| |
LL | #[instruction_set] LL | #[instruction_set]
| ^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^
@ -445,7 +445,7 @@ LL | #[instruction_set]
= note: for more information, visit <https://doc.rust-lang.org/reference/attributes/codegen.html#the-instruction_set-attribute> = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/codegen.html#the-instruction_set-attribute>
error[E0565]: malformed `coroutine` attribute input error[E0565]: malformed `coroutine` attribute input
--> $DIR/malformed-attrs.rs:117:5 --> $DIR/malformed-attrs.rs:116:5
| |
LL | #[coroutine = 63] || {} LL | #[coroutine = 63] || {}
| ^^^^^^^^^^^^----^ | ^^^^^^^^^^^^----^
@ -454,7 +454,7 @@ LL | #[coroutine = 63] || {}
| help: must be of the form: `#[coroutine]` | help: must be of the form: `#[coroutine]`
error[E0565]: malformed `proc_macro_attribute` attribute input error[E0565]: malformed `proc_macro_attribute` attribute input
--> $DIR/malformed-attrs.rs:122:1 --> $DIR/malformed-attrs.rs:121:1
| |
LL | #[proc_macro_attribute = 19] LL | #[proc_macro_attribute = 19]
| ^^^^^^^^^^^^^^^^^^^^^^^----^ | ^^^^^^^^^^^^^^^^^^^^^^^----^
@ -463,7 +463,7 @@ LL | #[proc_macro_attribute = 19]
| help: must be of the form: `#[proc_macro_attribute]` | help: must be of the form: `#[proc_macro_attribute]`
error[E0539]: malformed `must_use` attribute input error[E0539]: malformed `must_use` attribute input
--> $DIR/malformed-attrs.rs:125:1 --> $DIR/malformed-attrs.rs:124:1
| |
LL | #[must_use = 1] LL | #[must_use = 1]
| ^^^^^^^^^^^^^-^ | ^^^^^^^^^^^^^-^
@ -481,7 +481,7 @@ LL + #[must_use]
| |
error[E0539]: malformed `proc_macro_derive` attribute input error[E0539]: malformed `proc_macro_derive` attribute input
--> $DIR/malformed-attrs.rs:129:1 --> $DIR/malformed-attrs.rs:128:1
| |
LL | #[proc_macro_derive] LL | #[proc_macro_derive]
| ^^^^^^^^^^^^^^^^^^^^ expected this to be a list | ^^^^^^^^^^^^^^^^^^^^ expected this to be a list
@ -495,7 +495,7 @@ LL | #[proc_macro_derive(TraitName, attributes(name1, name2, ...))]
| ++++++++++++++++++++++++++++++++++++++++++ | ++++++++++++++++++++++++++++++++++++++++++
error[E0539]: malformed `rustc_layout_scalar_valid_range_start` attribute input error[E0539]: malformed `rustc_layout_scalar_valid_range_start` attribute input
--> $DIR/malformed-attrs.rs:134:1 --> $DIR/malformed-attrs.rs:133:1
| |
LL | #[rustc_layout_scalar_valid_range_start] LL | #[rustc_layout_scalar_valid_range_start]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -504,7 +504,7 @@ LL | #[rustc_layout_scalar_valid_range_start]
| help: must be of the form: `#[rustc_layout_scalar_valid_range_start(start)]` | help: must be of the form: `#[rustc_layout_scalar_valid_range_start(start)]`
error[E0539]: malformed `rustc_layout_scalar_valid_range_end` attribute input error[E0539]: malformed `rustc_layout_scalar_valid_range_end` attribute input
--> $DIR/malformed-attrs.rs:136:1 --> $DIR/malformed-attrs.rs:135:1
| |
LL | #[rustc_layout_scalar_valid_range_end] LL | #[rustc_layout_scalar_valid_range_end]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -513,7 +513,7 @@ LL | #[rustc_layout_scalar_valid_range_end]
| help: must be of the form: `#[rustc_layout_scalar_valid_range_end(end)]` | help: must be of the form: `#[rustc_layout_scalar_valid_range_end(end)]`
error[E0539]: malformed `must_not_suspend` attribute input error[E0539]: malformed `must_not_suspend` attribute input
--> $DIR/malformed-attrs.rs:138:1 --> $DIR/malformed-attrs.rs:137:1
| |
LL | #[must_not_suspend()] LL | #[must_not_suspend()]
| ^^^^^^^^^^^^^^^^^^--^ | ^^^^^^^^^^^^^^^^^^--^
@ -529,7 +529,7 @@ LL + #[must_not_suspend]
| |
error[E0539]: malformed `cfi_encoding` attribute input error[E0539]: malformed `cfi_encoding` attribute input
--> $DIR/malformed-attrs.rs:140:1 --> $DIR/malformed-attrs.rs:139:1
| |
LL | #[cfi_encoding = ""] LL | #[cfi_encoding = ""]
| ^^^^^^^^^^^^^^^^^--^ | ^^^^^^^^^^^^^^^^^--^
@ -538,7 +538,7 @@ LL | #[cfi_encoding = ""]
| help: must be of the form: `#[cfi_encoding = "encoding"]` | help: must be of the form: `#[cfi_encoding = "encoding"]`
error[E0565]: malformed `marker` attribute input error[E0565]: malformed `marker` attribute input
--> $DIR/malformed-attrs.rs:161:1 --> $DIR/malformed-attrs.rs:160:1
| |
LL | #[marker = 3] LL | #[marker = 3]
| ^^^^^^^^^---^ | ^^^^^^^^^---^
@ -547,7 +547,7 @@ LL | #[marker = 3]
| help: must be of the form: `#[marker]` | help: must be of the form: `#[marker]`
error[E0565]: malformed `fundamental` attribute input error[E0565]: malformed `fundamental` attribute input
--> $DIR/malformed-attrs.rs:163:1 --> $DIR/malformed-attrs.rs:162:1
| |
LL | #[fundamental()] LL | #[fundamental()]
| ^^^^^^^^^^^^^--^ | ^^^^^^^^^^^^^--^
@ -556,7 +556,7 @@ LL | #[fundamental()]
| help: must be of the form: `#[fundamental]` | help: must be of the form: `#[fundamental]`
error[E0565]: malformed `ffi_pure` attribute input error[E0565]: malformed `ffi_pure` attribute input
--> $DIR/malformed-attrs.rs:171:5 --> $DIR/malformed-attrs.rs:170:5
| |
LL | #[unsafe(ffi_pure = 1)] LL | #[unsafe(ffi_pure = 1)]
| ^^^^^^^^^^^^^^^^^^---^^ | ^^^^^^^^^^^^^^^^^^---^^
@ -565,7 +565,7 @@ LL | #[unsafe(ffi_pure = 1)]
| help: must be of the form: `#[ffi_pure]` | help: must be of the form: `#[ffi_pure]`
error[E0539]: malformed `link_ordinal` attribute input error[E0539]: malformed `link_ordinal` attribute input
--> $DIR/malformed-attrs.rs:173:5 --> $DIR/malformed-attrs.rs:172:5
| |
LL | #[link_ordinal] LL | #[link_ordinal]
| ^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^
@ -576,7 +576,7 @@ LL | #[link_ordinal]
= note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link_ordinal-attribute> = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link_ordinal-attribute>
error[E0565]: malformed `ffi_const` attribute input error[E0565]: malformed `ffi_const` attribute input
--> $DIR/malformed-attrs.rs:177:5 --> $DIR/malformed-attrs.rs:176:5
| |
LL | #[unsafe(ffi_const = 1)] LL | #[unsafe(ffi_const = 1)]
| ^^^^^^^^^^^^^^^^^^^---^^ | ^^^^^^^^^^^^^^^^^^^---^^
@ -585,13 +585,13 @@ LL | #[unsafe(ffi_const = 1)]
| help: must be of the form: `#[ffi_const]` | help: must be of the form: `#[ffi_const]`
error[E0539]: malformed `linkage` attribute input error[E0539]: malformed `linkage` attribute input
--> $DIR/malformed-attrs.rs:179:5 --> $DIR/malformed-attrs.rs:178:5
| |
LL | #[linkage] LL | #[linkage]
| ^^^^^^^^^^ expected this to be of the form `linkage = "..."` | ^^^^^^^^^^ expected this to be of the form `linkage = "..."`
error[E0539]: malformed `debugger_visualizer` attribute input error[E0539]: malformed `debugger_visualizer` attribute input
--> $DIR/malformed-attrs.rs:194:1 --> $DIR/malformed-attrs.rs:193:1
| |
LL | #[debugger_visualizer] LL | #[debugger_visualizer]
| ^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^
@ -602,7 +602,7 @@ LL | #[debugger_visualizer]
= note: for more information, visit <https://doc.rust-lang.org/reference/attributes/debugger.html#the-debugger_visualizer-attribute> = note: for more information, visit <https://doc.rust-lang.org/reference/attributes/debugger.html#the-debugger_visualizer-attribute>
error[E0565]: malformed `automatically_derived` attribute input error[E0565]: malformed `automatically_derived` attribute input
--> $DIR/malformed-attrs.rs:196:1 --> $DIR/malformed-attrs.rs:195:1
| |
LL | #[automatically_derived = 18] LL | #[automatically_derived = 18]
| ^^^^^^^^^^^^^^^^^^^^^^^^----^ | ^^^^^^^^^^^^^^^^^^^^^^^^----^
@ -611,7 +611,7 @@ LL | #[automatically_derived = 18]
| help: must be of the form: `#[automatically_derived]` | help: must be of the form: `#[automatically_derived]`
error[E0565]: malformed `non_exhaustive` attribute input error[E0565]: malformed `non_exhaustive` attribute input
--> $DIR/malformed-attrs.rs:204:1 --> $DIR/malformed-attrs.rs:203:1
| |
LL | #[non_exhaustive = 1] LL | #[non_exhaustive = 1]
| ^^^^^^^^^^^^^^^^^---^ | ^^^^^^^^^^^^^^^^^---^
@ -620,7 +620,7 @@ LL | #[non_exhaustive = 1]
| help: must be of the form: `#[non_exhaustive]` | help: must be of the form: `#[non_exhaustive]`
error[E0565]: malformed `thread_local` attribute input error[E0565]: malformed `thread_local` attribute input
--> $DIR/malformed-attrs.rs:210:1 --> $DIR/malformed-attrs.rs:209:1
| |
LL | #[thread_local()] LL | #[thread_local()]
| ^^^^^^^^^^^^^^--^ | ^^^^^^^^^^^^^^--^
@ -629,7 +629,7 @@ LL | #[thread_local()]
| help: must be of the form: `#[thread_local]` | help: must be of the form: `#[thread_local]`
error[E0565]: malformed `no_link` attribute input error[E0565]: malformed `no_link` attribute input
--> $DIR/malformed-attrs.rs:214:1 --> $DIR/malformed-attrs.rs:213:1
| |
LL | #[no_link()] LL | #[no_link()]
| ^^^^^^^^^--^ | ^^^^^^^^^--^
@ -638,7 +638,7 @@ LL | #[no_link()]
| help: must be of the form: `#[no_link]` | help: must be of the form: `#[no_link]`
error[E0539]: malformed `macro_use` attribute input error[E0539]: malformed `macro_use` attribute input
--> $DIR/malformed-attrs.rs:216:1 --> $DIR/malformed-attrs.rs:215:1
| |
LL | #[macro_use = 1] LL | #[macro_use = 1]
| ^^^^^^^^^^^^---^ | ^^^^^^^^^^^^---^
@ -656,7 +656,7 @@ LL + #[macro_use]
| |
error[E0539]: malformed `macro_export` attribute input error[E0539]: malformed `macro_export` attribute input
--> $DIR/malformed-attrs.rs:221:1 --> $DIR/malformed-attrs.rs:220:1
| |
LL | #[macro_export = 18] LL | #[macro_export = 18]
| ^^^^^^^^^^^^^^^----^ | ^^^^^^^^^^^^^^^----^
@ -673,7 +673,7 @@ LL + #[macro_export]
| |
error[E0565]: malformed `allow_internal_unsafe` attribute input error[E0565]: malformed `allow_internal_unsafe` attribute input
--> $DIR/malformed-attrs.rs:223:1 --> $DIR/malformed-attrs.rs:222:1
| |
LL | #[allow_internal_unsafe = 1] LL | #[allow_internal_unsafe = 1]
| ^^^^^^^^^^^^^^^^^^^^^^^^---^ | ^^^^^^^^^^^^^^^^^^^^^^^^---^
@ -682,7 +682,7 @@ LL | #[allow_internal_unsafe = 1]
| help: must be of the form: `#[allow_internal_unsafe]` | help: must be of the form: `#[allow_internal_unsafe]`
error[E0565]: malformed `type_const` attribute input error[E0565]: malformed `type_const` attribute input
--> $DIR/malformed-attrs.rs:149:5 --> $DIR/malformed-attrs.rs:148:5
| |
LL | #[type_const = 1] LL | #[type_const = 1]
| ^^^^^^^^^^^^^---^ | ^^^^^^^^^^^^^---^
@ -691,7 +691,7 @@ LL | #[type_const = 1]
| help: must be of the form: `#[type_const]` | help: must be of the form: `#[type_const]`
error: attribute should be applied to `const fn` error: attribute should be applied to `const fn`
--> $DIR/malformed-attrs.rs:31:1 --> $DIR/malformed-attrs.rs:32:1
| |
LL | #[rustc_allow_const_fn_unstable] LL | #[rustc_allow_const_fn_unstable]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -703,7 +703,7 @@ LL | | }
| |_- not a `const fn` | |_- not a `const fn`
warning: attribute should be applied to an `extern` block with non-Rust ABI warning: attribute should be applied to an `extern` block with non-Rust ABI
--> $DIR/malformed-attrs.rs:84:1 --> $DIR/malformed-attrs.rs:83:1
| |
LL | #[link] LL | #[link]
| ^^^^^^^ | ^^^^^^^
@ -730,7 +730,7 @@ LL | #[repr]
| ^^^^^^^ | ^^^^^^^
warning: missing options for `on_unimplemented` attribute warning: missing options for `on_unimplemented` attribute
--> $DIR/malformed-attrs.rs:144:1 --> $DIR/malformed-attrs.rs:143:1
| |
LL | #[diagnostic::on_unimplemented] LL | #[diagnostic::on_unimplemented]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -739,7 +739,7 @@ LL | #[diagnostic::on_unimplemented]
= note: `#[warn(malformed_diagnostic_attributes)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default = note: `#[warn(malformed_diagnostic_attributes)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default
warning: malformed `on_unimplemented` attribute warning: malformed `on_unimplemented` attribute
--> $DIR/malformed-attrs.rs:146:1 --> $DIR/malformed-attrs.rs:145:1
| |
LL | #[diagnostic::on_unimplemented = 1] LL | #[diagnostic::on_unimplemented = 1]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here
@ -747,14 +747,16 @@ LL | #[diagnostic::on_unimplemented = 1]
= help: only `message`, `note` and `label` are allowed as options = help: only `message`, `note` and `label` are allowed as options
error: valid forms for the attribute are `#[doc = "string"]`, `#[doc(alias)]`, `#[doc(attribute)]`, `#[doc(auto_cfg)]`, `#[doc(cfg)]`, `#[doc(fake_variadic)]`, `#[doc(hidden)]`, `#[doc(html_favicon_url)]`, `#[doc(html_logo_url)]`, `#[doc(html_no_source)]`, `#[doc(html_playground_url)]`, `#[doc(html_root_url)]`, `#[doc(include)]`, `#[doc(inline)]`, `#[doc(issue_tracker_base_url)]`, `#[doc(keyword)]`, `#[doc(masked)]`, `#[doc(no_default_passes)]`, `#[doc(no_inline)]`, `#[doc(notable_trait)]`, `#[doc(passes)]`, `#[doc(plugins)]`, `#[doc(rust_logo)]`, `#[doc(search_unbox)]`, `#[doc(spotlight)]`, and `#[doc(test)]` error: valid forms for the attribute are `#[doc = "string"]`, `#[doc(alias)]`, `#[doc(attribute)]`, `#[doc(auto_cfg)]`, `#[doc(cfg)]`, `#[doc(fake_variadic)]`, `#[doc(hidden)]`, `#[doc(html_favicon_url)]`, `#[doc(html_logo_url)]`, `#[doc(html_no_source)]`, `#[doc(html_playground_url)]`, `#[doc(html_root_url)]`, `#[doc(include)]`, `#[doc(inline)]`, `#[doc(issue_tracker_base_url)]`, `#[doc(keyword)]`, `#[doc(masked)]`, `#[doc(no_default_passes)]`, `#[doc(no_inline)]`, `#[doc(notable_trait)]`, `#[doc(passes)]`, `#[doc(plugins)]`, `#[doc(rust_logo)]`, `#[doc(search_unbox)]`, `#[doc(spotlight)]`, and `#[doc(test)]`
--> $DIR/malformed-attrs.rs:41:1 --> $DIR/malformed-attrs.rs:42:1
| |
LL | #[doc] LL | #[doc]
| ^^^^^^ | ^^^^^^
| |
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! note: the lint level is defined here
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571> --> $DIR/malformed-attrs.rs:3:9
= note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default |
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]` error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]`
--> $DIR/malformed-attrs.rs:52:1 --> $DIR/malformed-attrs.rs:52:1
@ -764,6 +766,7 @@ LL | #[inline = 5]
| |
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571> = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
= note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default
warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_name]` warning: crate-level attribute should be an inner attribute: add an exclamation mark: `#![crate_name]`
--> $DIR/malformed-attrs.rs:74:1 --> $DIR/malformed-attrs.rs:74:1
@ -772,7 +775,7 @@ LL | #[crate_name]
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^
| |
note: This attribute does not have an `!`, which means it is applied to this function note: This attribute does not have an `!`, which means it is applied to this function
--> $DIR/malformed-attrs.rs:116:1 --> $DIR/malformed-attrs.rs:115:1
| |
LL | / fn test() { LL | / fn test() {
LL | | #[coroutine = 63] || {} LL | | #[coroutine = 63] || {}
@ -785,12 +788,9 @@ error: valid forms for the attribute are `#[doc = "string"]`, `#[doc(alias)]`, `
| |
LL | #[doc] LL | #[doc]
| ^^^^^^ | ^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
warning: `#[link_name]` attribute cannot be used on functions warning: `#[link_name]` attribute cannot be used on functions
--> $DIR/malformed-attrs.rs:88:1 --> $DIR/malformed-attrs.rs:87:1
| |
LL | #[link_name] LL | #[link_name]
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
@ -799,7 +799,7 @@ LL | #[link_name]
= help: `#[link_name]` can be applied to foreign functions and foreign statics = help: `#[link_name]` can be applied to foreign functions and foreign statics
error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]` error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
--> $DIR/malformed-attrs.rs:98:1 --> $DIR/malformed-attrs.rs:97:1
| |
LL | #[ignore()] LL | #[ignore()]
| ^^^^^^^^^^^ | ^^^^^^^^^^^
@ -808,7 +808,7 @@ LL | #[ignore()]
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571> = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
warning: `#[no_implicit_prelude]` attribute cannot be used on functions warning: `#[no_implicit_prelude]` attribute cannot be used on functions
--> $DIR/malformed-attrs.rs:101:1 --> $DIR/malformed-attrs.rs:100:1
| |
LL | #[no_implicit_prelude = 23] LL | #[no_implicit_prelude = 23]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -817,13 +817,13 @@ LL | #[no_implicit_prelude = 23]
= help: `#[no_implicit_prelude]` can be applied to crates and modules = help: `#[no_implicit_prelude]` can be applied to crates and modules
warning: `#[diagnostic::do_not_recommend]` does not expect any arguments warning: `#[diagnostic::do_not_recommend]` does not expect any arguments
--> $DIR/malformed-attrs.rs:155:1 --> $DIR/malformed-attrs.rs:154:1
| |
LL | #[diagnostic::do_not_recommend()] LL | #[diagnostic::do_not_recommend()]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: `#[automatically_derived]` attribute cannot be used on modules warning: `#[automatically_derived]` attribute cannot be used on modules
--> $DIR/malformed-attrs.rs:196:1 --> $DIR/malformed-attrs.rs:195:1
| |
LL | #[automatically_derived = 18] LL | #[automatically_derived = 18]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -832,7 +832,7 @@ LL | #[automatically_derived = 18]
= help: `#[automatically_derived]` can only be applied to trait impl blocks = help: `#[automatically_derived]` can only be applied to trait impl blocks
error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]` error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
--> $DIR/malformed-attrs.rs:230:1 --> $DIR/malformed-attrs.rs:229:1
| |
LL | #[ignore = 1] LL | #[ignore = 1]
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^
@ -841,7 +841,7 @@ LL | #[ignore = 1]
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571> = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/malformed-attrs.rs:117:23 --> $DIR/malformed-attrs.rs:116:23
| |
LL | fn test() { LL | fn test() {
| - help: a return type might be missing here: `-> _` | - help: a return type might be missing here: `-> _`
@ -849,24 +849,13 @@ LL | #[coroutine = 63] || {}
| ^^^^^ expected `()`, found coroutine | ^^^^^ expected `()`, found coroutine
| |
= note: expected unit type `()` = note: expected unit type `()`
found coroutine `{coroutine@$DIR/malformed-attrs.rs:117:23: 117:25}` found coroutine `{coroutine@$DIR/malformed-attrs.rs:116:23: 116:25}`
error: aborting due to 76 previous errors; 8 warnings emitted error: aborting due to 76 previous errors; 8 warnings emitted
Some errors have detailed explanations: E0308, E0463, E0539, E0565, E0658, E0805. Some errors have detailed explanations: E0308, E0463, E0539, E0565, E0658, E0805.
For more information about an error, try `rustc --explain E0308`. For more information about an error, try `rustc --explain E0308`.
Future incompatibility report: Future breakage diagnostic: Future incompatibility report: Future breakage diagnostic:
error: valid forms for the attribute are `#[doc = "string"]`, `#[doc(alias)]`, `#[doc(attribute)]`, `#[doc(auto_cfg)]`, `#[doc(cfg)]`, `#[doc(fake_variadic)]`, `#[doc(hidden)]`, `#[doc(html_favicon_url)]`, `#[doc(html_logo_url)]`, `#[doc(html_no_source)]`, `#[doc(html_playground_url)]`, `#[doc(html_root_url)]`, `#[doc(include)]`, `#[doc(inline)]`, `#[doc(issue_tracker_base_url)]`, `#[doc(keyword)]`, `#[doc(masked)]`, `#[doc(no_default_passes)]`, `#[doc(no_inline)]`, `#[doc(notable_trait)]`, `#[doc(passes)]`, `#[doc(plugins)]`, `#[doc(rust_logo)]`, `#[doc(search_unbox)]`, `#[doc(spotlight)]`, and `#[doc(test)]`
--> $DIR/malformed-attrs.rs:41:1
|
LL | #[doc]
| ^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
= note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default
Future breakage diagnostic:
error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]` error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]`
--> $DIR/malformed-attrs.rs:52:1 --> $DIR/malformed-attrs.rs:52:1
| |
@ -877,20 +866,9 @@ LL | #[inline = 5]
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571> = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
= note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default
Future breakage diagnostic:
error: valid forms for the attribute are `#[doc = "string"]`, `#[doc(alias)]`, `#[doc(attribute)]`, `#[doc(auto_cfg)]`, `#[doc(cfg)]`, `#[doc(fake_variadic)]`, `#[doc(hidden)]`, `#[doc(html_favicon_url)]`, `#[doc(html_logo_url)]`, `#[doc(html_no_source)]`, `#[doc(html_playground_url)]`, `#[doc(html_root_url)]`, `#[doc(include)]`, `#[doc(inline)]`, `#[doc(issue_tracker_base_url)]`, `#[doc(keyword)]`, `#[doc(masked)]`, `#[doc(no_default_passes)]`, `#[doc(no_inline)]`, `#[doc(notable_trait)]`, `#[doc(passes)]`, `#[doc(plugins)]`, `#[doc(rust_logo)]`, `#[doc(search_unbox)]`, `#[doc(spotlight)]`, and `#[doc(test)]`
--> $DIR/malformed-attrs.rs:77:1
|
LL | #[doc]
| ^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
= note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default
Future breakage diagnostic: Future breakage diagnostic:
error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]` error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
--> $DIR/malformed-attrs.rs:98:1 --> $DIR/malformed-attrs.rs:97:1
| |
LL | #[ignore()] LL | #[ignore()]
| ^^^^^^^^^^^ | ^^^^^^^^^^^
@ -901,7 +879,7 @@ LL | #[ignore()]
Future breakage diagnostic: Future breakage diagnostic:
error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]` error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
--> $DIR/malformed-attrs.rs:230:1 --> $DIR/malformed-attrs.rs:229:1
| |
LL | #[ignore = 1] LL | #[ignore = 1]
| ^^^^^^^^^^^^^ | ^^^^^^^^^^^^^

View file

@ -1,73 +0,0 @@
#![feature(generic_const_items, min_generic_const_args)]
#![expect(incomplete_features)]
// library crates exercise weirder code paths around
// DefIds which were created for const args.
#![crate_type = "lib"]
struct Foo<const N: usize>;
type Adt1<const N: usize> = Foo<N>;
type Adt2<const N: usize> = Foo<{ N }>;
type Adt3<const N: usize> = Foo<const { N }>;
//~^ ERROR: generic parameters may not be used in const operations
type Adt4<const N: usize> = Foo<{ 1 + 1 }>;
//~^ ERROR: complex const arguments must be placed inside of a `const` block
type Adt5<const N: usize> = Foo<const { 1 + 1 }>;
type Arr<const N: usize> = [(); N];
type Arr2<const N: usize> = [(); { N }];
type Arr3<const N: usize> = [(); const { N }];
//~^ ERROR: generic parameters may not be used in const operations
type Arr4<const N: usize> = [(); 1 + 1];
//~^ ERROR: complex const arguments must be placed inside of a `const` block
type Arr5<const N: usize> = [(); const { 1 + 1 }];
fn repeats<const N: usize>() -> [(); N] {
let _1 = [(); N];
let _2 = [(); { N }];
let _3 = [(); const { N }];
//~^ ERROR: generic parameters may not be used in const operations
let _4 = [(); 1 + 1];
//~^ ERROR: complex const arguments must be placed inside of a `const` block
let _5 = [(); const { 1 + 1 }];
let _6: [(); const { N }] = todo!();
//~^ ERROR: generic parameters may not be used in const operations
}
#[type_const]
const ITEM1<const N: usize>: usize = N;
#[type_const]
const ITEM2<const N: usize>: usize = { N };
#[type_const]
const ITEM3<const N: usize>: usize = const { N };
//~^ ERROR: generic parameters may not be used in const operations
#[type_const]
const ITEM4<const N: usize>: usize = { 1 + 1 };
//~^ ERROR: complex const arguments must be placed inside of a `const` block
#[type_const]
const ITEM5<const N: usize>: usize = const { 1 + 1};
trait Trait {
#[type_const]
const ASSOC: usize;
}
fn ace_bounds<
const N: usize,
// We skip the T1 case because it doesn't resolve
// T1: Trait<ASSOC = N>,
T2: Trait<ASSOC = { N }>,
T3: Trait<ASSOC = const { N }>,
//~^ ERROR: generic parameters may not be used in const operations
T4: Trait<ASSOC = { 1 + 1 }>,
//~^ ERROR: complex const arguments must be placed inside of a `const` block
T5: Trait<ASSOC = const { 1 + 1 }>,
>() {}
struct Default1<const N: usize, const M: usize = N>;
struct Default2<const N: usize, const M: usize = { N }>;
struct Default3<const N: usize, const M: usize = const { N }>;
//~^ ERROR: generic parameters may not be used in const operations
struct Default4<const N: usize, const M: usize = { 1 + 1 }>;
//~^ ERROR: complex const arguments must be placed inside of a `const` block
struct Default5<const N: usize, const M: usize = const { 1 + 1}>;

View file

@ -1,80 +0,0 @@
error: complex const arguments must be placed inside of a `const` block
--> $DIR/explicit_anon_consts.rs:13:33
|
LL | type Adt4<const N: usize> = Foo<{ 1 + 1 }>;
| ^^^^^^^^^
error: complex const arguments must be placed inside of a `const` block
--> $DIR/explicit_anon_consts.rs:21:34
|
LL | type Arr4<const N: usize> = [(); 1 + 1];
| ^^^^^
error: complex const arguments must be placed inside of a `const` block
--> $DIR/explicit_anon_consts.rs:30:19
|
LL | let _4 = [(); 1 + 1];
| ^^^^^
error: complex const arguments must be placed inside of a `const` block
--> $DIR/explicit_anon_consts.rs:45:38
|
LL | const ITEM4<const N: usize>: usize = { 1 + 1 };
| ^^^^^^^^^
error: complex const arguments must be placed inside of a `const` block
--> $DIR/explicit_anon_consts.rs:62:23
|
LL | T4: Trait<ASSOC = { 1 + 1 }>,
| ^^^^^^^^^
error: complex const arguments must be placed inside of a `const` block
--> $DIR/explicit_anon_consts.rs:71:50
|
LL | struct Default4<const N: usize, const M: usize = { 1 + 1 }>;
| ^^^^^^^^^
error: generic parameters may not be used in const operations
--> $DIR/explicit_anon_consts.rs:42:46
|
LL | const ITEM3<const N: usize>: usize = const { N };
| ^
error: generic parameters may not be used in const operations
--> $DIR/explicit_anon_consts.rs:60:31
|
LL | T3: Trait<ASSOC = const { N }>,
| ^
error: generic parameters may not be used in const operations
--> $DIR/explicit_anon_consts.rs:69:58
|
LL | struct Default3<const N: usize, const M: usize = const { N }>;
| ^
error: generic parameters may not be used in const operations
--> $DIR/explicit_anon_consts.rs:28:27
|
LL | let _3 = [(); const { N }];
| ^
error: generic parameters may not be used in const operations
--> $DIR/explicit_anon_consts.rs:33:26
|
LL | let _6: [(); const { N }] = todo!();
| ^
error: generic parameters may not be used in const operations
--> $DIR/explicit_anon_consts.rs:11:41
|
LL | type Adt3<const N: usize> = Foo<const { N }>;
| ^
error: generic parameters may not be used in const operations
--> $DIR/explicit_anon_consts.rs:19:42
|
LL | type Arr3<const N: usize> = [(); const { N }];
| ^
error: aborting due to 13 previous errors

View file

@ -1,13 +0,0 @@
#![feature(min_generic_const_args)]
#![expect(incomplete_features)]
struct S<const N: usize>([(); N]);
impl<const N: usize> S<N> {
fn foo() -> [(); const { let _: Self = loop {}; 1 }] {
//~^ ERROR generic `Self`
todo!()
}
}
fn main() {}

View file

@ -1,14 +0,0 @@
error: generic `Self` types are currently not permitted in anonymous constants
--> $DIR/selftyalias-containing-param.rs:7:37
|
LL | fn foo() -> [(); const { let _: Self = loop {}; 1 }] {
| ^^^^
|
note: not a concrete type
--> $DIR/selftyalias-containing-param.rs:6:22
|
LL | impl<const N: usize> S<N> {
| ^^^^
error: aborting due to 1 previous error

View file

@ -1,9 +0,0 @@
#![feature(min_generic_const_args)]
#![expect(incomplete_features)]
trait Tr<const N: usize> {
fn foo() -> [(); const { let _: Self; 1 }];
//~^ ERROR generic parameters
}
fn main() {}

View file

@ -1,8 +0,0 @@
error: generic parameters may not be used in const operations
--> $DIR/selftyparam.rs:5:37
|
LL | fn foo() -> [(); const { let _: Self; 1 }];
| ^^^^
error: aborting due to 1 previous error

View file

@ -1,26 +0,0 @@
//@ check-pass
// This test should compile without an ICE.
#![expect(incomplete_features)]
#![feature(min_generic_const_args)]
pub struct A;
pub trait Array {
#[type_const]
const LEN: usize;
fn arr() -> [u8; Self::LEN];
}
impl Array for A {
#[type_const]
const LEN: usize = 4;
#[allow(unused_braces)]
fn arr() -> [u8; const { Self::LEN }] {
return [0u8; const { Self::LEN }];
}
}
fn main() {
let _ = A::arr();
}

View file

@ -1,3 +1,4 @@
#![deny(invalid_doc_attributes)]
#![feature(external_doc)] //~ ERROR feature has been removed #![feature(external_doc)] //~ ERROR feature has been removed
#![doc(include("README.md"))] //~ ERROR unknown `doc` attribute `include` #![doc(include("README.md"))] //~ ERROR unknown `doc` attribute `include`

View file

@ -1,5 +1,5 @@
error[E0557]: feature has been removed error[E0557]: feature has been removed
--> $DIR/removed-features-note-version-and-pr-issue-141619.rs:1:12 --> $DIR/removed-features-note-version-and-pr-issue-141619.rs:2:12
| |
LL | #![feature(external_doc)] LL | #![feature(external_doc)]
| ^^^^^^^^^^^^ feature has been removed | ^^^^^^^^^^^^ feature has been removed
@ -8,12 +8,16 @@ LL | #![feature(external_doc)]
= note: use #[doc = include_str!("filename")] instead, which handles macro invocations = note: use #[doc = include_str!("filename")] instead, which handles macro invocations
error: unknown `doc` attribute `include` error: unknown `doc` attribute `include`
--> $DIR/removed-features-note-version-and-pr-issue-141619.rs:2:8 --> $DIR/removed-features-note-version-and-pr-issue-141619.rs:3:8
| |
LL | #![doc(include("README.md"))] LL | #![doc(include("README.md"))]
| ^^^^^^^ | ^^^^^^^
| |
= note: `#[deny(invalid_doc_attributes)]` on by default note: the lint level is defined here
--> $DIR/removed-features-note-version-and-pr-issue-141619.rs:1:9
|
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View file

@ -0,0 +1,18 @@
// Regression test for issue #152347.
//@ check-pass
//@ edition: 2018..
use outer::*; // must be before `mod outer`
mod outer {
mod inner {
pub fn f() {}
}
use inner::*;
pub use inner::*;
}
fn main() {
f();
}

View file

@ -0,0 +1,12 @@
// Regression test for issues #152004 and #151124.
#![deny(unused)]
mod m {
pub struct S {}
}
use m::*; //~ ERROR unused import: `m::*`
pub use m::*;
fn main() {}

View file

@ -0,0 +1,15 @@
error: unused import: `m::*`
--> $DIR/overwrite-vis-unused.rs:9:5
|
LL | use m::*;
| ^^^^
|
note: the lint level is defined here
--> $DIR/overwrite-vis-unused.rs:3:9
|
LL | #![deny(unused)]
| ^^^^^^
= note: `#[deny(unused_imports)]` implied by `#[deny(unused)]`
error: aborting due to 1 previous error

View file

@ -0,0 +1,30 @@
//@ compile-flags: -O -Cdebug-assertions=on
//@ build-pass
// A regression test for #151791. Computing the layout of
// `<AsOwned as ArchiveWith<'a>>::Archived` fails as the alias
// is still rigid as the where-bound in scope shadows the impl.
//
// This previously caused an incorrect error during MIR optimizations.
struct ArchivedString;
pub trait ArchiveWith<'a> {
type Archived;
}
struct AsOwned;
impl ArchiveWith<'_> for AsOwned {
type Archived = ArchivedString;
}
fn foo<'a>()
where
AsOwned: ArchiveWith<'a>,
{
let _ = unsafe { &*std::ptr::dangling::<<AsOwned as ArchiveWith<'a>>::Archived>() };
}
fn main() {
foo();
}

View file

@ -1,5 +1,5 @@
//@ run-pass //@ run-pass
#![allow(unused_variables)] #![warn(unused)]
#![deny(non_shorthand_field_patterns)] #![deny(non_shorthand_field_patterns)]
pub struct Value<A> { pub value: A } pub struct Value<A> { pub value: A }
@ -13,5 +13,5 @@ macro_rules! pat {
fn main() { fn main() {
let pat!(value) = Value { value: () }; let pat!(value) = Value { value: () };
//~^ WARN value assigned to `value` is never read //~^ WARN unused variable: `value`
} }

View file

@ -1,11 +1,15 @@
warning: value assigned to `value` is never read warning: unused variable: `value`
--> $DIR/issue-49588-non-shorthand-field-patterns-in-pattern-macro.rs:15:14 --> $DIR/issue-49588-non-shorthand-field-patterns-in-pattern-macro.rs:15:14
| |
LL | let pat!(value) = Value { value: () }; LL | let pat!(value) = Value { value: () };
| ^^^^^ | ^^^^^ help: if this is intentional, prefix it with an underscore: `_value`
| |
= help: maybe it is overwritten before being read? note: the lint level is defined here
= note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default --> $DIR/issue-49588-non-shorthand-field-patterns-in-pattern-macro.rs:2:9
|
LL | #![warn(unused)]
| ^^^^^^
= note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
warning: 1 warning emitted warning: 1 warning emitted

View file

@ -0,0 +1,23 @@
#![feature(proc_macro_quote)]
extern crate proc_macro;
use proc_macro::*;
#[proc_macro_derive(Drop)]
pub fn generate(ts: TokenStream) -> TokenStream {
let mut ts = ts.into_iter();
let _pub = ts.next();
let _struct = ts.next();
let name = ts.next().unwrap();
let TokenTree::Group(fields) = ts.next().unwrap() else { panic!() };
let mut fields = fields.stream().into_iter();
let field = fields.next().unwrap();
quote! {
impl Drop for $name {
fn drop(&mut self) {
let Self { $field } = self;
}
}
}
}

View file

@ -0,0 +1,10 @@
//! The mere presence of a match guard should not deem bound variables "used".
//! Regression test for https://github.com/rust-lang/rust/issues/151983
//@ check-pass
#![warn(unused)]
fn main() {
match Some(42) {
Some(unused) if true => (), //~WARN unused variable: `unused`
_ => (),
}
}

View file

@ -0,0 +1,15 @@
warning: unused variable: `unused`
--> $DIR/match_with_guard.rs:7:14
|
LL | Some(unused) if true => (),
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused`
|
note: the lint level is defined here
--> $DIR/match_with_guard.rs:4:9
|
LL | #![warn(unused)]
| ^^^^^^
= note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
warning: 1 warning emitted

View file

@ -0,0 +1,21 @@
// Unused assignments to an unused variable should trigger only the `unused_variables` lint and not
// also the `unused_assignments` lint. This test covers the situation where the span of the unused
// variable identifier comes from a different scope to the binding pattern - here, from a proc
// macro's input tokenstream (whereas the binding pattern is generated within the proc macro
// itself).
//
// Regression test for https://github.com/rust-lang/rust/issues/151514
//
//@ check-pass
//@ proc-macro: unused_assignment_proc_macro.rs
#![warn(unused)]
extern crate unused_assignment_proc_macro;
use unused_assignment_proc_macro::Drop;
#[derive(Drop)]
pub struct S {
a: (), //~ WARN unused variable: `a`
}
fn main() {}

View file

@ -0,0 +1,15 @@
warning: unused variable: `a`
--> $DIR/unused_assignment.rs:18:5
|
LL | a: (),
| ^ help: try ignoring the field: `a: _`
|
note: the lint level is defined here
--> $DIR/unused_assignment.rs:11:9
|
LL | #![warn(unused)]
| ^^^^^^
= note: `#[warn(unused_variables)]` implied by `#[warn(unused)]`
warning: 1 warning emitted

View file

@ -1,5 +1,6 @@
#![deny(invalid_doc_attributes)]
#[doc] //~ ERROR valid forms for the attribute are #[doc] //~ ERROR valid forms for the attribute are
//~^ WARN this was previously accepted
#[ignore()] //~ ERROR valid forms for the attribute are #[ignore()] //~ ERROR valid forms for the attribute are
//~^ WARN this was previously accepted //~^ WARN this was previously accepted
#[inline = ""] //~ ERROR valid forms for the attribute are #[inline = ""] //~ ERROR valid forms for the attribute are

View file

@ -1,5 +1,5 @@
error[E0539]: malformed `link` attribute input error[E0539]: malformed `link` attribute input
--> $DIR/malformed-regressions.rs:7:1 --> $DIR/malformed-regressions.rs:8:1
| |
LL | #[link] LL | #[link]
| ^^^^^^^ expected this to be a list | ^^^^^^^ expected this to be a list
@ -7,7 +7,7 @@ LL | #[link]
= note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link-attribute> = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link-attribute>
error[E0539]: malformed `link` attribute input error[E0539]: malformed `link` attribute input
--> $DIR/malformed-regressions.rs:10:1 --> $DIR/malformed-regressions.rs:11:1
| |
LL | #[link = ""] LL | #[link = ""]
| ^^^^^^^----^ | ^^^^^^^----^
@ -17,7 +17,7 @@ LL | #[link = ""]
= note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link-attribute> = note: for more information, visit <https://doc.rust-lang.org/reference/items/external-blocks.html#the-link-attribute>
warning: attribute should be applied to an `extern` block with non-Rust ABI warning: attribute should be applied to an `extern` block with non-Rust ABI
--> $DIR/malformed-regressions.rs:7:1 --> $DIR/malformed-regressions.rs:8:1
| |
LL | #[link] LL | #[link]
| ^^^^^^^ | ^^^^^^^
@ -29,26 +29,29 @@ LL | fn main() {}
= note: requested on the command line with `-W unused-attributes` = note: requested on the command line with `-W unused-attributes`
error: valid forms for the attribute are `#[doc = "string"]`, `#[doc(alias)]`, `#[doc(attribute)]`, `#[doc(auto_cfg)]`, `#[doc(cfg)]`, `#[doc(fake_variadic)]`, `#[doc(hidden)]`, `#[doc(html_favicon_url)]`, `#[doc(html_logo_url)]`, `#[doc(html_no_source)]`, `#[doc(html_playground_url)]`, `#[doc(html_root_url)]`, `#[doc(include)]`, `#[doc(inline)]`, `#[doc(issue_tracker_base_url)]`, `#[doc(keyword)]`, `#[doc(masked)]`, `#[doc(no_default_passes)]`, `#[doc(no_inline)]`, `#[doc(notable_trait)]`, `#[doc(passes)]`, `#[doc(plugins)]`, `#[doc(rust_logo)]`, `#[doc(search_unbox)]`, `#[doc(spotlight)]`, and `#[doc(test)]` error: valid forms for the attribute are `#[doc = "string"]`, `#[doc(alias)]`, `#[doc(attribute)]`, `#[doc(auto_cfg)]`, `#[doc(cfg)]`, `#[doc(fake_variadic)]`, `#[doc(hidden)]`, `#[doc(html_favicon_url)]`, `#[doc(html_logo_url)]`, `#[doc(html_no_source)]`, `#[doc(html_playground_url)]`, `#[doc(html_root_url)]`, `#[doc(include)]`, `#[doc(inline)]`, `#[doc(issue_tracker_base_url)]`, `#[doc(keyword)]`, `#[doc(masked)]`, `#[doc(no_default_passes)]`, `#[doc(no_inline)]`, `#[doc(notable_trait)]`, `#[doc(passes)]`, `#[doc(plugins)]`, `#[doc(rust_logo)]`, `#[doc(search_unbox)]`, `#[doc(spotlight)]`, and `#[doc(test)]`
--> $DIR/malformed-regressions.rs:1:1 --> $DIR/malformed-regressions.rs:3:1
| |
LL | #[doc] LL | #[doc]
| ^^^^^^ | ^^^^^^
| |
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! note: the lint level is defined here
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571> --> $DIR/malformed-regressions.rs:1:9
= note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default |
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]` error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
--> $DIR/malformed-regressions.rs:3:1 --> $DIR/malformed-regressions.rs:4:1
| |
LL | #[ignore()] LL | #[ignore()]
| ^^^^^^^^^^^ | ^^^^^^^^^^^
| |
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571> = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
= note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default
error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]` error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]`
--> $DIR/malformed-regressions.rs:5:1 --> $DIR/malformed-regressions.rs:6:1
| |
LL | #[inline = ""] LL | #[inline = ""]
| ^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^
@ -60,19 +63,8 @@ error: aborting due to 5 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0539`. For more information about this error, try `rustc --explain E0539`.
Future incompatibility report: Future breakage diagnostic: Future incompatibility report: Future breakage diagnostic:
error: valid forms for the attribute are `#[doc = "string"]`, `#[doc(alias)]`, `#[doc(attribute)]`, `#[doc(auto_cfg)]`, `#[doc(cfg)]`, `#[doc(fake_variadic)]`, `#[doc(hidden)]`, `#[doc(html_favicon_url)]`, `#[doc(html_logo_url)]`, `#[doc(html_no_source)]`, `#[doc(html_playground_url)]`, `#[doc(html_root_url)]`, `#[doc(include)]`, `#[doc(inline)]`, `#[doc(issue_tracker_base_url)]`, `#[doc(keyword)]`, `#[doc(masked)]`, `#[doc(no_default_passes)]`, `#[doc(no_inline)]`, `#[doc(notable_trait)]`, `#[doc(passes)]`, `#[doc(plugins)]`, `#[doc(rust_logo)]`, `#[doc(search_unbox)]`, `#[doc(spotlight)]`, and `#[doc(test)]`
--> $DIR/malformed-regressions.rs:1:1
|
LL | #[doc]
| ^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
= note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default
Future breakage diagnostic:
error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]` error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]`
--> $DIR/malformed-regressions.rs:3:1 --> $DIR/malformed-regressions.rs:4:1
| |
LL | #[ignore()] LL | #[ignore()]
| ^^^^^^^^^^^ | ^^^^^^^^^^^
@ -83,7 +75,7 @@ LL | #[ignore()]
Future breakage diagnostic: Future breakage diagnostic:
error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]` error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]`
--> $DIR/malformed-regressions.rs:5:1 --> $DIR/malformed-regressions.rs:6:1
| |
LL | #[inline = ""] LL | #[inline = ""]
| ^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^

View file

@ -1,3 +1,5 @@
#![deny(invalid_doc_attributes)]
#[cfg_attr] //~ ERROR malformed `cfg_attr` attribute #[cfg_attr] //~ ERROR malformed `cfg_attr` attribute
struct S1; struct S1;

Some files were not shown because too many files have changed in this diff Show more