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

ices/95307.rs: fixed with errors #1281

Merged
merged 1 commit into from
Jun 4, 2022
Merged

ices/95307.rs: fixed with errors #1281

merged 1 commit into from
Jun 4, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jun 4, 2022

Issue: rust-lang/rust#95307

pub trait C{async fn new(val: T) -> [u8; _];
  as Trait<&'a u32> Collate<MASK> for () = [0u8; 4];
   use std::mem;

fn foo<T: Tr>() -> usize {
     macro ice(){}

fn main(){}
=== stdout ===
=== stderr ===
error: this file contains an unclosed delimiter
 --> /home/runner/work/glacier/glacier/ices/95307.rs:8:13
  |
1 | pub trait C{async fn new(val: T) -> [u8; _];
  |            - unclosed delimiter
...
5 | fn foo<T: Tr>() -> usize {
  |                          - unclosed delimiter
...
8 | fn main(){}
  |             ^

error: non-item in item list
 --> /home/runner/work/glacier/glacier/ices/95307.rs:2:3
  |
1 | pub trait C{async fn new(val: T) -> [u8; _];
  |            - item list starts here
2 |   as Trait<&'a u32> Collate<MASK> for () = [0u8; 4];
  |   ^^ non-item starts here
...
8 | fn main(){}
  |             - item list ends here

error[E0706]: functions in traits cannot be declared `async`
 --> /home/runner/work/glacier/glacier/ices/95307.rs:1:13
  |
1 | pub trait C{async fn new(val: T) -> [u8; _];
  |             -----^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |             |
  |             `async` because of this
  |
  = note: `async` trait functions are not currently supported
  = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait

error[E0412]: cannot find type `T` in this scope
 --> /home/runner/work/glacier/glacier/ices/95307.rs:1:31
  |
1 | pub trait C{async fn new(val: T) -> [u8; _];
  |                               ^ not found in this scope

error[E0658]: using `_` for array lengths is unstable
 --> /home/runner/work/glacier/glacier/ices/95307.rs:1:42
  |
1 | pub trait C{async fn new(val: T) -> [u8; _];
  |                                          ^
  |
  = note: see issue #85077 <https://github.com/rust-lang/rust/issues/85077> for more information
  = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable

error: in expressions, `_` can only be used on the left-hand side of an assignment
 --> /home/runner/work/glacier/glacier/ices/95307.rs:1:42
  |
1 | pub trait C{async fn new(val: T) -> [u8; _];
  |                                          ^ `_` not allowed here

error: aborting due to 6 previous errors

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

=== stdout ===
=== stderr ===
error: this file contains an unclosed delimiter
 --> /home/runner/work/glacier/glacier/ices/95307.rs:8:13
  |
1 | pub trait C{async fn new(val: T) -> [u8; _];
  |            - unclosed delimiter
...
5 | fn foo<T: Tr>() -> usize {
  |                          - unclosed delimiter
...
8 | fn main(){}
  |             ^

error: non-item in item list
 --> /home/runner/work/glacier/glacier/ices/95307.rs:2:3
  |
1 | pub trait C{async fn new(val: T) -> [u8; _];
  |            - item list starts here
2 |   as Trait<&'a u32> Collate<MASK> for () = [0u8; 4];
  |   ^^ non-item starts here
...
8 | fn main(){}
  |             - item list ends here

error[E0706]: functions in traits cannot be declared `async`
 --> /home/runner/work/glacier/glacier/ices/95307.rs:1:13
  |
1 | pub trait C{async fn new(val: T) -> [u8; _];
  |             -----^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |             |
  |             `async` because of this
  |
  = note: `async` trait functions are not currently supported
  = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait

error[E0412]: cannot find type `T` in this scope
 --> /home/runner/work/glacier/glacier/ices/95307.rs:1:31
  |
1 | pub trait C{async fn new(val: T) -> [u8; _];
  |                               ^ not found in this scope

error[E0658]: using `_` for array lengths is unstable
 --> /home/runner/work/glacier/glacier/ices/95307.rs:1:42
  |
1 | pub trait C{async fn new(val: T) -> [u8; _];
  |                                          ^
  |
  = note: see issue #85077 <rust-lang/rust#85077> for more information
  = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable

error: in expressions, `_` can only be used on the left-hand side of an assignment
 --> /home/runner/work/glacier/glacier/ices/95307.rs:1:42
  |
1 | pub trait C{async fn new(val: T) -> [u8; _];
  |                                          ^ `_` not allowed here

error: aborting due to 6 previous errors

Some errors have detailed explanations: E0412, E0658, E0706.
For more information about an error, try `rustc --explain E0412`.
==============
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.

Fixed on the latest nightly.

@JohnTitor JohnTitor merged commit 8d5f295 into master Jun 4, 2022
@JohnTitor JohnTitor deleted the autofix/ices/95307.rs branch June 4, 2022 12:41
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