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

Commit

Permalink
ices/62742.rs: fixed with errors
Browse files Browse the repository at this point in the history
=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `62742`
  --> /home/runner/work/glacier/glacier/ices/62742.rs:1:1
   |
1  | / use std::marker::PhantomData;
2  | |
3  | | fn _alias_check() {
4  | |     WrongImpl::foo(0i32);       // crash
...  |
26 | |     pub fn foo(value: A::Value) {}
27 | | }
   | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/62742.rs`

error[E0277]: the trait bound `RawImpl<_>: Raw<_>` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/62742.rs:4:5
   |
4  |     WrongImpl::foo(0i32);       // crash
   |     ^^^^^^^^^ the trait `Raw<_>` is not implemented for `RawImpl<_>`
   |
   = help: the following implementations were found:
             <RawImpl<T> as Raw<[T]>>
note: required by a bound in `SafeImpl`
  --> /home/runner/work/glacier/glacier/ices/62742.rs:23:35
   |
23 | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
   |                                   ^^^^^^ required by this bound in `SafeImpl`

error[E0599]: the function or associated item `foo` exists for struct `SafeImpl<(), RawImpl<()>>`, but its trait bounds were not satisfied
  --> /home/runner/work/glacier/glacier/ices/62742.rs:5:22
   |
5  |     WrongImpl::<()>::foo(0i32); // fine
   |                      ^^^ function or associated item cannot be called on `SafeImpl<(), RawImpl<()>>` due to unsatisfied trait bounds
...
17 | pub struct RawImpl<T>(PhantomData<T>);
   | -------------------------------------- doesn't satisfy `RawImpl<()>: Raw<()>`
...
23 | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
   | --------------------------------------------------------------- function or associated item `foo` not found for this
   |
   = note: the following trait bounds were not satisfied:
           `RawImpl<()>: Raw<()>`
note: the following trait must be implemented
  --> /home/runner/work/glacier/glacier/ices/62742.rs:9:1
   |
9  | / pub trait Raw<T: ?Sized> {
10 | |     type Value;
11 | | }
   | |_^

error[E0277]: the trait bound `RawImpl<()>: Raw<()>` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/62742.rs:5:5
   |
5  |     WrongImpl::<()>::foo(0i32); // fine
   |     ^^^^^^^^^^^^^^^ the trait `Raw<()>` is not implemented for `RawImpl<()>`
   |
   = help: the following implementations were found:
             <RawImpl<T> as Raw<[T]>>
note: required by a bound in `SafeImpl`
  --> /home/runner/work/glacier/glacier/ices/62742.rs:23:35
   |
23 | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
   |                                   ^^^^^^ required by this bound in `SafeImpl`

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0277, E0599, E0601.
For more information about an error, try `rustc --explain E0277`.
==============
  • Loading branch information
rustbot committed Feb 9, 2022
1 parent c431092 commit 85ee6ac
Showing 1 changed file with 0 additions and 0 deletions.
File renamed without changes.

0 comments on commit 85ee6ac

Please sign in to comment.