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

ices/88384.rs: fixed with no errors #974

Merged
merged 1 commit into from
Sep 23, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#88384

#![feature(fn_traits)]
#![feature(adt_const_params)]

#[derive(PartialEq, Eq)]
struct CompileTimeSettings{
    hooks: &'static[fn()],
}

struct Foo<const T: CompileTimeSettings>;

impl<const T: CompileTimeSettings> Foo<T> {
    fn callHooks(){
    }
}

fn main(){
    const settings: CompileTimeSettings = CompileTimeSettings{
        hooks: &[],
    };
    
    Foo::<settings>::callHooks();
}
=== stdout ===
=== stderr ===
warning: the feature `adt_const_params` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/88384.rs:2:12
  |
2 | #![feature(adt_const_params)]
  |            ^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information

warning: method `callHooks` should have a snake case name
  --> /home/runner/work/glacier/glacier/ices/88384.rs:12:8
   |
12 |     fn callHooks(){
   |        ^^^^^^^^^ help: convert the identifier to snake case: `call_hooks`
   |
   = note: `#[warn(non_snake_case)]` on by default

warning: constant `settings` should have an upper case name
  --> /home/runner/work/glacier/glacier/ices/88384.rs:17:11
   |
17 |     const settings: CompileTimeSettings = CompileTimeSettings{
   |           ^^^^^^^^ help: convert the identifier to upper case: `SETTINGS`
   |
   = note: `#[warn(non_upper_case_globals)]` on by default

warning: 3 warnings emitted

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

=== stdout ===
=== stderr ===
warning: the feature `adt_const_params` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/88384.rs:2:12
  |
2 | #![feature(adt_const_params)]
  |            ^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #44580 <rust-lang/rust#44580> for more information

warning: method `callHooks` should have a snake case name
  --> /home/runner/work/glacier/glacier/ices/88384.rs:12:8
   |
12 |     fn callHooks(){
   |        ^^^^^^^^^ help: convert the identifier to snake case: `call_hooks`
   |
   = note: `#[warn(non_snake_case)]` on by default

warning: constant `settings` should have an upper case name
  --> /home/runner/work/glacier/glacier/ices/88384.rs:17:11
   |
17 |     const settings: CompileTimeSettings = CompileTimeSettings{
   |           ^^^^^^^^ help: convert the identifier to upper case: `SETTINGS`
   |
   = note: `#[warn(non_upper_case_globals)]` on by default

warning: 3 warnings emitted

==============
@Alexendoo Alexendoo merged commit 2019363 into master Sep 23, 2021
@Alexendoo Alexendoo deleted the autofix/ices/88384.rs branch September 23, 2021 17:04
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