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

ices/72845.rs: fixed with no errors #1522

Merged
merged 1 commit into from
Mar 8, 2023
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Mar 8, 2023

Issue: rust-lang/rust#72845

#![feature(generic_const_exprs)]
#![feature(specialization)]
#![allow(incomplete_features)]

//--------------------------------------------------

trait Depth {
    const C: usize;
}

trait Type {
    type AT: Depth;
}

//--------------------------------------------------

enum Predicate<const B: bool> {}

trait Satisfied {}

impl Satisfied for Predicate<true> {}

//--------------------------------------------------

trait Spec1 {}

impl<T: Type> Spec1 for T where Predicate<{T::AT::C > 0}>: Satisfied {}

trait Spec2: Spec1 {}

impl<T: Type + Spec1> Spec2 for T where Predicate<{T::AT::C > 1}>: Satisfied {}

//--------------------------------------------------

trait Foo {
    fn Bar();
}

impl<T: Spec1> Foo for T {
    default fn Bar() {}
}

impl<T: Spec2> Foo for T {
    fn Bar() {}
}

fn main() {}
=== stdout ===
=== stderr ===
warning: trait method `Bar` should have a snake case name
  --> /home/runner/work/glacier/glacier/ices/72845.rs:36:8
   |
36 |     fn Bar();
   |        ^^^ help: convert the identifier to snake case: `bar`
   |
   = note: `#[warn(non_snake_case)]` on by default

warning: 1 warning emitted

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

=== stdout ===
=== stderr ===
warning: trait method `Bar` should have a snake case name
  --> /home/runner/work/glacier/glacier/ices/72845.rs:36:8
   |
36 |     fn Bar();
   |        ^^^ help: convert the identifier to snake case: `bar`
   |
   = note: `#[warn(non_snake_case)]` on by default

warning: 1 warning emitted

==============
@Alexendoo Alexendoo merged commit fade49f into master Mar 8, 2023
@Alexendoo Alexendoo deleted the autofix/ices/72845.rs branch March 8, 2023 11:22
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