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

ices/83466.rs: fixed with errors #739

Merged
merged 1 commit into from
May 2, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented May 2, 2021

Issue: rust-lang/rust#83466

struct S;
impl S {
    fn func<'a, U>(self) -> U {
        todo!()
    }
}
fn dont_crash<'a, U>() {
    S.func::<'a, dont_crash>()
}

fn main() {}
=== stdout ===
=== stderr ===
warning: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
 --> /home/runner/work/glacier/glacier/ices/83466.rs:8:14
  |
3 |     fn func<'a, U>(self) -> U {
  |             -- the late bound lifetime parameter is introduced here
...
8 |     S.func::<'a, dont_crash>()
  |              ^^
  |
  = note: `#[warn(late_bound_lifetime_arguments)]` on by default
  = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
  = note: for more information, see issue #42868 <https://github.com/rust-lang/rust/issues/42868>

error[E0747]: constant provided when a type was expected
 --> /home/runner/work/glacier/glacier/ices/83466.rs:8:18
  |
8 |     S.func::<'a, dont_crash>()
  |                  ^^^^^^^^^^
  |
  = help: `dont_crash` is a function item, not a type
  = help: function item types cannot be named directly

error: aborting due to previous error; 1 warning emitted

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

=== stdout ===
=== stderr ===
warning: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
 --> /home/runner/work/glacier/glacier/ices/83466.rs:8:14
  |
3 |     fn func<'a, U>(self) -> U {
  |             -- the late bound lifetime parameter is introduced here
...
8 |     S.func::<'a, dont_crash>()
  |              ^^
  |
  = note: `#[warn(late_bound_lifetime_arguments)]` on by default
  = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
  = note: for more information, see issue #42868 <rust-lang/rust#42868>

error[E0747]: constant provided when a type was expected
 --> /home/runner/work/glacier/glacier/ices/83466.rs:8:18
  |
8 |     S.func::<'a, dont_crash>()
  |                  ^^^^^^^^^^
  |
  = help: `dont_crash` is a function item, not a type
  = help: function item types cannot be named directly

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0747`.
==============
@Alexendoo Alexendoo merged commit 02a2fb5 into master May 2, 2021
@Alexendoo Alexendoo deleted the autofix/ices/83466.rs branch May 2, 2021 13: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