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

ices/82610.rs: fixed with errors #760

Merged
merged 1 commit into from
May 27, 2021
Merged

ices/82610.rs: fixed with errors #760

merged 1 commit into from
May 27, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#82610

fn f<const N:usize>() {
    mut N
}
=== stdout ===
=== stderr ===
error: invalid variable declaration
 --> /home/runner/work/glacier/glacier/ices/82610.rs:2:5
  |
2 |     mut N
  |     ^^^ help: missing keyword: `let mut`

error: expected `;`, found `}`
 --> /home/runner/work/glacier/glacier/ices/82610.rs:2:10
  |
2 |     mut N
  |          ^ help: add `;` here
3 | }
  | - unexpected token

error[E0530]: let bindings cannot shadow const parameters
 --> /home/runner/work/glacier/glacier/ices/82610.rs:2:9
  |
1 | fn f<const N:usize>() {
  |            - the const parameter `N` is defined here
2 |     mut N
  |         ^ cannot be named the same as a const parameter

error[E0601]: `main` function not found in crate `82610`
 --> /home/runner/work/glacier/glacier/ices/82610.rs:1:1
  |
1 | / fn f<const N:usize>() {
2 | |     mut N
3 | | }
  | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/82610.rs`

error[E0282]: type annotations needed
 --> /home/runner/work/glacier/glacier/ices/82610.rs:2:5
  |
2 |     mut N
  |     ^^^^^ consider giving `N` a type

error: aborting due to 5 previous errors

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

=== stdout ===
=== stderr ===
error: invalid variable declaration
 --> /home/runner/work/glacier/glacier/ices/82610.rs:2:5
  |
2 |     mut N
  |     ^^^ help: missing keyword: `let mut`

error: expected `;`, found `}`
 --> /home/runner/work/glacier/glacier/ices/82610.rs:2:10
  |
2 |     mut N
  |          ^ help: add `;` here
3 | }
  | - unexpected token

error[E0530]: let bindings cannot shadow const parameters
 --> /home/runner/work/glacier/glacier/ices/82610.rs:2:9
  |
1 | fn f<const N:usize>() {
  |            - the const parameter `N` is defined here
2 |     mut N
  |         ^ cannot be named the same as a const parameter

error[E0601]: `main` function not found in crate `82610`
 --> /home/runner/work/glacier/glacier/ices/82610.rs:1:1
  |
1 | / fn f<const N:usize>() {
2 | |     mut N
3 | | }
  | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/82610.rs`

error[E0282]: type annotations needed
 --> /home/runner/work/glacier/glacier/ices/82610.rs:2:5
  |
2 |     mut N
  |     ^^^^^ consider giving `N` a type

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0282, E0530, E0601.
For more information about an error, try `rustc --explain E0282`.
==============
@Alexendoo Alexendoo merged commit bd4458e into master May 27, 2021
@Alexendoo Alexendoo deleted the autofix/ices/82610.rs branch May 27, 2021 14:16
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