-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't do intra-pass validation on MIR shims
- Loading branch information
1 parent
ee5cb9e
commit acd3542
Showing
3 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
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
21 changes: 21 additions & 0 deletions
21
tests/ui/type-alias-impl-trait/auxiliary/drop-shim-relates-opaque-aux.rs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// crate foo | ||
|
||
#![feature(type_alias_impl_trait)] | ||
|
||
type Tait = impl Sized; | ||
fn _constrain() -> Tait {} | ||
|
||
struct WrapperWithDrop<T>(T); | ||
impl<T> Drop for WrapperWithDrop<T> { | ||
fn drop(&mut self) {} | ||
} | ||
|
||
pub struct Foo(WrapperWithDrop<Tait>); | ||
|
||
trait Id { | ||
type Id: ?Sized; | ||
} | ||
impl<T: ?Sized> Id for T { | ||
type Id = T; | ||
} | ||
pub struct Bar(WrapperWithDrop<<Tait as Id>::Id>); |
10 changes: 10 additions & 0 deletions
10
tests/ui/type-alias-impl-trait/drop-shim-relates-opaque-issue-114375.rs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// aux-build:drop-shim-relates-opaque-aux.rs | ||
// compile-flags: -Zvalidate-mir --crate-type=lib | ||
// build-pass | ||
|
||
extern crate drop_shim_relates_opaque_aux; | ||
|
||
pub fn drop_foo(_: drop_shim_relates_opaque_aux::Foo) {} | ||
pub fn drop_bar(_: drop_shim_relates_opaque_aux::Bar) {} | ||
|
||
fn main() {} |