-
Notifications
You must be signed in to change notification settings - Fork 13.3k
make type_flags(ReError) & HAS_ERROR
#122749
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
rustbot has assigned @petrochenkov. Use |
if let Err(guar) = arg.error_reported() { | ||
return Err(guar); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is removed to avoid an ICE in tests/ui/type-alias-impl-trait/under-binder.rs
. I'll rewrite it anyway in #116891.
This comment has been minimized.
This comment has been minimized.
64a5ca5
to
cb4b2d1
Compare
@@ -9,6 +9,19 @@ help: indicate the anonymous lifetime | |||
LL | impl Trait for Ref<'_> {} | |||
| ++++ | |||
|
|||
error: aborting due to 1 previous error | |||
error[E0277]: the trait bound `Ref<'_>: Trait` is not satisfied |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know why this error occurs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would like some explanations for why these error messages start appearing, but I agree that this is the right approach in general. I don't think they necessarily should be fixed, but am curious nonetheless.
@@ -10,6 +10,14 @@ note: lifetime declared here | |||
LL | pub type Foo = impl for<'a> Trait<'a, Assoc = impl Test<'a>>; | |||
| ^^ | |||
|
|||
error: aborting due to 1 previous error | |||
error: unconstrained opaque type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this one too, do you know why it occurs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't register opaques that reference errors: https://github.com/rust-lang/rust/blame/a128516cf9de352ae1f9d430ed730363c7ca3c0c/compiler/rustc_infer/src/infer/opaque_types/mod.rs#L97.
I changed it in a later commit to register hidden types unconditionally.
cb4b2d1
to
d42e39f
Compare
d42e39f
to
0dc006b
Compare
type_flags(ReError) | HAS_ERROR
type_flags(ReError) & HAS_ERROR
Cool, I like this consistency fix @bors r+ rollup (only affects error code) |
…rors make `type_flags(ReError) & HAS_ERROR` Self-explanatory. `TypeVisitableExt::references_error(ReError)` incorrectly returned `false`.
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#122545 (Ignore paths from expansion in `unused_qualifications`) - rust-lang#122644 (pattern analysis: add a custom test harness) - rust-lang#122696 (Add bare metal riscv32 target.) - rust-lang#122729 (Relax SeqCst ordering in standard library.) - rust-lang#122740 (use more accurate terminology) - rust-lang#122749 (make `type_flags(ReError) & HAS_ERROR`) - rust-lang#122764 (coverage: Remove incorrect assertions from counter allocation) - rust-lang#122765 (Add `usize::MAX` arg tests for Vec) - rust-lang#122776 (Rename `hir::Let` into `hir::LetExpr`) - rust-lang#122786 (compiletest: Introduce `remove_and_create_dir_all()` helper) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - rust-lang#122545 (Ignore paths from expansion in `unused_qualifications`) - rust-lang#122729 (Relax SeqCst ordering in standard library.) - rust-lang#122740 (use more accurate terminology) - rust-lang#122749 (make `type_flags(ReError) & HAS_ERROR`) - rust-lang#122764 (coverage: Remove incorrect assertions from counter allocation) - rust-lang#122765 (Add `usize::MAX` arg tests for Vec) - rust-lang#122776 (Rename `hir::Let` into `hir::LetExpr`) - rust-lang#122786 (compiletest: Introduce `remove_and_create_dir_all()` helper) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#122749 - aliemjay:region-err, r=compiler-errors make `type_flags(ReError) & HAS_ERROR` Self-explanatory. `TypeVisitableExt::references_error(ReError)` incorrectly returned `false`.
add 2 more tests for issues fixed by rust-lang#122749 Fixes rust-lang#121807 Fixes rust-lang#122098
…iaskrgr Rollup of 11 pull requests Successful merges: - rust-lang#121881 (std::net: adding acceptfilter feature for netbsd/freebsd.) - rust-lang#122817 (Doc Guarantee: BTree(Set|Map): `IntoIter` Iterate in Sorted by key Order) - rust-lang#122826 (Add tests for shortcomings of associated type bounds) - rust-lang#122829 (Implement `FusedIterator` for `gen` block) - rust-lang#122831 (make failure logs less verbose) - rust-lang#122837 (add test for rust-lang#122549) - rust-lang#122838 (Avoid noop rewrite of issues.txt) - rust-lang#122841 (add 2 more tests for issues fixed by rust-lang#122749) - rust-lang#122843 (Add a never type option to make diverging blocks `()`) - rust-lang#122844 (add test for ice "cannot relate region: LUB(ReErased, ReError)") - rust-lang#122845 (Clippy subtree update) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#122841 - matthiaskrgr:moretests, r=wesleywiser add 2 more tests for issues fixed by rust-lang#122749 Fixes rust-lang#121807 Fixes rust-lang#122098
Self-explanatory.
TypeVisitableExt::references_error(ReError)
incorrectly returnedfalse
.