-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add more well-known traits - Use the correct binders when lowering trait objects - Use correct substs when lowering trait objects - Use the correct binders for opaque_ty_data - Lower negative impls with the correct polarity - Supply associated type values - Use `predicates_defined_on` for where clauses
- Loading branch information
1 parent
299a65f
commit acb6a06
Showing
4 changed files
with
161 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// check-pass | ||
// compile-flags: -Z chalk | ||
|
||
fn main() { | ||
1 + 2; | ||
3 * 6; | ||
2 - 5; | ||
17 / 6; | ||
23 % 11; | ||
4 & 6; | ||
7 | 15; | ||
4 << 7; | ||
123 >> 3; | ||
1 == 2; | ||
5 != 5; | ||
6 < 2; | ||
7 > 11; | ||
3 <= 1; | ||
9 >= 14; | ||
} |
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 @@ | ||
// check-pass | ||
// compile-flags: -Z chalk | ||
|
||
use std::fmt::Display; | ||
|
||
fn main() { | ||
let d: &dyn Display = &mut 3; | ||
// FIXME(chalk) should be able to call d.to_string() as well, but doing so | ||
// requires Chalk to be able to prove trait object well-formed goals. | ||
(&d).to_string(); | ||
let f: &dyn Fn(i32) -> _ = &|x| x + x; | ||
f(2); | ||
} |