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

ices/92114.rs: fixed with errors #1090

Merged
merged 1 commit into from
Jan 16, 2022
Merged

ices/92114.rs: fixed with errors #1090

merged 1 commit into from
Jan 16, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#92114

#![feature(const_trait_impl)]
#![feature(const_fn_trait_bound)]
#![feature(inline_const)]
#![feature(negative_impls)]

const fn const_drop<T: ~const Drop>(_x: T) {}

struct NonDrop;

impl !Drop for NonDrop {}

fn main() {
    const { const_drop(NonDrop) };
}
=== stdout ===
=== stderr ===
error[E0277]: the trait bound `NonDrop: Drop` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/92114.rs:13:24
   |
13 |     const { const_drop(NonDrop) };
   |             ---------- ^^^^^^^ the trait `Drop` is not implemented for `NonDrop`
   |             |
   |             required by a bound introduced by this call
   |
note: required by a bound in `const_drop`
  --> /home/runner/work/glacier/glacier/ices/92114.rs:6:24
   |
6  | const fn const_drop<T: ~const Drop>(_x: T) {}
   |                        ^^^^^^^^^^^ required by this bound in `const_drop`

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error[E0277]: the trait bound `NonDrop: Drop` is not satisfied
  --> /home/runner/work/glacier/glacier/ices/92114.rs:13:24
   |
13 |     const { const_drop(NonDrop) };
   |             ---------- ^^^^^^^ the trait `Drop` is not implemented for `NonDrop`
   |             |
   |             required by a bound introduced by this call
   |
note: required by a bound in `const_drop`
  --> /home/runner/work/glacier/glacier/ices/92114.rs:6:24
   |
6  | const fn const_drop<T: ~const Drop>(_x: T) {}
   |                        ^^^^^^^^^^^ required by this bound in `const_drop`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
==============
@Alexendoo Alexendoo merged commit 84defee into master Jan 16, 2022
@Alexendoo Alexendoo deleted the autofix/ices/92114.rs branch January 16, 2022 18:39
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