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

ices/95665.rs: fixed with errors #1314

Merged
merged 1 commit into from
Jun 21, 2022
Merged

ices/95665.rs: fixed with errors #1314

merged 1 commit into from
Jun 21, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#95665

pub trait Trait: {}

pub struct Struct<T: Trait> {
    member: T,
}

// uncomment and bug goes away
//impl Trait for u8 {}

extern "C" {
    static VAR: Struct<u8>;
}

fn main() {}
=== stdout ===
=== stderr ===
error[E0277]: the trait bound `u8: Trait` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/95665.rs:11:17
   |
11 |     static VAR: Struct<u8>;
   |                 ^^^^^^^^^^ the trait `Trait` is not implemented for `u8`
   |
note: required by a bound in `Struct`
  --> /home/runner/work/glacier/glacier/ices/95665.rs:3:22
   |
3  | pub struct Struct<T: Trait> {
   |                      ^^^^^ required by this bound in `Struct`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
==============

=== stdout ===
=== stderr ===
error[E0277]: the trait bound `u8: Trait` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/95665.rs:11:17
   |
11 |     static VAR: Struct<u8>;
   |                 ^^^^^^^^^^ the trait `Trait` is not implemented for `u8`
   |
note: required by a bound in `Struct`
  --> /home/runner/work/glacier/glacier/ices/95665.rs:3:22
   |
3  | pub struct Struct<T: Trait> {
   |                      ^^^^^ required by this bound in `Struct`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
==============
@JohnTitor JohnTitor merged commit 6550e6b into master Jun 21, 2022
@JohnTitor JohnTitor deleted the autofix/ices/95665.rs branch June 21, 2022 04:24
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