-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type alias impl trait types do not check bounds apply to concrete type #73035
Comments
Just a curious bystander: the provided example no longer prints random values ( |
The first example is UB so it may be target/optimization level dependent. This will be fixed once the ICE is gone. |
For my understanding: the point is that values for |
…nikomatsakis Separate projection bounds and predicates Follow up to rust-lang#72788. - Rename `projection_predicates` to `item_bounds` - Separate bounds on associated types (the things after the `:` in `type X: ...`) and opaque types (the things after `impl`) from predicates. - Projection candidates now have the correct nested obligations - Trait object candidates now check that the associated types on the trait object satisfy their bounds as nested obligations - Type alias impl trait types are now checked (rust-lang#73035) - `feature(generic_associated_types)` no longer changes how we handle bounds (rust-lang#73816) Opening for a perf and crater runs. r? `@nikomatsakis`
Both of the examples in this issue now error with #73905 merged |
This is tested in src/test/ui/type-alias-impl-trait/bounds-are-checked.rs already. Ideally we would not allow |
The following code runs and prints random values:
ICE using the same issue
The text was updated successfully, but these errors were encountered: