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

ices/75158.rs: fixed with errors #546

Merged
merged 1 commit into from
Dec 2, 2020
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#75158

struct S<T> { x: [T; !0] }

pub fn f() -> usize {
    std::mem::size_of::<S<u8>>()
}

fn main() {
    let x = f();
}
=== stdout ===
=== stderr ===
warning: unused variable: `x`
 --> /home/runner/work/glacier/glacier/ices/75158.rs:8:9
  |
8 |     let x = f();
  |         ^ help: if this is intentional, prefix it with an underscore: `_x`
  |
  = note: `#[warn(unused_variables)]` on by default

warning: field is never read: `x`
 --> /home/runner/work/glacier/glacier/ices/75158.rs:1:15
  |
1 | struct S<T> { x: [T; !0] }
  |               ^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

error: the type `[u8; 18446744073709551615]` is too big for the current architecture

error: aborting due to previous error; 2 warnings emitted

==============

=== stdout ===
=== stderr ===
warning: unused variable: `x`
 --> /home/runner/work/glacier/glacier/ices/75158.rs:8:9
  |
8 |     let x = f();
  |         ^ help: if this is intentional, prefix it with an underscore: `_x`
  |
  = note: `#[warn(unused_variables)]` on by default

warning: field is never read: `x`
 --> /home/runner/work/glacier/glacier/ices/75158.rs:1:15
  |
1 | struct S<T> { x: [T; !0] }
  |               ^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

error: the type `[u8; 18446744073709551615]` is too big for the current architecture

error: aborting due to previous error; 2 warnings emitted

==============
@Alexendoo
Copy link
Member

I can't figure out what fixed this one, it doesn't ICE on earlier versions when I try to bisect it

@camelid
Copy link
Member

camelid commented Dec 1, 2020

Based on Godbolt, it's fixed on nightly but not on beta.

@camelid
Copy link
Member

camelid commented Dec 1, 2020

Hmm, but it seems to be fixed on all versions on the Playground. This is weird...

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't figure out what fixed this one, it doesn't ICE on earlier versions when I try to bisect it

Because playground's run is not the same as cargo run exactly IIRC. This ICE is certainly fixed between nightly-2020-11-15 and nightly-2020-11-16 so I'm going to merge.

@JohnTitor JohnTitor merged commit b9ed7fc into master Dec 2, 2020
@JohnTitor JohnTitor deleted the autofix/ices/75158.rs branch December 2, 2020 03:22
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.

4 participants