Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

ices/65394.rs: fixed with errors #181

Merged
merged 1 commit into from
Oct 20, 2019
Merged

ices/65394.rs: fixed with errors #181

merged 1 commit into from
Oct 20, 2019

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#65394

=== stdout ===
=== stderr ===
error[E0017]: references in constants may only refer to immutable values
 --> /home/runner/work/glacier/glacier/ices/65394.rs:3:13
  |
3 |     let r = &mut x;
  |             ^^^^^^ constants require immutable values

[ERROR rustc_mir::transform::qualify_consts] old validator: [(/home/runner/work/glacier/glacier/ices/65394.rs:3:13: 3:19, "MutBorrow(Mut { allow_two_phase_borrow: false })")]
[ERROR rustc_mir::transform::qualify_consts] new validator: [(/home/runner/work/glacier/glacier/ices/65394.rs:3:13: 3:19, "MutBorrow(Mut { allow_two_phase_borrow: false })"), (/home/runner/work/glacier/glacier/ices/65394.rs:2:9: 2:10, "LiveDrop")]
error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
 --> /home/runner/work/glacier/glacier/ices/65394.rs:3:13
  |
2 |     let x = Vec::<i32>::new();
  |         - help: consider changing this to be mutable: `mut x`
3 |     let r = &mut x;
  |             ^^^^^^ cannot borrow as mutable

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0017, E0596.
For more information about an error, try `rustc --explain E0017`.
==============

=== stdout ===
=== stderr ===
error[E0017]: references in constants may only refer to immutable values
 --> /home/runner/work/glacier/glacier/ices/65394.rs:3:13
  |
3 |     let r = &mut x;
  |             ^^^^^^ constants require immutable values

[ERROR rustc_mir::transform::qualify_consts] old validator: [(/home/runner/work/glacier/glacier/ices/65394.rs:3:13: 3:19, "MutBorrow(Mut { allow_two_phase_borrow: false })")]
[ERROR rustc_mir::transform::qualify_consts] new validator: [(/home/runner/work/glacier/glacier/ices/65394.rs:3:13: 3:19, "MutBorrow(Mut { allow_two_phase_borrow: false })"), (/home/runner/work/glacier/glacier/ices/65394.rs:2:9: 2:10, "LiveDrop")]
error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
 --> /home/runner/work/glacier/glacier/ices/65394.rs:3:13
  |
2 |     let x = Vec::<i32>::new();
  |         - help: consider changing this to be mutable: `mut x`
3 |     let r = &mut x;
  |             ^^^^^^ cannot borrow as mutable

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0017, E0596.
For more information about an error, try `rustc --explain E0017`.
==============
@Alexendoo Alexendoo merged commit 84cb8c6 into master Oct 20, 2019
@Alexendoo Alexendoo deleted the autofix/ices/65394.rs branch October 20, 2019 13:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants