-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Open
Labels
A-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.I-types-nominatedNominated for discussion during a types team meeting.Nominated for discussion during a types team meeting.P-highHigh priorityHigh priorityS-has-bisectionStatus: A bisection has been found for this issueStatus: A bisection has been found for this issueS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Description
Code
pub trait Trait {
type Assoc<G>: OtherTrait<G>;
}
pub trait OtherTrait<R> {
fn new(r: R) -> R {
r
}
}
pub fn function<T: Trait>()
where
T::Assoc<[u32; 1]>: Clone, // comment out to let it compile
{
let _x = T::Assoc::new(());
}
Version it worked on
It most recently worked on: Stable (1.88)
Version with regression
Beta (1.89), nightly (1.90) produces
Compiling playground v0.0.1 (/playground)
error[E0308]: mismatched types
--> src/lib.rs:15:28
|
15 | let _x = T::Assoc::new(());
| ------------- ^^ expected `[u32; 1]`, found `()`
| |
| arguments to this function are incorrect
|
note: associated function defined here
--> src/lib.rs:6:8
|
6 | fn new(r: R) -> R {
| ^^^ ----
For more information about this error, try `rustc --explain E0308`.
Originally found in https://github.com/phimuemue/openschafkopf/blob/dacfecc50338443955998a074c0901d989b7a553/lib/src/game_analysis/determine_best_card_table.rs#L51
error[E0308]: mismatched types
--> lib/src/game_analysis/determine_best_card_table.rs:70:9
|
70 | / SFormatInfo {
71 | | f_min: f32::MAX,
72 | | f_max: f32::MIN,
73 | | n_width: 0,
74 | | };
| |_________^ expected `(String, f32)`, found `SFormatInfo`
|
= note: expected tuple `(std::string::String, f32)`
found struct `SFormatInfo`
@rustbot modify labels: +regression-from-stable-to-beta +regression-from-stable-to-nightly -regression-untriaged
phimuemue
Metadata
Metadata
Assignees
Labels
A-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.I-types-nominatedNominated for discussion during a types team meeting.Nominated for discussion during a types team meeting.P-highHigh priorityHigh priorityS-has-bisectionStatus: A bisection has been found for this issueStatus: A bisection has been found for this issueS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.