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

ices/78180.sh: fixed with errors #1231

Merged
merged 1 commit into from
May 1, 2022
Merged

ices/78180.sh: fixed with errors #1231

merged 1 commit into from
May 1, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented May 1, 2022

Issue: rust-lang/rust#78180

#!/bin/bash

rustc -Zsave-analysis - <<EOF
#![feature(min_const_generics)]

fn test<const N: usize>() {}

fn wow<'a>() -> &'a () {
    test::<
        {
            let _: &'a ();
            3
        },
    >();
    &()
}
EOF
=== stdout ===
=== stderr ===
error[E0658]: a non-static lifetime is not allowed in a `const`
 --> <anon>:8:21
  |
8 |             let _: &'a ();
  |                     ^^
  |
  = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
  = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `rust_out`
  --> <anon>:13:2
   |
13 | }
   |  ^ consider adding a `main` function at the crate level

warning: the feature `min_const_generics` has been stable since 1.51.0 and no longer requires an attribute to enable
 --> <anon>:1:12
  |
1 | #![feature(min_const_generics)]
  |            ^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(stable_features)]` on by default

error: aborting due to 2 previous errors; 1 warning emitted

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

=== stdout ===
=== stderr ===
error[E0658]: a non-static lifetime is not allowed in a `const`
 --> <anon>:8:21
  |
8 |             let _: &'a ();
  |                     ^^
  |
  = note: see issue #76560 <rust-lang/rust#76560> for more information
  = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `rust_out`
  --> <anon>:13:2
   |
13 | }
   |  ^ consider adding a `main` function at the crate level

warning: the feature `min_const_generics` has been stable since 1.51.0 and no longer requires an attribute to enable
 --> <anon>:1:12
  |
1 | #![feature(min_const_generics)]
  |            ^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(stable_features)]` on by default

error: aborting due to 2 previous errors; 1 warning emitted

Some errors have detailed explanations: E0601, E0658.
For more information about an error, try `rustc --explain E0601`.
==============
@Alexendoo Alexendoo merged commit 0087e3a into master May 1, 2022
@Alexendoo Alexendoo deleted the autofix/ices/78180.sh branch May 1, 2022 16:08
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