This error occurs when #[derive(Arbitrary)]
is used on a type which has any
lifetime parameters. For example:
Given the following type definitions:
struct Foo(usize);
struct Wrapping<T>(T);
struct Product<A, B>(A, B);
trait Trait { type Assoc; }
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
// while P { B_1 } else { B_2 } */ | |
// ==> | |
/* | |
if P { | |
B_1; | |
while P { | |
B_1 | |
} |
- Avoid monotonically increasing tech debt
- In particular, if contextual keywords accumulate over time, their grammatical interactions are going to get continually trickier
- Forward-compatible with introducing contextual keywords on older editions
- Forward-compatible with future uses that can’t be contextual
- In case we decide 1.5 year hence that we want to do something new with the keyword.
- Arguably can give better error messages
- Cleaner
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
//****************************************************************************** | |
// "const_trait_system" | |
//****************************************************************************** | |
/* | |
Dependency DAG of proposal: | |
[A, B] -> [] | |
[C] -> [B] and/or [A] -- NOTE: C is moot without B or A. | |
[D, E] -> [B] |
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
fn main() { | |
use std::mem::{size_of, size_of_val}; | |
let susize = size_of::<usize>(); | |
// usize is size_t. | |
// "hello" is in static memory, x is on the stack and like: (char*, usize). | |
// &'static str is a fat pointer. | |
// It is not null terminated. |
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(core)] | |
#![feature(std_misc)] | |
use std::thread::{Thread, JoinGuard}; | |
fn callback(v: usize) -> usize { v * 2 } | |
struct S { | |
cb: Box<Fn(usize) -> usize + Send>, | |
} |
I hereby claim:
- I am Centril on github.
- I am centril (https://keybase.io/centril) on keybase.
- I have a public key whose fingerprint is 17DC 71EF 7AD7 4032 4B5D 112E 818B 6F39 DE23 A081
To claim this, I am signing this object: