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

ices/67883.rs: fixed with errors #258

Merged
merged 1 commit into from
Jan 15, 2020
Merged

ices/67883.rs: fixed with errors #258

merged 1 commit into from
Jan 15, 2020

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#67883

#![feature(const_generics)]

struct Caca<const A: &'static str> {
    s: String
}

impl<const A: &str> Default for Caca<A> {
    fn default() -> Self {
        let a = Self::A;
        Self {
            s: A.to_string()
        }
    }
}

fn main() {
    println!("Hello, world!");
}
=== stdout ===
=== stderr ===
error[E0637]: `&` without an explicit lifetime name cannot be used here
 --> /home/runner/work/glacier/glacier/ices/67883.rs:7:15
  |
7 | impl<const A: &str> Default for Caca<A> {
  |               ^ explicit lifetime name needed here

warning: the feature `const_generics` is incomplete and may cause the compiler to crash
 --> /home/runner/work/glacier/glacier/ices/67883.rs:1:12
  |
1 | #![feature(const_generics)]
  |            ^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default

error[E0599]: no associated item named `A` found for struct `Caca<A>` in the current scope
 --> /home/runner/work/glacier/glacier/ices/67883.rs:9:23
  |
3 | struct Caca<const A: &'static str> {
  | ---------------------------------- associated item `A` not found for this
...
9 |         let a = Self::A;
  |                       ^ associated item not found in `Caca<A>`

error: aborting due to 2 previous errors

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

=== stdout ===
=== stderr ===
error[E0637]: `&` without an explicit lifetime name cannot be used here
 --> /home/runner/work/glacier/glacier/ices/67883.rs:7:15
  |
7 | impl<const A: &str> Default for Caca<A> {
  |               ^ explicit lifetime name needed here

warning: the feature `const_generics` is incomplete and may cause the compiler to crash
 --> /home/runner/work/glacier/glacier/ices/67883.rs:1:12
  |
1 | #![feature(const_generics)]
  |            ^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default

error[E0599]: no associated item named `A` found for struct `Caca<A>` in the current scope
 --> /home/runner/work/glacier/glacier/ices/67883.rs:9:23
  |
3 | struct Caca<const A: &'static str> {
  | ---------------------------------- associated item `A` not found for this
...
9 |         let a = Self::A;
  |                       ^ associated item not found in `Caca<A>`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0599`.
==============
@JohnTitor JohnTitor merged commit 41b704b into master Jan 15, 2020
@JohnTitor JohnTitor deleted the autofix/ices/67883.rs branch January 15, 2020 12:43
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