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

ices/81199.rs: fixed with errors #1029

Merged
merged 1 commit into from
Dec 4, 2021
Merged

ices/81199.rs: fixed with errors #1029

merged 1 commit into from
Dec 4, 2021

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Dec 4, 2021

Issue: rust-lang/rust#81199

union PtrRepr<T: ?Sized> {
    const_ptr: *const T,
    mut_ptr: *mut T,
    components: <T as Pointee>::Metadata
}

pub trait Pointee {
    type Metadata;
}
=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `81199`
 --> /home/runner/work/glacier/glacier/ices/81199.rs:1:1
  |
1 | / union PtrRepr<T: ?Sized> {
2 | |     const_ptr: *const T,
3 | |     mut_ptr: *mut T,
4 | |     components: <T as Pointee>::Metadata
... |
8 | |     type Metadata;
9 | | }
  | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/81199.rs`

error[E0277]: the trait bound `T: Pointee` is not satisfied
 --> /home/runner/work/glacier/glacier/ices/81199.rs:4:17
  |
4 |     components: <T as Pointee>::Metadata
  |                 ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Pointee` is not implemented for `T`
  |
help: consider further restricting this bound
  |
1 | union PtrRepr<T: ?Sized + Pointee> {
  |                         +++++++++

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0277, E0601.
For more information about an error, try `rustc --explain E0277`.
==============

=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `81199`
 --> /home/runner/work/glacier/glacier/ices/81199.rs:1:1
  |
1 | / union PtrRepr<T: ?Sized> {
2 | |     const_ptr: *const T,
3 | |     mut_ptr: *mut T,
4 | |     components: <T as Pointee>::Metadata
... |
8 | |     type Metadata;
9 | | }
  | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/81199.rs`

error[E0277]: the trait bound `T: Pointee` is not satisfied
 --> /home/runner/work/glacier/glacier/ices/81199.rs:4:17
  |
4 |     components: <T as Pointee>::Metadata
  |                 ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Pointee` is not implemented for `T`
  |
help: consider further restricting this bound
  |
1 | union PtrRepr<T: ?Sized + Pointee> {
  |                         +++++++++

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0277, E0601.
For more information about an error, try `rustc --explain E0277`.
==============
@Alexendoo Alexendoo merged commit d3d8bf2 into master Dec 4, 2021
@Alexendoo Alexendoo deleted the autofix/ices/81199.rs branch December 4, 2021 14:01
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