Content-Length: 24327 | pFad | https://doc.rust-lang.org/std/string/../error/../string/../../std/../../../error_codes/./E0805.html

E0805 - Error codes index

Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Error code E0805

An attribute was given an invalid number of arguments

Erroneous code example:

#![allow(unused)]
fn main() {
#[inline()] // error! should either have a single argument, or no parentheses
fn foo() {}

#[inline(always, never)] // error! should have only one argument, not two
fn bar() {}
}

To fix this, either give the right number of arguments the attribute needs. In the case of inline, this could be none at all:

#![allow(unused)]
fn main() {
#[inline]
fn foo() {}
}

or only one:

#![allow(unused)]
fn main() {
#[inline(always)]
fn foo() {}
}








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://doc.rust-lang.org/std/string/../error/../string/../../std/../../../error_codes/./E0805.html

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy