Auto merge of #103390 - compiler-errors:metadata-mod-regions, r=eholk
Check fat pointer metadata compatibility modulo regions Regions don't really mean anything anyways during hir typeck. If this `erase_regions` makes anyone nervous, it's probably equally valid to just equate the types using a type relation, but regardless we should _not_ be using strict type equality while region variables are present. Fixes #103384
This commit is contained in:
commit
9cdfe03b06
2 changed files with 24 additions and 6 deletions
17
src/test/ui/cast/cast-pointee-projection.rs
Normal file
17
src/test/ui/cast/cast-pointee-projection.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// check-pass
|
||||
|
||||
trait Tag<'a> {
|
||||
type Type: ?Sized;
|
||||
}
|
||||
|
||||
trait IntoRaw: for<'a> Tag<'a> {
|
||||
fn into_raw(this: *const <Self as Tag<'_>>::Type) -> *mut <Self as Tag<'_>>::Type;
|
||||
}
|
||||
|
||||
impl<T: for<'a> Tag<'a>> IntoRaw for T {
|
||||
fn into_raw(this: *const <Self as Tag<'_>>::Type) -> *mut <Self as Tag<'_>>::Type {
|
||||
this as *mut T::Type
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue