aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.cc
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-11-25 16:12:02 +0000
committerGitHub <noreply@github.com>2021-11-25 16:12:02 +0000
commitcf913e7f2985fa5a2ab3bf8f3ba861855afe4e37 (patch)
treea56f5221c3d15ace6cdaf06abc91bd1c4dca35bf /gcc/rust/backend/rust-compile-expr.cc
parent98fb902fb3029da33c5a8d2fd4bd7d7bcb7271ee (diff)
parente532893ba43349a8dcb0374fd6e0f415fcd96fe1 (diff)
parentd0e51dca2dedf32d1d0a48d560f89e2952aee063 (diff)
downloadgcc-cf913e7f2985fa5a2ab3bf8f3ba861855afe4e37.zip
gcc-cf913e7f2985fa5a2ab3bf8f3ba861855afe4e37.tar.gz
gcc-cf913e7f2985fa5a2ab3bf8f3ba861855afe4e37.tar.bz2
Merge #821 #822
821: Always update the type context for monoprhized items except type params r=philberty a=philberty We need to update the type context type with the newly monomorphized types we guarded against ADT's and functions because they were never added before though this does not work for generic reference's to ADT's this updates the check accordingly. 822: Make TyTy::BaseType::contains_type_parameters non-virtual r=philberty a=philberty This is a second cleanup to the generic interfaces in the type system. The helper for contains type parameters is akin to asking if a type is concrete or not. If a type is not concrete ie: contains type parameters then this can be leveraged instead of adding more complexity. The TyTy::BaseType::is_concrete is already an abstract method forcing all types to implement it, this makes it much safer and fixes some bad infinite recursion bugs if we asked if a type contained type-parameters which in turn somtimes aksed if it was concrete or not which in turn again called contains_type_parameters. This cleans it all up. More cleanup to these interfaces can be done over time. Co-authored-by: Philip Herron <philip.herron@embecosm.com>