-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #68505 - skinny121:canonicalize-const-eval-inputs, r=ni…
…komatsakis Canonicalize inputs to const eval where needed Canonicalize inputs to const eval, so that they can contain inference variables. Which enables invoking const eval queries even if the current param env has inference variable within it, which can occur during trait selection. This is a reattempt of #67717, in a far less invasive way. Fixes #68477 r? @nikomatsakis cc @eddyb
- Loading branch information
Showing
8 changed files
with
94 additions
and
62 deletions.
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
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,23 @@ | ||
// edition:2018 | ||
// revisions:rpass1 | ||
#![feature(const_generics)] | ||
|
||
const FOO: usize = 1; | ||
|
||
struct Container<T> { | ||
val: std::marker::PhantomData<T>, | ||
blah: [(); FOO] | ||
} | ||
|
||
async fn dummy() {} | ||
|
||
async fn foo() { | ||
let a: Container<&'static ()>; | ||
dummy().await; | ||
} | ||
|
||
fn is_send<T: Send>(_: T) {} | ||
|
||
fn main() { | ||
is_send(foo()); | ||
} |