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

ices/67684.sh: fixed with no errors #1025

Merged
merged 1 commit into from
Dec 4, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Dec 4, 2021

Issue: rust-lang/rust#67684

#!/bin/bash

rustc - << 'EOF'
#![crate_type = "lib"]
trait ParseError {
    type StreamError;
}
impl<T> ParseError for T {
    type StreamError = ();
}
trait Stream {
    type Error;
}
trait Parser
where
    <Self as Parser>::PartialState: Default,
{
    type PartialState;
    fn parse_mode(&Self, Self::PartialState) {}
}
struct AndThen<A, B>(core::marker::PhantomData<(A, B)>);
impl<A, B> Parser for AndThen<A, B>
where
    A: Stream,
    B: Into<<A::Error as ParseError>::StreamError>,
{
    type PartialState = ();
}
fn expr<A>() -> impl Parser
where
    A: Stream,
{
    AndThen::<A, ()>(core::marker::PhantomData)
}
fn parse_mode_impl<A>()
where
    A::Error: ParseError,
    A: Stream,
{
    Parser::parse_mode(&expr::<A>(), Default::default())
}
EOF
=== stdout ===
=== stderr ===
warning: anonymous parameters are deprecated and will be removed in the next edition
  --> <anon>:16:19
   |
16 |     fn parse_mode(&Self, Self::PartialState) {}
   |                   ^^^^^ help: try naming the parameter or explicitly ignoring it: `_: &Self`
   |
   = note: `#[warn(anonymous_parameters)]` on by default
   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
   = note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686>

warning: anonymous parameters are deprecated and will be removed in the next edition
  --> <anon>:16:26
   |
16 |     fn parse_mode(&Self, Self::PartialState) {}
   |                          ^^^^^^^^^^^^^^^^^^ help: try naming the parameter or explicitly ignoring it: `_: Self::PartialState`
   |
   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
   = note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686>

warning: function is never used: `expr`
  --> <anon>:26:4
   |
26 | fn expr<A>() -> impl Parser
   |    ^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: function is never used: `parse_mode_impl`
  --> <anon>:32:4
   |
32 | fn parse_mode_impl<A>()
   |    ^^^^^^^^^^^^^^^

warning: 4 warnings emitted

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

=== stdout ===
=== stderr ===
warning: anonymous parameters are deprecated and will be removed in the next edition
  --> <anon>:16:19
   |
16 |     fn parse_mode(&Self, Self::PartialState) {}
   |                   ^^^^^ help: try naming the parameter or explicitly ignoring it: `_: &Self`
   |
   = note: `#[warn(anonymous_parameters)]` on by default
   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
   = note: for more information, see issue #41686 <rust-lang/rust#41686>

warning: anonymous parameters are deprecated and will be removed in the next edition
  --> <anon>:16:26
   |
16 |     fn parse_mode(&Self, Self::PartialState) {}
   |                          ^^^^^^^^^^^^^^^^^^ help: try naming the parameter or explicitly ignoring it: `_: Self::PartialState`
   |
   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
   = note: for more information, see issue #41686 <rust-lang/rust#41686>

warning: function is never used: `expr`
  --> <anon>:26:4
   |
26 | fn expr<A>() -> impl Parser
   |    ^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: function is never used: `parse_mode_impl`
  --> <anon>:32:4
   |
32 | fn parse_mode_impl<A>()
   |    ^^^^^^^^^^^^^^^

warning: 4 warnings emitted

==============
@Alexendoo Alexendoo merged commit d3d8bf2 into master Dec 4, 2021
@Alexendoo Alexendoo deleted the autofix/ices/67684.sh branch December 4, 2021 14:01
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