2018-10-28 18:38:50 +00:00
|
|
|
pub fn f(
|
|
|
|
/// Comment
|
2019-06-09 10:58:40 +00:00
|
|
|
//~^ ERROR documentation comments cannot be applied to function parameters
|
2018-10-28 18:38:50 +00:00
|
|
|
//~| NOTE doc comments are not allowed here
|
|
|
|
id: u8,
|
|
|
|
/// Other
|
2019-06-09 10:58:40 +00:00
|
|
|
//~^ ERROR documentation comments cannot be applied to function parameters
|
2018-10-28 18:38:50 +00:00
|
|
|
//~| NOTE doc comments are not allowed here
|
|
|
|
a: u8,
|
|
|
|
) {}
|
|
|
|
|
|
|
|
fn bar(id: #[allow(dead_code)] i32) {}
|
2019-06-09 10:58:40 +00:00
|
|
|
//~^ ERROR attributes cannot be applied to a function parameter's type
|
2018-10-28 18:38:50 +00:00
|
|
|
//~| NOTE attributes are not allowed here
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
// verify that the parser recovered and properly typechecked the args
|
|
|
|
f("", "");
|
|
|
|
//~^ ERROR mismatched types
|
2019-11-15 07:45:30 +00:00
|
|
|
//~| NOTE expected u8, found &str
|
2018-10-28 18:38:50 +00:00
|
|
|
//~| ERROR mismatched types
|
2019-11-15 07:45:30 +00:00
|
|
|
//~| NOTE expected u8, found &str
|
2018-10-28 18:38:50 +00:00
|
|
|
bar("");
|
|
|
|
//~^ ERROR mismatched types
|
2019-11-15 07:45:30 +00:00
|
|
|
//~| NOTE expected i32, found &str
|
2018-10-28 18:38:50 +00:00
|
|
|
}
|