This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(optin_builtin_traits)] | |
use std::marker::PhantomData; | |
struct Nil; | |
struct Cons<H, T>(H, T); | |
struct Pair<A, B>(A, B); | |
trait Lookup_<S, Env> { type Type; } | |
type Lookup<S, Env> = <() as Lookup_<S, Env>>::Type; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(optin_builtin_traits)] | |
use std::marker::PhantomData; | |
struct Nil; | |
struct Cons<H, T>(H, T); | |
struct Zero; | |
struct One; | |
trait UInt { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(optin_builtin_traits)] | |
use std::marker::PhantomData; | |
// Type functions in modern Rust: | |
// The signature of a type function is a trait. | |
// The trait's associated types correspond to the function's range. | |
// Its type parameters excluding the last parameter correspond to the function's | |
// domain. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This trait is not used, but is useful for type equality constraints | |
trait ID { | |
type Out; | |
} | |
impl<T> ID for T { | |
type Out = T; | |
} | |
trait CanApply { | |
type Out: CanUnapply; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This trait is not used, but is useful for type equality constraints | |
trait ID { | |
type Out; | |
} | |
impl<T> ID for T { | |
type Out = T; | |
} | |
trait CanApply { | |
type Out: CanUnapply; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Apply { | |
type Out; | |
} | |
trait Unapply { | |
type Out; | |
} | |
type Applied<F, T> = <(F, T) as Apply>::Out; | |
type Unapplied<T> = <T as Unapply>::Out; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "cef_app_capi.h" | |
#include "cef_auth_callback_capi.h" | |
#include "cef_base_capi.h" | |
#include "cef_browser_capi.h" | |
#include "cef_browser_process_handler_capi.h" | |
#include "cef_callback_capi.h" | |
#include "cef_client_capi.h" | |
#include "cef_command_line_capi.h" | |
#include "cef_context_menu_handler_capi.h" | |
#include "cef_cookie_capi.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(os, core)] | |
extern crate cef; | |
extern crate glium; | |
extern crate glutin; | |
extern crate image; | |
use std::cell::RefCell; | |
use std::default::Default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(os, core)] | |
extern crate cef; | |
extern crate glium; | |
extern crate glutin; | |
extern crate image; | |
use std::cell::RefCell; | |
use std::default::Default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(os, collections, core)] | |
extern crate cef; | |
extern crate glium; | |
extern crate glutin; | |
extern crate image; | |
use std::cell::RefCell; | |
use std::default::Default; |