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

ices/95311.rs: fixed with no errors #1215

Merged
merged 1 commit into from
Apr 15, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#95311

#![feature(ptr_metadata)]

trait Bar: Sized + 'static { }

struct Foo<B: Bar> {
    marker: std::marker::PhantomData<B>,
}

impl<B: Bar> Foo<B> {
    fn foo<T: ?Sized>(value: &T) {
        std::ptr::metadata(value);
    }
}

pub fn main() {}
=== stdout ===
=== stderr ===
warning: struct is never constructed: `Foo`
 --> /home/runner/work/glacier/glacier/ices/95311.rs:5:8
  |
5 | struct Foo<B: Bar> {
  |        ^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: associated function is never used: `foo`
  --> /home/runner/work/glacier/glacier/ices/95311.rs:10:8
   |
10 |     fn foo<T: ?Sized>(value: &T) {
   |        ^^^

warning: 2 warnings emitted

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

=== stdout ===
=== stderr ===
warning: struct is never constructed: `Foo`
 --> /home/runner/work/glacier/glacier/ices/95311.rs:5:8
  |
5 | struct Foo<B: Bar> {
  |        ^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: associated function is never used: `foo`
  --> /home/runner/work/glacier/glacier/ices/95311.rs:10:8
   |
10 |     fn foo<T: ?Sized>(value: &T) {
   |        ^^^

warning: 2 warnings emitted

==============
@JohnTitor JohnTitor merged commit 4d2f39d into master Apr 15, 2022
@JohnTitor JohnTitor deleted the autofix/ices/95311.rs branch April 15, 2022 12:13
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