mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Port #[patchable_function_entry] to attr parser
This commit is contained in:
@@ -1,17 +1,26 @@
|
||||
#![feature(patchable_function_entry)]
|
||||
fn main() {}
|
||||
|
||||
#[patchable_function_entry(prefix_nops = 256, entry_nops = 0)]//~error: integer value out of range
|
||||
#[patchable_function_entry(prefix_nops = 256, entry_nops = 0)]
|
||||
//~^ ERROR malformed
|
||||
pub fn too_high_pnops() {}
|
||||
|
||||
#[patchable_function_entry(prefix_nops = "stringvalue", entry_nops = 0)]//~error: invalid literal value
|
||||
#[patchable_function_entry(prefix_nops = "stringvalue", entry_nops = 0)]
|
||||
//~^ ERROR malformed
|
||||
pub fn non_int_nop() {}
|
||||
|
||||
#[patchable_function_entry]//~error: malformed `patchable_function_entry` attribute input
|
||||
#[patchable_function_entry]
|
||||
//~^ ERROR malformed `patchable_function_entry` attribute input
|
||||
pub fn malformed_attribute() {}
|
||||
|
||||
#[patchable_function_entry(prefix_nops = 10, something = 0)]//~error: unexpected parameter name
|
||||
#[patchable_function_entry(prefix_nops = 10, something = 0)]
|
||||
//~^ ERROR malformed
|
||||
pub fn unexpected_parameter_name() {}
|
||||
|
||||
#[patchable_function_entry()]//~error: must specify at least one parameter
|
||||
#[patchable_function_entry()]
|
||||
//~^ ERROR malformed
|
||||
pub fn no_parameters_given() {}
|
||||
|
||||
#[patchable_function_entry(prefix_nops = 255, prefix_nops = 255)]
|
||||
//~^ ERROR malformed
|
||||
pub fn duplicate_parameter() {}
|
||||
|
||||
Reference in New Issue
Block a user