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

ices/58987-2.rs: fixed with errors #540

Merged
merged 1 commit into from
Nov 16, 2020
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#58987

struct A<T> {
    field: [u8; f::<&T>()],
}
fn f<T>() -> usize { 0 }

fn main() {}
=== stdout ===
=== stderr ===
error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
 --> /home/runner/work/glacier/glacier/ices/58987-2.rs:2:17
  |
2 |     field: [u8; f::<&T>()],
  |                 ^^^^^^^^^

error[E0392]: parameter `T` is never used
 --> /home/runner/work/glacier/glacier/ices/58987-2.rs:1:10
  |
1 | struct A<T> {
  |          ^ unused parameter
  |
  = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`

error: aborting due to 2 previous errors

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

=== stdout ===
=== stderr ===
error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants
 --> /home/runner/work/glacier/glacier/ices/58987-2.rs:2:17
  |
2 |     field: [u8; f::<&T>()],
  |                 ^^^^^^^^^

error[E0392]: parameter `T` is never used
 --> /home/runner/work/glacier/glacier/ices/58987-2.rs:1:10
  |
1 | struct A<T> {
  |          ^ unused parameter
  |
  = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0015, E0392.
For more information about an error, try `rustc --explain E0015`.
==============
@Alexendoo Alexendoo merged commit fafe51d into master Nov 16, 2020
@Alexendoo Alexendoo deleted the autofix/ices/58987-2.rs branch November 16, 2020 15:40
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