-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Implement some more new solver candidates and fix some bugs #107061
Merged
bors
merged 6 commits into
rust-lang:master
from
compiler-errors:new-solver-new-candidates-3
Jan 21, 2023
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
280f69d
Fix IndexVec::drain_enumerated
compiler-errors c9c8e29
HACK: self ty ambiguity hack
compiler-errors aee75f2
Assert goal is fully normalized during assemble
compiler-errors f53f5b4
swap Ambiguity and Unimplemented in new trait engine
compiler-errors 69890b2
trait solver: PointerSized
compiler-errors ed6aebb
trait solver: Implement Fn traits and tuple trait
compiler-errors 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 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 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 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 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 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 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 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,15 @@ | ||
// compile-flags: -Ztrait-solver=next | ||
// known-bug: unknown | ||
// failure-status: 101 | ||
// dont-check-compiler-stderr | ||
|
||
// This test will fail until we fix `FulfillmentCtxt::relationships`. That's | ||
// because we create a type variable for closure upvar types, which is not | ||
// constrained until after we try to do fallback on diverging type variables. | ||
// Thus, we will call that function, which is unimplemented. | ||
|
||
fn require_fn(_: impl Fn() -> i32) {} | ||
|
||
fn main() { | ||
require_fn(|| -> i32 { 1i32 }); | ||
} |
This file contains 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,13 @@ | ||
// compile-flags: -Ztrait-solver=next | ||
// check-pass | ||
|
||
fn require_fn(_: impl Fn() -> i32) {} | ||
|
||
fn f() -> i32 { | ||
1i32 | ||
} | ||
|
||
fn main() { | ||
require_fn(f); | ||
require_fn(f as fn() -> i32); | ||
} |
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.
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.
assembly can now always ICE on
Bound
andInfer(TyVar)
so that it's clearer why we don't have to consider stuff ambig for infer vars