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

ices/98842.sh: fixed with errors #1456

Merged
merged 1 commit into from
Nov 14, 2022
Merged

ices/98842.sh: fixed with errors #1456

merged 1 commit into from
Nov 14, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#98842

#!/bin/bash

rustc --crate-type lib --edition=2021 - <<'EOF'

struct Foo(<&'static Foo as ::core::ops::Deref>::Target);
const _: *const Foo = 0 as _;

EOF

=== stdout ===
=== stderr ===
warning: struct `Foo` is never constructed
 --> <anon>:2:8
  |
2 | struct Foo(<&'static Foo as ::core::ops::Deref>::Target);
  |        ^^^
  |
  = note: `#[warn(dead_code)]` on by default

error[E0391]: cycle detected when computing layout of `<&'static Foo as core::ops::deref::Deref>::Target`
  |
  = note: ...which requires computing layout of `Foo`...
  = note: ...which again requires computing layout of `<&'static Foo as core::ops::deref::Deref>::Target`, completing the cycle
  = note: cycle used when computing layout of `Foo`

error: aborting due to previous error; 1 warning emitted

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

=== stdout ===
=== stderr ===
warning: struct `Foo` is never constructed
 --> <anon>:2:8
  |
2 | struct Foo(<&'static Foo as ::core::ops::Deref>::Target);
  |        ^^^
  |
  = note: `#[warn(dead_code)]` on by default

error[E0391]: cycle detected when computing layout of `<&'static Foo as core::ops::deref::Deref>::Target`
  |
  = note: ...which requires computing layout of `Foo`...
  = note: ...which again requires computing layout of `<&'static Foo as core::ops::deref::Deref>::Target`, completing the cycle
  = note: cycle used when computing layout of `Foo`

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0391`.
==============
@Alexendoo Alexendoo merged commit 7c1b45c into master Nov 14, 2022
@Alexendoo Alexendoo deleted the autofix/ices/98842.sh branch November 14, 2022 18:44
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