about summary refs log tree commit diff
path: root/tests/ui/sanitize-attr/invalid-sanitize.rs
blob: 957ce780ad0fd7017a29e8f1136679eccec91621 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#![feature(sanitize)]

#[sanitize(brontosaurus = "off")] //~ ERROR malformed `sanitize` attribute input
fn main() {}

#[sanitize(address = "off")] //~ ERROR multiple `sanitize` attributes
#[sanitize(address = "off")]
fn multiple_consistent() {}

#[sanitize(address = "on")] //~ ERROR multiple `sanitize` attributes
#[sanitize(address = "off")]
fn multiple_inconsistent() {}

#[sanitize(address = "bogus")] //~ ERROR malformed `sanitize` attribute input
fn wrong_value() {}

#[sanitize = "off"] //~ ERROR malformed `sanitize` attribute input
fn name_value() {}

#[sanitize] //~ ERROR malformed `sanitize` attribute input
fn just_word() {}