2018-10-28 11:38:50 -07:00
|
|
|
pub fn f(
|
|
|
|
|
/// Comment
|
2019-06-09 07:58:40 -03:00
|
|
|
//~^ ERROR documentation comments cannot be applied to function parameters
|
2018-10-28 11:38:50 -07:00
|
|
|
//~| NOTE doc comments are not allowed here
|
|
|
|
|
id: u8,
|
|
|
|
|
/// Other
|
2019-06-09 07:58:40 -03:00
|
|
|
//~^ ERROR documentation comments cannot be applied to function parameters
|
2018-10-28 11:38:50 -07:00
|
|
|
//~| NOTE doc comments are not allowed here
|
|
|
|
|
a: u8,
|
|
|
|
|
) {}
|
|
|
|
|
|
|
|
|
|
fn bar(id: #[allow(dead_code)] i32) {}
|
2019-06-09 07:58:40 -03:00
|
|
|
//~^ ERROR attributes cannot be applied to a function parameter's type
|
2018-10-28 11:38:50 -07: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 09:37:01 -08:00
|
|
|
//~| NOTE expected `u8`, found `&str`
|
2018-10-28 11:38:50 -07:00
|
|
|
//~| ERROR mismatched types
|
2019-11-15 09:37:01 -08:00
|
|
|
//~| NOTE expected `u8`, found `&str`
|
2018-10-28 11:38:50 -07:00
|
|
|
bar("");
|
|
|
|
|
//~^ ERROR mismatched types
|
2019-11-15 09:37:01 -08:00
|
|
|
//~| NOTE expected `i32`, found `&str`
|
2018-10-28 11:38:50 -07:00
|
|
|
}
|