Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Rust supports overriding traits #5948

Open
wants to merge 34 commits into
base: master
Choose a base branch
from

Conversation

MikaelMayer
Copy link
Member

@MikaelMayer MikaelMayer commented Nov 30, 2024

Fixes #5972

Description

In #5940 it supported datatype traits but not when traits were implementing methods of other traits. This PR fixes that.

How has this been tested?

The test traits-datatypes.dfy tests this

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

MikaelMayer and others added 30 commits November 21, 2024 13:42
Fixed support for hashing and equality for traits overrides
Support for static functions and methods
# Conflicts:
#	Source/DafnyCore/Backends/Dafny/AST.dfy
#	Source/DafnyCore/Backends/Dafny/DafnyCodeGenerator.cs
#	Source/DafnyCore/Backends/Rust/Dafny-compiler-rust-definitions.dfy
#	Source/DafnyCore/Backends/Rust/Dafny-compiler-rust-rast.dfy
#	Source/DafnyCore/Backends/Rust/Dafny-compiler-rust.dfy
#	Source/DafnyCore/Backends/SinglePassCodeGenerator/SinglePassCodeGenerator.cs
#	Source/DafnyCore/GeneratedFromDafny/DAST.cs
#	Source/DafnyCore/GeneratedFromDafny/DCOMP.cs
#	Source/DafnyCore/GeneratedFromDafny/Defs.cs
#	Source/DafnyCore/GeneratedFromDafny/RAST.cs
#	Source/DafnyRuntime/DafnyRuntimeRust/src/lib.rs
#	Source/DafnyRuntime/DafnyRuntimeRust/src/tests/mod.rs
#	Source/IntegrationTests/TestFiles/LitTests/LitTest/comp/rust/traits-datatypes.dfy
#	Source/IntegrationTests/TestFiles/LitTests/LitTest/comp/rust/traits-datatypes.dfy.expect
# Conflicts:
#	Source/DafnyCore.Test/GeneratedFromDafny/DefsCoverage.cs
#	Source/DafnyCore/Backends/Rust/Dafny-compiler-rust-rast.dfy
#	Source/DafnyCore/Backends/Rust/Dafny-compiler-rust.dfy
#	Source/DafnyCore/GeneratedFromDafny/DCOMP.cs
#	Source/DafnyCore/GeneratedFromDafny/Defs.cs
#	Source/DafnyCore/GeneratedFromDafny/RAST.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Soundness issue: Map's range not inferred to require equality for datatype to support equality
1 participant