This repository was archived by the owner on May 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit 85ee6ac
committed
ices/62742.rs: fixed with errors
=== 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`.
==============1 parent c431092 commit 85ee6acCopy full SHA for 85ee6ac
1 file changed
+0
-0
lines changedices/62742.rs renamed to fixed/62742.rs
Copy file name to clipboardFile renamed without changes.
0 commit comments