-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #559 from Nadrieril/fix-assertion
- Loading branch information
Showing
5 changed files
with
65 additions
and
14 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
45 changes: 45 additions & 0 deletions
45
charon/tests/ui/simple/supertrait-impl-with-assoc-type-constraint.out
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,45 @@ | ||
# Final LLBC before serialization: | ||
|
||
trait core::marker::Sized<Self> | ||
|
||
trait test_crate::HasAssoc<Self> | ||
{ | ||
parent_clause0 : [@TraitClause0]: core::marker::Sized<Self::Assoc> | ||
type Assoc | ||
} | ||
|
||
trait test_crate::SuperTrait<Self> | ||
|
||
trait test_crate::Trait<Self> | ||
{ | ||
parent_clause0 : [@TraitClause0]: test_crate::SuperTrait<Self> | ||
} | ||
|
||
impl<T> test_crate::{impl test_crate::SuperTrait for T}<T> : test_crate::SuperTrait<T> | ||
where | ||
[@TraitClause0]: test_crate::HasAssoc<T>, | ||
[@TraitClause1]: core::marker::Sized<T>, | ||
@TraitClause0::Assoc = (), | ||
|
||
impl<T> test_crate::{impl test_crate::Trait for T}#1<T> : test_crate::Trait<T> | ||
where | ||
[@TraitClause0]: test_crate::HasAssoc<T>, | ||
[@TraitClause1]: core::marker::Sized<T>, | ||
@TraitClause0::Assoc = (), | ||
{ | ||
parent_clause0 = test_crate::{impl test_crate::SuperTrait for T}<T>[@TraitClause0, @TraitClause1] | ||
} | ||
|
||
fn test_crate::main() | ||
{ | ||
let @0: (); // return | ||
let @1: (); // anonymous local | ||
|
||
@1 := () | ||
@0 := move (@1) | ||
@0 := () | ||
return | ||
} | ||
|
||
|
||
|
11 changes: 11 additions & 0 deletions
11
charon/tests/ui/simple/supertrait-impl-with-assoc-type-constraint.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,11 @@ | ||
trait HasAssoc { | ||
type Assoc; | ||
} | ||
|
||
trait SuperTrait {} | ||
trait Trait: SuperTrait {} | ||
|
||
impl<T> SuperTrait for T where T: HasAssoc<Assoc = ()> {} | ||
impl<T> Trait for T where T: HasAssoc<Assoc = ()> {} | ||
|
||
fn main() {} |