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

ices/83938.rs: fixed with errors #886

Merged
merged 1 commit into from
Jul 25, 2021
Merged

ices/83938.rs: fixed with errors #886

merged 1 commit into from
Jul 25, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#83938

#![crate_type = "lib"]
#![feature(const_evaluatable_checked, const_generics, const_generics_defaults)]
#![allow(incomplete_features)]

type NpOne<T, const N: usize, const NP: usize = {N+1usize}> = [T; NP];

pub fn push<T, const N: usize>(_: [T; N], _: T)
    -> NpOne<T, N>
{
    todo!()
}
=== stdout ===
=== stderr ===
error: unconstrained generic constant
 --> /home/runner/work/glacier/glacier/ices/83938.rs:8:8
  |
8 |     -> NpOne<T, N>
  |        ^^^^^^^^^^^
  |
  = help: try adding a `where` bound using this expression: `where [(); {N+1usize}]:`

error: aborting due to previous error

==============

=== stdout ===
=== stderr ===
error: unconstrained generic constant
 --> /home/runner/work/glacier/glacier/ices/83938.rs:8:8
  |
8 |     -> NpOne<T, N>
  |        ^^^^^^^^^^^
  |
  = help: try adding a `where` bound using this expression: `where [(); {N+1usize}]:`

error: aborting due to previous error

==============
@Alexendoo Alexendoo merged commit 450d917 into master Jul 25, 2021
@Alexendoo Alexendoo deleted the autofix/ices/83938.rs branch July 25, 2021 12:20
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