From 391c4e525ce1aa77204f9da533042fb8158d891a Mon Sep 17 00:00:00 2001 From: Tomaka17 Date: Tue, 12 Aug 2014 09:16:08 +0200 Subject: Now using compile_msg crate instead of static_assert --- Cargo.toml | 3 +++ src/lib.rs | 5 +++-- src/osx/mod.rs | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c1b8346..a17e483 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,5 +4,8 @@ name = "gl-init-rs" version = "0.0.1" authors = ["tomaka "] +[dependencies.compile_msg] +git = "https://github.com/huonw/compile_msg" + [dev-dependencies.gl] git = "https://github.com/bjz/gl-rs" diff --git a/src/lib.rs b/src/lib.rs index aae14e7..fec652a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,6 @@ #![feature(unsafe_destructor)] #![feature(globs)] +#![feature(phase)] #![unstable] //! The purpose of this library is to provide an OpenGL context on as many @@ -17,6 +18,7 @@ //! The second way allows you to customize the way your window and GL context //! will look and behave. +#[phase(plugin)] extern crate compile_msg; extern crate libc; pub use events::*; @@ -41,8 +43,7 @@ mod osx; mod events; #[cfg(not(target_os = "win32"), not(target_os = "linux"), not(target_os = "macos"))] -#[static_assert] -static this_platform_is_not_supposed: bool = false; +compile_error!("Only the `win32`, `linux` and `macos` platforms are supported") /// Identifier for a monitor. pub struct MonitorID(winimpl::MonitorID); diff --git a/src/osx/mod.rs b/src/osx/mod.rs index deceaf8..6960cc1 100644 --- a/src/osx/mod.rs +++ b/src/osx/mod.rs @@ -6,6 +6,8 @@ pub struct Window; pub struct MonitorID; +compile_warning!("The OS/X platform is not implemented yet") + pub fn get_available_monitors() -> Vec { unimplemented!() } -- cgit v1.2.3