aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/rust-lang.cc
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-10-22 10:15:12 +0000
committerGitHub <noreply@github.com>2021-10-22 10:15:12 +0000
commit86ec0383d45b3339edd0583452d8bc3a0a3cddca (patch)
treea9e36801352ce3ee308f18c78a2221000d1c1752 /gcc/rust/rust-lang.cc
parent2cd9855d914e760f4c74ac01ad2f7e9378cd80fa (diff)
parentd755769bd15209193d1c178862ed3e01ba5c3d9d (diff)
parentb538aa91056a10b31c54580316c49c764f884d67 (diff)
parentd17b799df72e7d5dc6379b8e46f5188c2981faed (diff)
parentef70f0310a6739727ee97cd4f996f8938b0e6a1d (diff)
downloadgcc-86ec0383d45b3339edd0583452d8bc3a0a3cddca.zip
gcc-86ec0383d45b3339edd0583452d8bc3a0a3cddca.tar.gz
gcc-86ec0383d45b3339edd0583452d8bc3a0a3cddca.tar.bz2
Merge #757 #758 #759 #760
757: Fix TypePath resolution to iterate segments r=philberty a=philberty Associated types in rust can be of the form: ```rust trait Foo { type A; ... } fn test<T:Foo>(a:T) -> T::A { .. } ``` Where the type-bound of Foo is applied to T this allows for a the associated type T::A to exist which is a placeholder type within the trait definition. This path cannot be resolved at name-resolution time and requires a path probe. Fixes #746 758: The number of required substituions is offset from inherited ones r=philberty a=philberty When doing HIR::GenericArgs substitutions we must offset from the already partially substituted arguments. 759: Remove second lookup for query compiled functions r=philberty a=philberty This cleans up the code here to make use of the query based compilation which returns the address of the function which removes extra lookups. 760: Cleanup lookup interfaces r=philberty a=philberty These patches change the associated impl mapping's to use a boolean return type for error handling, to stop looking for UNKNOWN_HIRID for error handling which is too easy to make mistakes with. It also updates instances of code to use TyTy::ErrorType node instead of nullptr's for error handling. Co-authored-by: Philip Herron <philip.herron@embecosm.com>