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

ices/109059.rs: fixed with errors #1597

Merged
merged 1 commit into from
Jun 4, 2023
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jun 3, 2023

Issue: rust-lang/rust#109059

#![allow(incomplete_features)]
#![feature(adt_const_params)]
#![allow(dead_code)]

#[derive(PartialEq, Eq)]
struct S;

trait T<const C: &'static S> {}

fn foo<const C: &'static S>(t: impl T<C>) -> impl T<C> {
    t
}

fn main() {}
=== stdout ===
=== stderr ===
error[E0741]: `&'static S` can't be used as a const parameter type
 --> /home/runner/work/glacier/glacier/ices/109059.rs:8:18
  |
8 | trait T<const C: &'static S> {}
  |                  ^^^^^^^^^^
  |
  = note: `S` must implement `ConstParamTy`, but it does not

error[E0741]: `&'static S` can't be used as a const parameter type
  --> /home/runner/work/glacier/glacier/ices/109059.rs:10:17
   |
10 | fn foo<const C: &'static S>(t: impl T<C>) -> impl T<C> {
   |                 ^^^^^^^^^^
   |
   = note: `S` must implement `ConstParamTy`, but it does not

error: aborting due to 2 previous errors

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

=== stdout ===
=== stderr ===
error[E0741]: `&'static S` can't be used as a const parameter type
 --> /home/runner/work/glacier/glacier/ices/109059.rs:8:18
  |
8 | trait T<const C: &'static S> {}
  |                  ^^^^^^^^^^
  |
  = note: `S` must implement `ConstParamTy`, but it does not

error[E0741]: `&'static S` can't be used as a const parameter type
  --> /home/runner/work/glacier/glacier/ices/109059.rs:10:17
   |
10 | fn foo<const C: &'static S>(t: impl T<C>) -> impl T<C> {
   |                 ^^^^^^^^^^
   |
   = note: `S` must implement `ConstParamTy`, but it does not

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0741`.
==============
@JohnTitor JohnTitor merged commit dcc84ec into master Jun 4, 2023
@JohnTitor JohnTitor deleted the autofix/ices/109059.rs branch June 4, 2023 08:44
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants