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

ices/113279.rs: fixed with errors #1628

Merged
merged 1 commit into from
Oct 10, 2023
Merged

ices/113279.rs: fixed with errors #1628

merged 1 commit into from
Oct 10, 2023

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#113279

#![feature(generators)]

fn foo() {
    let _y = static || {
        let x = &mut 0;
        *{
            yield;
            x
        } += match { *"" }.len() {
            _ => 0,
        };
    };
}

fn main() {
    foo()
}
=== stdout ===
=== stderr ===
error[E0161]: cannot move a value of type `str`
 --> /home/runner/work/glacier/glacier/ices/113279.rs:9:20
  |
9 |         } += match { *"" }.len() {
  |                    ^^^^^^^ the size of `str` cannot be statically determined

error[E0507]: cannot move out of a shared reference
 --> /home/runner/work/glacier/glacier/ices/113279.rs:9:22
  |
9 |         } += match { *"" }.len() {
  |                      ^^^ move occurs because value has type `str`, which does not implement the `Copy` trait

error: aborting due to 2 previous errors

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

=== stdout ===
=== stderr ===
error[E0161]: cannot move a value of type `str`
 --> /home/runner/work/glacier/glacier/ices/113279.rs:9:20
  |
9 |         } += match { *"" }.len() {
  |                    ^^^^^^^ the size of `str` cannot be statically determined

error[E0507]: cannot move out of a shared reference
 --> /home/runner/work/glacier/glacier/ices/113279.rs:9:22
  |
9 |         } += match { *"" }.len() {
  |                      ^^^ move occurs because value has type `str`, which does not implement the `Copy` trait

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0161, E0507.
For more information about an error, try `rustc --explain E0161`.
==============
@JohnTitor JohnTitor merged commit ce18cd8 into master Oct 10, 2023
@JohnTitor JohnTitor deleted the autofix/ices/113279.rs branch October 10, 2023 14:52
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