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

ices/68550.rs: fixed with errors #348

Merged
merged 1 commit into from
May 1, 2020
Merged

Conversation

github-actions[bot]
Copy link
Contributor

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

Issue: rust-lang/rust#68550

fn run<'a, A>(x: A)
where
    A: 'static,
    &'static A: ,
{
    let _: &'a A = &x;
}

fn main() {}
=== stdout ===
=== stderr ===
error[E0597]: `x` does not live long enough
 --> /home/runner/work/glacier/glacier/ices/68550.rs:6:20
  |
1 | fn run<'a, A>(x: A)
  |        -- lifetime `'a` defined here
...
6 |     let _: &'a A = &x;
  |            -----   ^^ borrowed value does not live long enough
  |            |
  |            type annotation requires that `x` is borrowed for `'a`
7 | }
  | - `x` dropped here while still borrowed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0597`.
==============

=== stdout ===
=== stderr ===
error[E0597]: `x` does not live long enough
 --> /home/runner/work/glacier/glacier/ices/68550.rs:6:20
  |
1 | fn run<'a, A>(x: A)
  |        -- lifetime `'a` defined here
...
6 |     let _: &'a A = &x;
  |            -----   ^^ borrowed value does not live long enough
  |            |
  |            type annotation requires that `x` is borrowed for `'a`
7 | }
  | - `x` dropped here while still borrowed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0597`.
==============
@Alexendoo Alexendoo merged commit acf5f46 into master May 1, 2020
@Alexendoo Alexendoo deleted the autofix/ices/68550.rs branch May 1, 2020 12:35
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