Skip to content

Commit 046c28f

Browse files
committed
Fix invalid compiletest directives in tests
- Fix invalid directive in `normalize-hidden-types` - Update legacy directive in `two-phase-reservation-sharing-interference`
1 parent 2dd05e8 commit 046c28f

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

tests/ui/borrowck/two-phase-reservation-sharing-interference.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// The nll_beyond revision is disabled due to missing support from two-phase beyond autorefs
44
//@[nll_beyond]compile-flags: -Z two-phase-beyond-autoref
5-
//[nll_beyond]should-fail
5+
//@[nll_beyond]should-fail
66

77
// This is a corner case that the current implementation is (probably)
88
// treating more conservatively than is necessary. But it also does

tests/ui/type-alias-impl-trait/normalize-hidden-types.current.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@ LL | fn define() -> Opaque {
55
| ^^^^^^ expected `*const (dyn FnOnce(()) + 'static)`, got `*const dyn for<'a> FnOnce(<u8 as Trait>::Gat<'a>)`
66
|
77
note: previous use here
8-
--> $DIR/normalize-hidden-types.rs:27:9
8+
--> $DIR/normalize-hidden-types.rs:26:9
99
|
1010
LL | dyn_hoops::<_>(0)
1111
| ^^^^^^^^^^^^^^^^^
1212

1313
error: concrete type differs from previous defining opaque type use
14-
--> $DIR/normalize-hidden-types.rs:34:22
14+
--> $DIR/normalize-hidden-types.rs:33:22
1515
|
1616
LL | fn define_1() -> Opaque { dyn_hoops::<_>(0) }
1717
| ^^^^^^ expected `*const (dyn FnOnce(()) + 'static)`, got `*const dyn for<'a> FnOnce(<u8 as Trait>::Gat<'a>)`
1818
|
1919
note: previous use here
20-
--> $DIR/normalize-hidden-types.rs:34:31
20+
--> $DIR/normalize-hidden-types.rs:33:31
2121
|
2222
LL | fn define_1() -> Opaque { dyn_hoops::<_>(0) }
2323
| ^^^^^^^^^^^^^^^^^
2424

2525
error[E0308]: mismatched types
26-
--> $DIR/normalize-hidden-types.rs:44:25
26+
--> $DIR/normalize-hidden-types.rs:42:25
2727
|
2828
LL | type Opaque = impl Sized;
2929
| ---------- the expected opaque type
@@ -39,13 +39,13 @@ LL | let _: Opaque = dyn_hoops::<u8>(0);
3939
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
4040

4141
error: concrete type differs from previous defining opaque type use
42-
--> $DIR/normalize-hidden-types.rs:54:25
42+
--> $DIR/normalize-hidden-types.rs:51:25
4343
|
4444
LL | let _: Opaque = dyn_hoops::<_>(0);
4545
| ^^^^^^^^^^^^^^^^^ expected `*const (dyn FnOnce(()) + 'static)`, got `*const dyn for<'a> FnOnce(<u8 as Trait>::Gat<'a>)`
4646
|
4747
note: previous use here
48-
--> $DIR/normalize-hidden-types.rs:56:9
48+
--> $DIR/normalize-hidden-types.rs:52:9
4949
|
5050
LL | None
5151
| ^^^^

tests/ui/type-alias-impl-trait/normalize-hidden-types.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//@ revisions: current next
44
//@ [next] compile-flags: -Znext-solver
55
//@ [next] check-pass
6-
//@ [current]: known-bug: #112691
6+
//@ [current] known-bug: #112691
77

88
#![feature(type_alias_impl_trait)]
99

@@ -23,7 +23,6 @@ mod typeof_1 {
2323
use super::*;
2424
type Opaque = impl Sized;
2525
fn define() -> Opaque {
26-
//[current]~^ ERROR concrete type differs
2726
dyn_hoops::<_>(0)
2827
}
2928
}
@@ -32,7 +31,6 @@ mod typeof_2 {
3231
use super::*;
3332
type Opaque = impl Sized;
3433
fn define_1() -> Opaque { dyn_hoops::<_>(0) }
35-
//[current]~^ ERROR concrete type differs
3634
fn define_2() -> Opaque { dyn_hoops::<u8>(0) }
3735
}
3836

@@ -42,7 +40,6 @@ mod typeck {
4240
fn define() -> Option<Opaque> {
4341
let _: Opaque = dyn_hoops::<_>(0);
4442
let _: Opaque = dyn_hoops::<u8>(0);
45-
//[current]~^ ERROR mismatched types
4643
None
4744
}
4845
}
@@ -52,7 +49,6 @@ mod borrowck {
5249
type Opaque = impl Sized;
5350
fn define() -> Option<Opaque> {
5451
let _: Opaque = dyn_hoops::<_>(0);
55-
//[current]~^ ERROR concrete type differs
5652
None
5753
}
5854
}

0 commit comments

Comments
 (0)