Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5698a58

Browse files
committedNov 24, 2023
Auto merge of rust-lang#118247 - spastorino:type-equality-subtyping, r=<try>
Fix for TypeId exposes equality-by-subtyping vs normal-form-syntactic-equality unsoundness Fixes rust-lang#97156 This PR revives rust-lang#97427 idea, it sits on top of rust-lang#118118 because the idea uncovered some problems with IATs. r? `@lcnr` This is ICEing yet for `tests/ui/traits/new-solver/escaping-bound-vars-in-writeback-normalization.rs` using the new trait solver. After rust-lang#118118 and this ICE is fixed, we would need a rebase and a crater run. Opening as a WIP for now.
2 parents 42ae1a7 + 3679fde commit 5698a58

File tree

63 files changed

+373
-387
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+373
-387
lines changed
 

‎tests/ui/coherence/coherence-fn-implied-bounds.stderr

-20
This file was deleted.

‎tests/ui/coherence/coherence-fn-inputs.rs

+3-9
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,11 @@
99
//
1010
// * `'c` can be the intersection of `'a` and `'b` (and there is always an intersection)
1111
// * `'a` and `'b` can both be equal to `'c`
12+
//
13+
// check-pass
1214

1315
trait Trait {}
1416
impl Trait for for<'a, 'b> fn(&'a u32, &'b u32) {}
15-
impl Trait for for<'c> fn(&'c u32, &'c u32) {
16-
//~^ ERROR conflicting implementations
17-
//
18-
// Note in particular that we do NOT get a future-compatibility warning
19-
// here. This is because the new leak-check proposed in [MCP 295] does not
20-
// "error" when these two types are equated.
21-
//
22-
// [MCP 295]: https://github.com/rust-lang/compiler-team/issues/295
23-
}
17+
impl Trait for for<'c> fn(&'c u32, &'c u32) {}
2418

2519
fn main() {}

‎tests/ui/coherence/coherence-fn-inputs.stderr

-13
This file was deleted.
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.