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

ices/78520.sh: fixed with no errors #1145

Merged
merged 1 commit into from
Feb 23, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#78520

#!/bin/bash

rustc -Zdump-mir=all - <<EOF
// build-pass

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

struct Bug<const S: &'static str>;

fn main() {
    let b: Bug::<{
        unsafe {
            // FIXME(const_generics): Decide on how to deal with invalid values as const params.
            std::mem::transmute::<&[u8], &str>(&[0xC0, 0xC1, 0xF5])
        }
    }>;
}
EOF
=== stdout ===
=== stderr ===
warning: unused variable: `b`
 --> <anon>:9:9
  |
9 |     let b: Bug::<{
  |         ^ help: if this is intentional, prefix it with an underscore: `_b`
  |
  = note: `#[warn(unused_variables)]` on by default

warning: 1 warning emitted

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

=== stdout ===
=== stderr ===
warning: unused variable: `b`
 --> <anon>:9:9
  |
9 |     let b: Bug::<{
  |         ^ help: if this is intentional, prefix it with an underscore: `_b`
  |
  = note: `#[warn(unused_variables)]` on by default

warning: 1 warning emitted

==============
@Alexendoo Alexendoo merged commit 8930791 into master Feb 23, 2022
@Alexendoo Alexendoo deleted the autofix/ices/78520.sh branch February 23, 2022 12: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