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

ices/99318.sh: fixed with no errors #1387

Merged
merged 1 commit into from
Aug 15, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#99318

#!/bin/bash

rustc -Zunpretty=hir - <<'EOF'

#![feature(let_else)]

pub fn main() {
    let Some(x) = &Some(3) else {
        panic!();
    };
    *x += 1; //~ ERROR: cannot assign to `*x`, which is behind a `&` reference
}

EOF

=== stdout ===
#![feature(let_else)]
#[prelude_import]
use ::std::prelude::rust_2015::*;
#[macro_use]
extern crate std;

fn main() {
        let Some(x) = &Some(3) else
            {
             //~ ERROR: cannot assign to `*x`, which is behind a `&` reference

            { ::std::rt::begin_panic("explicit panic") };
        };
        *x += 1;
    }
=== stderr ===
==============

=== stdout ===
#![feature(let_else)]
#[prelude_import]
use ::std::prelude::rust_2015::*;
#[macro_use]
extern crate std;

fn main() {
        let Some(x) = &Some(3) else
            {
             //~ ERROR: cannot assign to `*x`, which is behind a `&` reference

            { ::std::rt::begin_panic("explicit panic") };
        };
        *x += 1;
    }
=== stderr ===
==============
@JohnTitor JohnTitor merged commit a172527 into master Aug 15, 2022
@JohnTitor JohnTitor deleted the autofix/ices/99318.sh branch August 15, 2022 12:44
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