1
1
error[E0658]: cannot borrow here, since the borrowed element may contain interior mutability
2
- --> $DIR/const-promoted-opaque.rs:29 :25
2
+ --> $DIR/const-promoted-opaque.rs:28 :25
3
3
|
4
4
LL | let _: &'static _ = &FOO;
5
5
| ^^^^
@@ -9,7 +9,7 @@ LL | let _: &'static _ = &FOO;
9
9
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
10
10
11
11
error[E0493]: destructor of `helper::Foo` cannot be evaluated at compile-time
12
- --> $DIR/const-promoted-opaque.rs:29 :26
12
+ --> $DIR/const-promoted-opaque.rs:28 :26
13
13
|
14
14
LL | let _: &'static _ = &FOO;
15
15
| ^^^ the destructor for this type cannot be evaluated in constants
@@ -18,13 +18,13 @@ LL | };
18
18
| - value is dropped here
19
19
20
20
error[E0492]: constants cannot refer to interior mutable data
21
- --> $DIR/const-promoted-opaque.rs:34 :19
21
+ --> $DIR/const-promoted-opaque.rs:33 :19
22
22
|
23
23
LL | const BAZ: &Foo = &FOO;
24
24
| ^^^^ this borrow of an interior mutable value may end up in the final value
25
25
26
26
error[E0716]: temporary value dropped while borrowed
27
- --> $DIR/const-promoted-opaque.rs:38 :26
27
+ --> $DIR/const-promoted-opaque.rs:37 :26
28
28
|
29
29
LL | let _: &'static _ = &FOO;
30
30
| ---------- ^^^ creates a temporary value which is freed while still in use
34
34
LL | }
35
35
| - temporary value is freed at the end of this statement
36
36
37
- error[E0391]: cycle detected when computing type of opaque `helper::Foo::{opaque#0}`
38
- --> $DIR/const-promoted-opaque.rs:14:20
39
- |
40
- LL | pub type Foo = impl Sized;
41
- | ^^^^^^^^^^
42
- |
43
- note: ...which requires borrow-checking `helper::FOO`...
44
- --> $DIR/const-promoted-opaque.rs:21:5
45
- |
46
- LL | pub const FOO: Foo = std::sync::atomic::AtomicU8::new(42);
47
- | ^^^^^^^^^^^^^^^^^^
48
- note: ...which requires promoting constants in MIR for `helper::FOO`...
49
- --> $DIR/const-promoted-opaque.rs:21:5
50
- |
51
- LL | pub const FOO: Foo = std::sync::atomic::AtomicU8::new(42);
52
- | ^^^^^^^^^^^^^^^^^^
53
- note: ...which requires const checking `helper::FOO`...
54
- --> $DIR/const-promoted-opaque.rs:21:5
55
- |
56
- LL | pub const FOO: Foo = std::sync::atomic::AtomicU8::new(42);
57
- | ^^^^^^^^^^^^^^^^^^
58
- = note: ...which requires computing whether `helper::Foo` is freeze...
59
- = note: ...which requires evaluating trait selection obligation `helper::Foo: core::marker::Freeze`...
60
- = note: ...which again requires computing type of opaque `helper::Foo::{opaque#0}`, completing the cycle
61
- note: cycle used when computing type of `helper::Foo::{opaque#0}`
62
- --> $DIR/const-promoted-opaque.rs:14:20
63
- |
64
- LL | pub type Foo = impl Sized;
65
- | ^^^^^^^^^^
66
- = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
67
-
68
- error: aborting due to 5 previous errors
37
+ error: aborting due to 4 previous errors
69
38
70
- Some errors have detailed explanations: E0391, E0492, E0493, E0658, E0716.
71
- For more information about an error, try `rustc --explain E0391 `.
39
+ Some errors have detailed explanations: E0492, E0493, E0658, E0716.
40
+ For more information about an error, try `rustc --explain E0492 `.
0 commit comments