mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-02 15:56:09 +03:00
Rollup merge of #156578 - eval-exec:mir-opt-build-correct-coerce-filecheck, r=TaKO8Ki
Add FileCheck for build_correct_coerce part of rust-lang/rust#116971
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
//@ skip-filecheck
|
||||
|
||||
// Validate that we record the target for the `as` coercion as `for<'a> fn(&'a (), &'a ())`,
|
||||
// and not `for<'a, 'b>(&'a (), &'b ())`. We previously did the latter due to a bug in
|
||||
// the code that records adjustments in HIR typeck.
|
||||
@@ -8,5 +6,8 @@ fn foo<'a, 'b>(_: &'a (), _: &'b ()) {}
|
||||
|
||||
// EMIT_MIR build_correct_coerce.main.built.after.mir
|
||||
fn main() {
|
||||
// CHECK-LABEL: fn main(
|
||||
// CHECK: let _1: for<'a> fn(&'a (), &'a ());
|
||||
// CHECK: _1 = foo as for<'a> fn(&'a (), &'a ())
|
||||
let x = foo as for<'a> fn(&'a (), &'a ());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user