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

ices/92577.sh: fixed with no errors #1086

Merged
merged 1 commit into from
Jan 11, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#92577

#!/usr/bin/env bash

rustc --crate-type lib - << EOF
#![feature(ptr_metadata)]

trait HasType {
    type Type;
}

impl HasType for () {
    type Type = ();
}

pub struct MyStruct {
    _field: <() as HasType>::Type,
}

pub fn bar() {
    let val: <MyStruct as std::ptr::Pointee>::Metadata;
}

pub fn main() {}
EOF
=== stdout ===
=== stderr ===
warning: unused variable: `val`
  --> <anon>:16:9
   |
16 |     let val: <MyStruct as std::ptr::Pointee>::Metadata;
   |         ^^^ help: if this is intentional, prefix it with an underscore: `_val`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: 1 warning emitted

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

=== stdout ===
=== stderr ===
warning: unused variable: `val`
  --> <anon>:16:9
   |
16 |     let val: <MyStruct as std::ptr::Pointee>::Metadata;
   |         ^^^ help: if this is intentional, prefix it with an underscore: `_val`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: 1 warning emitted

==============
@Alexendoo Alexendoo merged commit a104ace into master Jan 11, 2022
@Alexendoo Alexendoo deleted the autofix/ices/92577.sh branch January 11, 2022 17:38
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