-
Notifications
You must be signed in to change notification settings - Fork 13.4k
some smaller DefiningOpaqueTypes::No -> Yes switches #121394
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
b54d722
Use `DefineOpaqueTypes::Yes` in diagnostics code
oli-obk 150448d
use `DefineOpaqueTypes::Yes` in rustdoc
oli-obk b8bd981
Specialization already rejects defining opaque types
oli-obk 82ceed2
Specialization can switch to `DefineOpaqueTypes::Yes` without having …
oli-obk 2247aaf
Use `DefineOpaqueTypes::Yes` where the new solver is unconditionally …
oli-obk 95948b7
Use `DefineOpaqueTypes::Yes` since we are guaranteed to error already
oli-obk 10e8bca
FRU remaining fields does not actually define opaque types
oli-obk cdcca7e
Switch `can_eq` and `can_sub` to `DefineOpaqueTypes::Yes`
oli-obk 169a045
Switch upcast projections to allowing opaque types and add a test sho…
oli-obk ba316a9
amend to Switch `can_eq` and `can_sub` to `DefineOpaqueTypes::Yes`
oli-obk 8e226e0
Add some regression tests for opaque types and const generics
oli-obk 29fba9f
Add regression test
oli-obk 0183d92
Allow defining opaque types when checking const equality bounds
oli-obk ede0556
Effects are boolean consts and don't contain opaque types
oli-obk 4e8d2f0
Add regression test
oli-obk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
tests/ui/const-generics/generic_const_exprs/opaque_type.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#![feature(generic_const_exprs, type_alias_impl_trait)] | ||
#![allow(incomplete_features)] | ||
|
||
type Foo = impl Sized; | ||
|
||
fn with_bound<const N: usize>() -> Foo | ||
where | ||
[u8; (N / 2) as usize]: Sized, | ||
{ | ||
let _: [u8; (N / 2) as Foo] = [0; (N / 2) as usize]; | ||
//~^ ERROR mismatched types | ||
//~| ERROR non-primitive cast: `usize` as `Foo` | ||
todo!() | ||
} | ||
|
||
fn main() { | ||
with_bound::<4>(); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.