You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trans.rs:1:33: 1:34 error: region parameters are not allowed on this type
trans.rs:1 unsafe fn transmute_region<T>(x: T/&a) -> T/&b {
^
trans.rs:1:42: 1:43 error: region parameters are not allowed on this type
trans.rs:1 unsafe fn transmute_region<T>(x: T/&a) -> T/&b {
^
Is there some unsafety lurking, is it impossible to implement, or is it just not implemented?
The text was updated successfully, but these errors were encountered:
It would be akin to writing T<S>. Type variables do not themselves take region parameters, only type paths (like, the name of a type def'n or a nominal type) do. Basically you can use the /& notation anywhere you could attach a type parameter. The bounds on type variables should be able to be region-bounded---but that is not fully implemented.
sure - I guess that'd be getting pretty close to higher-kinded polymorphism (or perhaps exactly that). I'm not sure I follow the last thing, though - do you mean region-bounded traits, like T: foo/&a?
refuses to compile with:
Is there some unsafety lurking, is it impossible to implement, or is it just not implemented?
The text was updated successfully, but these errors were encountered: