-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve handling of implicit Self parameter in AST
gcc/rust/ChangeLog: * ast/rust-item.h (Trait::self_param): Add. (Trait::Trait): Initialize self_param. (Trait::operator=): Copy self_param. (Trait::insert_implicit_self): Remove. (Trait::get_implicit_self): Add. * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): Make sure implicit self is still lowered to HIR. * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): Adjust handling of implicit self. * resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit): Add commit to Trait visitor mentioning that implicit self is not visited. * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Remove call to Trait::insert_implicit_self. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove entries. * rust/link/generic_function_0.rs: No longer expect failure. * rust/link/trait_import_0.rs: Likewise. * rust/link/trait_import_1.rs (trait Sized): Add. Signed-off-by: Owen Avery <[email protected]>
- Loading branch information
1 parent
efcf4d4
commit cc78323
Showing
9 changed files
with
21 additions
and
57 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
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
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,3 +1,6 @@ | ||
#[lang = "sized"] | ||
pub trait Sized {} | ||
|
||
#[lang = "add"] | ||
pub trait Add<Rhs = Self> { | ||
type Output; | ||
|