-
Notifications
You must be signed in to change notification settings - Fork 15
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 #415 from Nadrieril/mismatched-trait-refs
- Loading branch information
Showing
9 changed files
with
131 additions
and
69 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,42 @@ | ||
error: Mismatched generics: | ||
expected: GenericParams { regions: [], types: [Some(TypeVar { index: 0, name: "T" })], const_generics: [], trait_clauses: [Some(TraitClause { clause_id: 0, span: Some(Span { span: RawSpan { file_id: 0, beg: Loc { line: 12, col: 5 }, end: Loc { line: 12, col: 6 }, rust_span_data: tests/ui/issue-369-mismatched-genericparams.rs:12:6: 12:7 (#0) }, generated_from_span: None }), origin: WhereClauseOnImpl, trait_: RegionBinder { regions: [], skip_binder: TraitDeclRef { trait_id: 2, generics: GenericArgs { regions: [], types: [Some(TypeVar(0))], const_generics: [], trait_refs: [] } } } })], regions_outlive: [], types_outlive: [], trait_type_constraints: [] } | ||
got: GenericArgs { regions: [], types: [Some(TypeVar(0))], const_generics: [], trait_refs: [Some(TraitRef { kind: Clause(0), trait_decl_ref: RegionBinder { regions: [], skip_binder: TraitDeclRef { trait_id: 2, generics: GenericArgs { regions: [], types: [Some(TypeVar(0))], const_generics: [], trait_refs: [] } } } }), Some(TraitRef { kind: Clause(0), trait_decl_ref: RegionBinder { regions: [], skip_binder: TraitDeclRef { trait_id: 2, generics: GenericArgs { regions: [], types: [Some(TypeVar(0))], const_generics: [], trait_refs: [] } } } })] } | ||
--> tests/ui/issue-369-mismatched-genericparams.rs:8:1 | ||
| | ||
8 | / impl<T> Try for Option<T> { | ||
9 | | type Residual = (); | ||
10 | | } | ||
| |_^ | ||
|
||
error: aborting due to 1 previous error | ||
|
||
Error: Charon driver exited with code 101 | ||
# Final LLBC before serialization: | ||
|
||
trait core::marker::Sized<Self> | ||
|
||
trait test_crate::FromResidual<Self, R> | ||
{ | ||
parent_clause0 : [@TraitClause0]: core::marker::Sized<R> | ||
} | ||
|
||
trait test_crate::Try<Self> | ||
{ | ||
parent_clause0 : [@TraitClause0]: test_crate::FromResidual<Self, ()> | ||
parent_clause1 : [@TraitClause1]: core::marker::Sized<Self::Residual> | ||
type Residual | ||
} | ||
|
||
enum core::option::Option<T> | ||
where | ||
[@TraitClause0]: core::marker::Sized<T>, | ||
= | ||
| None() | ||
| Some(T) | ||
|
||
|
||
impl<T> test_crate::{impl test_crate::Try for core::option::Option<T>[@TraitClause0]}<T> : test_crate::Try<core::option::Option<T>[@TraitClause0]> | ||
where | ||
[@TraitClause0]: core::marker::Sized<T>, | ||
{ | ||
parent_clause0 = test_crate::{impl test_crate::FromResidual<test_crate::{impl test_crate::Try for core::option::Option<T>[@TraitClause0]}<T>[@TraitClause0]::Residual> for core::option::Option<T>[@TraitClause0]}#1<T>[@TraitClause0] | ||
parent_clause1 = core::marker::Sized<()> | ||
type Residual = () | ||
} | ||
|
||
impl<T> test_crate::{impl test_crate::FromResidual<test_crate::{impl test_crate::Try for core::option::Option<T>[@TraitClause0]}<T>[@TraitClause0]::Residual> for core::option::Option<T>[@TraitClause0]}#1<T> : test_crate::FromResidual<core::option::Option<T>[@TraitClause0], test_crate::{impl test_crate::Try for core::option::Option<T>[@TraitClause0]}<T>[@TraitClause0]::Residual> | ||
where | ||
[@TraitClause0]: core::marker::Sized<T>, | ||
{ | ||
parent_clause0 = core::marker::Sized<()> | ||
} | ||
|
||
|
||
|
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
//@ known-failure | ||
pub trait Try: FromResidual<()> { | ||
type Residual; | ||
} | ||
|
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