diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/coherence/coherence-fn-inputs.rs | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/coherence/coherence-fn-inputs.rs')
-rw-r--r-- | src/test/ui/coherence/coherence-fn-inputs.rs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/test/ui/coherence/coherence-fn-inputs.rs b/src/test/ui/coherence/coherence-fn-inputs.rs deleted file mode 100644 index 3afec5c54..000000000 --- a/src/test/ui/coherence/coherence-fn-inputs.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Test that we consider these two types completely equal: -// -// * `for<'a, 'b> fn(&'a u32, &'b u32)` -// * `for<'c> fn(&'c u32, &'c u32)` -// -// For a long time we considered these to be distinct types. But in fact they -// are equivalent, if you work through the implications of subtyping -- this is -// because: -// -// * `'c` can be the intersection of `'a` and `'b` (and there is always an intersection) -// * `'a` and `'b` can both be equal to `'c` - -trait Trait {} -impl Trait for for<'a, 'b> fn(&'a u32, &'b u32) {} -impl Trait for for<'c> fn(&'c u32, &'c u32) { - //~^ ERROR conflicting implementations - // - // Note in particular that we do NOT get a future-compatibility warning - // here. This is because the new leak-check proposed in [MCP 295] does not - // "error" when these two types are equated. - // - // [MCP 295]: https://github.com/rust-lang/compiler-team/issues/295 -} - -fn main() {} |