Skip to content

regression: error[E0284]: type annotations needed; cannot infer type in trait declaration #140019

Closed
@cuviper

Description

@cuviper
[INFO] [stderr]    Compiling lang-def v0.1.0 (/opt/rustwide/workdir/lang-def)
[INFO] [stdout] error[E0284]: type annotations needed
[INFO] [stdout]    --> lang-def/src/parser.rs:293:5
[INFO] [stdout]     |
[INFO] [stdout] 293 |     fn span_str(&self, span: impl Spanned<Pos = Self::Pos>) -> Cow<'a, str>;
[INFO] [stdout]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
[INFO] [stdout]     |
[INFO] [stdout]     = note: cannot satisfy `<Self as Iterator>::Item == _`
[INFO] [stderr]    Compiling poisson v0.10.1 (/opt/rustwide/workdir)
[INFO] [stdout] error[E0284]: type annotations needed
[INFO] [stdout]   --> src/algorithm/mod.rs:35:5
[INFO] [stdout]    |
[INFO] [stdout] 35 | /     fn next<R>(&mut self, _: &mut Builder<F, V>, _: &mut R) -> Option<V>
[INFO] [stdout] 36 | |     where
[INFO] [stdout] 37 | |         R: Rng;
[INFO] [stdout]    | |_______________^ cannot infer type
[INFO] [stdout]    |
[INFO] [stdout]    = note: cannot satisfy `<V as Module>::Ring == _`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0284]: type annotations needed
[INFO] [stdout]   --> src/algorithm/mod.rs:40:5
[INFO] [stdout]    |
[INFO] [stdout] 40 |     fn size_hint(&self, _: &Builder<F, V>) -> (usize, Option<usize>);
[INFO] [stdout]    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
[INFO] [stdout]    |
[INFO] [stdout]    = note: cannot satisfy `<V as Module>::Ring == _`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0284]: type annotations needed
[INFO] [stdout]   --> src/algorithm/mod.rs:43:5
[INFO] [stdout]    |
[INFO] [stdout] 43 |     fn restrict(&mut self, _: V);
[INFO] [stdout]    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
[INFO] [stdout]    |
[INFO] [stdout]    = note: cannot satisfy `<V as Module>::Ring == _`
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0284]: type annotations needed
[INFO] [stdout]   --> src/algorithm/mod.rs:46:5
[INFO] [stdout]    |
[INFO] [stdout] 46 |     fn stays_legal(&self, _: &Builder<F, V>, _: V) -> bool;
[INFO] [stdout]    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
[INFO] [stdout]    |
[INFO] [stdout]    = note: cannot satisfy `<V as Module>::Ring == _`

Version it worked on

It most recently worked on: Rust 1.86.0

Version with regression

Using 1.87.0-beta.4 in crater #139827.

@rustbot modify labels: +regression-from-stable-to-beta -regression-untriaged

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions