Skip to content

Commit e7bfc56

Browse files
committed
update test expectations
1 parent 39592bc commit e7bfc56

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

tests/ui/consts/const-promoted-opaque.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const BAR: () = {
3030
};
3131

3232
const BAZ: &Foo = &FOO;
33-
//[atomic]~^ ERROR: constants cannot refer to interior mutable data
33+
//[string,atomic]~^ ERROR: constants cannot refer to interior mutable data
3434

3535
fn main() {
3636
let _: &'static _ = &FOO;

tests/ui/consts/const-promoted-opaque.string.stderr

+9-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ LL |
77
LL | };
88
| - value is dropped here
99

10+
error[E0492]: constants cannot refer to interior mutable data
11+
--> $DIR/const-promoted-opaque.rs:32:19
12+
|
13+
LL | const BAZ: &Foo = &FOO;
14+
| ^^^^ this borrow of an interior mutable value may end up in the final value
15+
1016
error[E0716]: temporary value dropped while borrowed
1117
--> $DIR/const-promoted-opaque.rs:36:26
1218
|
@@ -18,7 +24,7 @@ LL |
1824
LL | }
1925
| - temporary value is freed at the end of this statement
2026

21-
error: aborting due to 2 previous errors
27+
error: aborting due to 3 previous errors
2228

23-
Some errors have detailed explanations: E0493, E0716.
24-
For more information about an error, try `rustc --explain E0493`.
29+
Some errors have detailed explanations: E0492, E0493, E0716.
30+
For more information about an error, try `rustc --explain E0492`.

tests/ui/type-alias-impl-trait/reveal_local.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fn not_gooder() -> Foo {
2020
// while we could know this from the hidden type, it would
2121
// need extra roundabout logic to support it.
2222
is_send::<Foo>();
23-
//~^ ERROR: type annotations needed: cannot satisfy `Foo: Send`
23+
//~^ ERROR: cannot check whether the hidden type of `reveal_local[9507]::Foo::{opaque#0}` satisfies auto traits
2424

2525
x
2626
}

tests/ui/type-alias-impl-trait/reveal_local.stderr

+7-3
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,18 @@ note: required by a bound in `is_send`
1616
LL | fn is_send<T: Send>() {}
1717
| ^^^^ required by this bound in `is_send`
1818

19-
error[E0283]: type annotations needed: cannot satisfy `Foo: Send`
19+
error: cannot check whether the hidden type of `reveal_local[9507]::Foo::{opaque#0}` satisfies auto traits
2020
--> $DIR/reveal_local.rs:22:15
2121
|
2222
LL | is_send::<Foo>();
2323
| ^^^
2424
|
25-
= note: cannot satisfy `Foo: Send`
25+
= note: fetching the hidden types of an opaque inside of the defining scope is not supported. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
26+
note: opaque type is declared here
27+
--> $DIR/reveal_local.rs:5:12
28+
|
29+
LL | type Foo = impl Debug;
30+
| ^^^^^^^^^^
2631
note: required by a bound in `is_send`
2732
--> $DIR/reveal_local.rs:7:15
2833
|
@@ -31,4 +36,3 @@ LL | fn is_send<T: Send>() {}
3136

3237
error: aborting due to 2 previous errors
3338

34-
For more information about this error, try `rustc --explain E0283`.

0 commit comments

Comments
 (0)