Speykious/cve-rs

The ultimate safety

turalcar opened this issue · 6 comments

There is a way to make this truly safe (I won't spoil this for you)

fn translate<'a, T>(_: &'static &'a (), x: &'a T) -> &'static T {
    x
}

trait Witness<'a> {
    fn extend<T>(self, x: &'a T) -> &'static T;
}

impl<'a> Witness<'a> for &'static () {
    fn extend<T>(self, x: &'a T) -> &'static T {
        translate(&self, x)
    }
}
impl 'fn static::<'abcdefghijklmnopqrstuvwxyz>{ {{}{ trait for &T!fn&' ( ), ->!'''static TP L{ s>!<p'Witness<for &aa'a'a'b'a'L>{
    x
}

rust as its finest

impl 'fn static::<'abcdefghijklmnopqrstuvwxyz>{ {{}{ trait for &T!fn&' ( ), ->!'''static TP L{ s>!<p'Witness<for &aa'a'a'b'a'L>{
    x
}

rust as its finest

Is that valid syntax?

🚀

impl 'fn static::<'abcdefghijklmnopqrstuvwxyz>{ {{}{ trait for &T!fn&' ( ), ->!'''static TP L{ s>!<p'Witness<for &aa'a'a'b'a'L>{
    x
}

rust as its finest

Is that valid syntax?

if ur srs : no, its satire, highlighting rusts truly 'beautiful' syntax
if not : yes ofc it is

ahh yes my favorite lifetime specifier: abcdefghijklmnopqrstuvwxyz

ahh yes my favorite lifetime specifier: abcdefghijklmnopqrstuvwxyz

yeah it means 'until rust language is good, be alive' ( dead lifetime )