forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
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 rust-lang#125257 - jieyouxu:rollup-11evnm9, r=jieyouxu
Rollup of 3 pull requests Successful merges: - rust-lang#125214 (Only make GAT ambiguous in `match_projection_projections` considering shallow resolvability) - rust-lang#125236 (Add tests for `-Zunpretty=expanded` ported from stringify's tests) - rust-lang#125251 (Clarify how String::leak and into_boxed_str differ ) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
13 changed files
with
1,844 additions
and
57 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
19 changes: 19 additions & 0 deletions
19
tests/ui/generic-associated-types/guide-inference-in-gat-arg-deeper.rs
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,19 @@ | ||
// Fix for <https://github.com/rust-lang/rust/issues/125196>. | ||
//@ check-pass | ||
|
||
trait Tr { | ||
type Gat<T>; | ||
} | ||
|
||
struct W<T>(T); | ||
|
||
fn foo<T: Tr>() where for<'a> &'a T: Tr<Gat<W<i32>> = i32> { | ||
let x: <&T as Tr>::Gat<W<_>> = 1i32; | ||
// Previously, `match_projection_projections` only checked that | ||
// `shallow_resolve(W<?0>) = W<?0>`. This won't prevent *all* inference guidance | ||
// from projection predicates in the environment, just ones that guide the | ||
// outermost type of each GAT constructor. This is definitely wrong, but there is | ||
// code that relies on it in the wild :/ | ||
} | ||
|
||
fn main() {} |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
data for include_bytes in ../expanded-exhaustive.rs |
Oops, something went wrong.