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

ices/83120.rs: fixed with errors #858

Merged
merged 1 commit into from
Jul 6, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jul 5, 2021

Issue: rust-lang/rust#83120

fn main() {
    struct S<const N: usize>;
    S as *const ();
}
=== stdout ===
=== stderr ===
error[E0605]: non-primitive cast: `S<{_: usize}>` as `*const ()`
 --> /home/runner/work/glacier/glacier/ices/83120.rs:3:5
  |
3 |     S as *const ();
  |     ^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error[E0605]: non-primitive cast: `S<{_: usize}>` as `*const ()`
 --> /home/runner/work/glacier/glacier/ices/83120.rs:3:5
  |
3 |     S as *const ();
  |     ^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object

error: aborting due to previous error

For more information about this error, try `rustc --explain E0605`.
==============
@JohnTitor JohnTitor merged commit 1ae9665 into master Jul 6, 2021
@JohnTitor JohnTitor deleted the autofix/ices/83120.rs branch July 6, 2021 00:00
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