2019-08-31 00:08:23 -05:00
|
|
|
// aux-build:ident-mac.rs
|
|
|
|
|
|
|
|
#![feature(c_variadic)]
|
2021-03-08 17:43:18 -06:00
|
|
|
#![allow(anonymous_parameters)]
|
2019-08-31 00:08:23 -05:00
|
|
|
|
|
|
|
extern crate ident_mac;
|
|
|
|
use ident_mac::id;
|
|
|
|
|
|
|
|
struct W(u8);
|
|
|
|
|
|
|
|
extern "C" { fn ffi(#[id] arg1: i32, #[id] ...); }
|
2020-11-18 16:49:20 -06:00
|
|
|
//~^ ERROR expected non-macro attribute, found attribute macro
|
|
|
|
//~| ERROR expected non-macro attribute, found attribute macro
|
2019-08-31 00:08:23 -05:00
|
|
|
|
|
|
|
unsafe extern "C" fn cvar(arg1: i32, #[id] mut args: ...) {}
|
2020-11-18 16:49:20 -06:00
|
|
|
//~^ ERROR expected non-macro attribute, found attribute macro
|
2019-08-31 00:08:23 -05:00
|
|
|
|
|
|
|
type Alias = extern "C" fn(#[id] u8, #[id] ...);
|
2020-11-18 16:49:20 -06:00
|
|
|
//~^ ERROR expected non-macro attribute, found attribute macro
|
|
|
|
//~| ERROR expected non-macro attribute, found attribute macro
|
2019-08-31 00:08:23 -05:00
|
|
|
|
|
|
|
fn free(#[id] arg1: u8) {
|
2020-11-18 16:49:20 -06:00
|
|
|
//~^ ERROR expected non-macro attribute, found attribute macro
|
2019-09-24 13:05:49 -05:00
|
|
|
let lam = |#[id] W(x), #[id] y: usize| ();
|
2020-11-18 16:49:20 -06:00
|
|
|
//~^ ERROR expected non-macro attribute, found attribute macro
|
|
|
|
//~| ERROR expected non-macro attribute, found attribute macro
|
2019-08-31 00:08:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
impl W {
|
|
|
|
fn inherent1(#[id] self, #[id] arg1: u8) {}
|
2020-11-18 16:49:20 -06:00
|
|
|
//~^ ERROR expected non-macro attribute, found attribute macro
|
|
|
|
//~| ERROR expected non-macro attribute, found attribute macro
|
2019-08-31 00:08:23 -05:00
|
|
|
fn inherent2(#[id] &self, #[id] arg1: u8) {}
|
2020-11-18 16:49:20 -06:00
|
|
|
//~^ ERROR expected non-macro attribute, found attribute macro
|
|
|
|
//~| ERROR expected non-macro attribute, found attribute macro
|
2019-08-31 00:08:23 -05:00
|
|
|
fn inherent3<'a>(#[id] &'a mut self, #[id] arg1: u8) {}
|
2020-11-18 16:49:20 -06:00
|
|
|
//~^ ERROR expected non-macro attribute, found attribute macro
|
|
|
|
//~| ERROR expected non-macro attribute, found attribute macro
|
2019-08-31 00:08:23 -05:00
|
|
|
fn inherent4<'a>(#[id] self: Box<Self>, #[id] arg1: u8) {}
|
2020-11-18 16:49:20 -06:00
|
|
|
//~^ ERROR expected non-macro attribute, found attribute macro
|
|
|
|
//~| ERROR expected non-macro attribute, found attribute macro
|
2019-09-29 02:26:02 -05:00
|
|
|
fn issue_64682_associated_fn<'a>(#[id] arg1: u8, #[id] arg2: u8) {}
|
2020-11-18 16:49:20 -06:00
|
|
|
//~^ ERROR expected non-macro attribute, found attribute macro
|
|
|
|
//~| ERROR expected non-macro attribute, found attribute macro
|
2019-08-31 00:08:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
trait A {
|
|
|
|
fn trait1(#[id] self, #[id] arg1: u8);
|
2020-11-18 16:49:20 -06:00
|
|
|
//~^ ERROR expected non-macro attribute, found attribute macro
|
|
|
|
//~| ERROR expected non-macro attribute, found attribute macro
|
2019-08-31 00:08:23 -05:00
|
|
|
fn trait2(#[id] &self, #[id] arg1: u8);
|
2020-11-18 16:49:20 -06:00
|
|
|
//~^ ERROR expected non-macro attribute, found attribute macro
|
|
|
|
//~| ERROR expected non-macro attribute, found attribute macro
|
2019-08-31 00:08:23 -05:00
|
|
|
fn trait3<'a>(#[id] &'a mut self, #[id] arg1: u8);
|
2020-11-18 16:49:20 -06:00
|
|
|
//~^ ERROR expected non-macro attribute, found attribute macro
|
|
|
|
//~| ERROR expected non-macro attribute, found attribute macro
|
2019-08-31 00:08:23 -05:00
|
|
|
fn trait4<'a>(#[id] self: Box<Self>, #[id] arg1: u8, #[id] Vec<u8>);
|
2020-11-18 16:49:20 -06:00
|
|
|
//~^ ERROR expected non-macro attribute, found attribute macro
|
|
|
|
//~| ERROR expected non-macro attribute, found attribute macro
|
|
|
|
//~| ERROR expected non-macro attribute, found attribute macro
|
2019-09-29 02:26:02 -05:00
|
|
|
fn issue_64682_associated_fn<'a>(#[id] arg1: u8, #[id] arg2: u8);
|
2020-11-18 16:49:20 -06:00
|
|
|
//~^ ERROR expected non-macro attribute, found attribute macro
|
|
|
|
//~| ERROR expected non-macro attribute, found attribute macro
|
2019-08-31 00:08:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|