2020-01-26 21:14:11 -06:00
|
|
|
error: a `const` item with interior mutability should not be borrowed
|
2021-04-02 16:35:32 -05:00
|
|
|
--> $DIR/others.rs:58:5
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
|
LL | ATOMIC.store(1, Ordering::SeqCst); //~ ERROR interior mutability
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
2020-09-30 16:34:53 -05:00
|
|
|
= note: `-D clippy::borrow-interior-mutable-const` implied by `-D warnings`
|
2020-01-26 21:14:11 -06:00
|
|
|
= help: assign this const to a local or static variable, and use the variable here
|
|
|
|
|
|
|
|
error: a `const` item with interior mutability should not be borrowed
|
2021-04-02 16:35:32 -05:00
|
|
|
--> $DIR/others.rs:59:16
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
|
LL | assert_eq!(ATOMIC.load(Ordering::SeqCst), 5); //~ ERROR interior mutability
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
= help: assign this const to a local or static variable, and use the variable here
|
|
|
|
|
|
|
|
error: a `const` item with interior mutability should not be borrowed
|
2021-04-02 16:35:32 -05:00
|
|
|
--> $DIR/others.rs:62:22
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
|
LL | let _once_ref = &ONCE_INIT; //~ ERROR interior mutability
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: assign this const to a local or static variable, and use the variable here
|
|
|
|
|
|
|
|
error: a `const` item with interior mutability should not be borrowed
|
2021-04-02 16:35:32 -05:00
|
|
|
--> $DIR/others.rs:63:25
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
|
LL | let _once_ref_2 = &&ONCE_INIT; //~ ERROR interior mutability
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: assign this const to a local or static variable, and use the variable here
|
|
|
|
|
|
|
|
error: a `const` item with interior mutability should not be borrowed
|
2021-04-02 16:35:32 -05:00
|
|
|
--> $DIR/others.rs:64:27
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
|
LL | let _once_ref_4 = &&&&ONCE_INIT; //~ ERROR interior mutability
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: assign this const to a local or static variable, and use the variable here
|
|
|
|
|
|
|
|
error: a `const` item with interior mutability should not be borrowed
|
2021-04-02 16:35:32 -05:00
|
|
|
--> $DIR/others.rs:65:26
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
|
LL | let _once_mut = &mut ONCE_INIT; //~ ERROR interior mutability
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: assign this const to a local or static variable, and use the variable here
|
|
|
|
|
|
|
|
error: a `const` item with interior mutability should not be borrowed
|
2021-04-02 16:35:32 -05:00
|
|
|
--> $DIR/others.rs:76:14
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
|
LL | let _ = &ATOMIC_TUPLE; //~ ERROR interior mutability
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: assign this const to a local or static variable, and use the variable here
|
|
|
|
|
|
|
|
error: a `const` item with interior mutability should not be borrowed
|
2021-04-02 16:35:32 -05:00
|
|
|
--> $DIR/others.rs:77:14
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
|
LL | let _ = &ATOMIC_TUPLE.0; //~ ERROR interior mutability
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: assign this const to a local or static variable, and use the variable here
|
|
|
|
|
|
|
|
error: a `const` item with interior mutability should not be borrowed
|
2021-04-02 16:35:32 -05:00
|
|
|
--> $DIR/others.rs:78:19
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
|
LL | let _ = &(&&&&ATOMIC_TUPLE).0; //~ ERROR interior mutability
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: assign this const to a local or static variable, and use the variable here
|
|
|
|
|
|
|
|
error: a `const` item with interior mutability should not be borrowed
|
2021-04-02 16:35:32 -05:00
|
|
|
--> $DIR/others.rs:79:14
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
|
LL | let _ = &ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: assign this const to a local or static variable, and use the variable here
|
|
|
|
|
|
|
|
error: a `const` item with interior mutability should not be borrowed
|
2021-04-02 16:35:32 -05:00
|
|
|
--> $DIR/others.rs:80:13
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
|
LL | let _ = ATOMIC_TUPLE.0[0].load(Ordering::SeqCst); //~ ERROR interior mutability
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: assign this const to a local or static variable, and use the variable here
|
|
|
|
|
|
|
|
error: a `const` item with interior mutability should not be borrowed
|
2021-04-02 16:35:32 -05:00
|
|
|
--> $DIR/others.rs:86:13
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
|
LL | let _ = ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: assign this const to a local or static variable, and use the variable here
|
|
|
|
|
|
|
|
error: a `const` item with interior mutability should not be borrowed
|
2021-04-02 16:35:32 -05:00
|
|
|
--> $DIR/others.rs:91:5
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
|
LL | CELL.set(2); //~ ERROR interior mutability
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
= help: assign this const to a local or static variable, and use the variable here
|
|
|
|
|
|
|
|
error: a `const` item with interior mutability should not be borrowed
|
2021-04-02 16:35:32 -05:00
|
|
|
--> $DIR/others.rs:92:16
|
2020-01-26 21:14:11 -06:00
|
|
|
|
|
|
|
|
LL | assert_eq!(CELL.get(), 6); //~ ERROR interior mutability
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
= help: assign this const to a local or static variable, and use the variable here
|
|
|
|
|
2020-09-30 16:34:53 -05:00
|
|
|
error: aborting due to 14 previous errors
|
2020-01-26 21:14:11 -06:00
|
|
|
|