This file contains hidden or 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
| λ 169-231-106-204 rust → λ git generalize-impl-bounds* → RUST_BACKTRACE=1 RUST_LOG=rustc_typeck::check::compare_method=debug x86_64-apple-darwin/stage1/bin/rustc src/test/compile-fail/regions-bound-missing-bound-in-impl.rs | |
| DEBUG:rustc_typeck::check::compare_method: compare_impl_method(impl_trait_ref=TraitRef('aint, Foo<'a>)) | |
| DEBUG:rustc_typeck::check::compare_method: impl_trait_ref (liberated) = TraitRef('aint, Foo<'a>) | |
| DEBUG:rustc_typeck::check::compare_method: compare_impl_method: trait_to_skol_substs=Substs[types=[[];[&'a int];[]], regions=[[ReFree(109, BrNamed(DefId { krate: 0, node: 179 }, 'a))];[];[ReFree(109, BrNamed(DefId { krate: 0, node: 97 }, 'b))]]] | |
| DEBUG:rustc_typeck::check::compare_method: compare_impl_method: impl_bounds=GenericBounds([[];[];[Binder(OutlivesPredicate(ReFree(109, BrNamed(DefId { krate: 0, node: 97 }, 'b)), ReFree(109, BrNamed(DefId { krate: 0, node: 179 }, 'a))))]]) | |
| DEBUG:rustc_typeck::check::compare_method: compare_impl_method: trait_bounds=GenericBounds([[];[];[]]) | |
| DEBUG:rustc |
This file contains hidden or 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 Foo<T> { | |
| fn meth(&self) where T: Copy {} | |
| } | |
| impl<T> Foo<T> for int { | |
| fn meth(&self) where T: Eq {} | |
| } | |
| fn main() { | |
| Foo::<int>::meth(&1); |
This file contains hidden or 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
| module TypedLogic | |
| import Data.SortedMap | |
| data LType : Type where | |
| FreshType : LType | |
| Atom : String -> LType | |
| DisjUnion : LType -> LType -> LType | |
| Relation : (Vect n LType) -> LType |
This file contains hidden or 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(associated_types)] | |
| trait N { | |
| type Repr; | |
| } | |
| trait SizedVec<A: N> {} | |
| fn main() {} |
This file contains hidden or 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
| class Request where | |
| data R | |
| ... | |
| class Response where | |
| data R | |
| class (Request Req, Response Resp) => Http where | |
| data Req | |
| data Resp |
This file contains hidden or 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
| module Main | |
| listToVect : (n: Nat) -> List a -> Maybe (Vect n a) | |
| listToVect Z Nil = Just Nil | |
| listToVect n Nil = Nothing | |
| listToVect (S n) (x :: xs) = map (x ::) (listToVect n xs) |
This file contains hidden or 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
| import shapeless._ | |
| ... |
This file contains hidden or 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
| config.vm.provider :vmware_fusion do |vm| | |
| vdiskmanager = '/Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager' | |
| dir = "#{ENV['HOME']}/vagrant-additional-disk" | |
| unless File.directory?( dir ) | |
| Dir.mkdir dir | |
| end |
This file contains hidden or 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
| use std::fmt::{Formatter, Show, FormatError}; | |
| trait Nat {} | |
| struct Z; | |
| struct Succ<N> { | |
| pred: Box<N> | |
| } | |
| impl Nat for Z {} |
This file contains hidden or 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
| use std::fmt::{Formatter, Show, FormatError}; | |
| trait HList { | |
| fn cons<H>(self, xs: H) -> HCons<H, Self>; | |
| } | |
| struct HCons<H, T> { | |
| head: H, | |
| tail: Box<T> | |
| } |