mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Remove a has_errors check that doesn't actually prevent noisy follow up errors
This commit is contained in:
parent
28f250d6a6
commit
d31905c904
@ -2720,10 +2720,6 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
||||
if let Some(e) = self.tainted_by_errors() {
|
||||
return e;
|
||||
}
|
||||
if let Some(e) = self.dcx().has_errors() {
|
||||
// no need to overload user in such cases
|
||||
return e;
|
||||
}
|
||||
struct_span_code_err!(
|
||||
self.dcx(),
|
||||
span,
|
||||
|
@ -14,6 +14,7 @@ impl<T> Default for T {
|
||||
default type Id = T; //~ ERROR type annotations needed
|
||||
// This will be fixed by #111994
|
||||
fn intu(&self) -> &Self::Id {
|
||||
//~^ ERROR type annotations needed
|
||||
self
|
||||
}
|
||||
}
|
||||
|
@ -10,12 +10,19 @@ LL | #![feature(specialization)]
|
||||
|
||||
error: cannot normalize `<T as Default>::Id`
|
||||
|
||||
error[E0284]: type annotations needed: cannot satisfy `<T as Default>::Id == _`
|
||||
--> $DIR/specialization-transmute.rs:16:23
|
||||
|
|
||||
LL | fn intu(&self) -> &Self::Id {
|
||||
| ^^^^^^^^^ cannot satisfy `<T as Default>::Id == _`
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> $DIR/specialization-transmute.rs:14:23
|
||||
|
|
||||
LL | default type Id = T;
|
||||
| ^ cannot infer type for associated type `<T as Default>::Id`
|
||||
|
||||
error: aborting due to 2 previous errors; 1 warning emitted
|
||||
error: aborting due to 3 previous errors; 1 warning emitted
|
||||
|
||||
For more information about this error, try `rustc --explain E0282`.
|
||||
Some errors have detailed explanations: E0282, E0284.
|
||||
For more information about an error, try `rustc --explain E0282`.
|
||||
|
Loading…
Reference in New Issue
Block a user