]> git.lizzy.rs Git - rust.git/blob - src/test/ui/allocator/allocator-args.rs
Make some diagnostics not depend on the source of what they reference being available
[rust.git] / src / test / ui / allocator / allocator-args.rs
1 use std::alloc::{GlobalAlloc, Layout};
2
3 struct A;
4
5 unsafe impl GlobalAlloc for A {
6     unsafe fn alloc(&self, _: Layout) -> *mut u8 { panic!() }
7     unsafe fn dealloc(&self, _: *mut u8, _: Layout) { panic!() }
8 }
9
10 #[global_allocator(malloc)] //~ ERROR malformed `global_allocator` attribute input
11 static S: A = A;
12
13 fn main() {}