diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-02-28 17:17:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-28 17:17:25 +0100 |
| commit | 76fe44928281ae6f1ffe881712e02fb2358a4883 (patch) | |
| tree | f3f229177d5a6e3cd1c0d31de5da10aa420853fb /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs | |
| parent | bbf6eec2816d8ce34d2ae51b40e4bb9425b8f65e (diff) | |
| parent | 6672a047188c1590f13ec9b6dd1b00b35d2bd9c9 (diff) | |
| download | rust-76fe44928281ae6f1ffe881712e02fb2358a4883.tar.gz rust-76fe44928281ae6f1ffe881712e02fb2358a4883.zip | |
Rollup merge of #69340 - Centril:self-ctor-normalize, r=nikomatsakis
instantiate_value_path: on `SelfCtor`, avoid unconstrained tyvars Fixes https://github.com/rust-lang/rust/issues/69306. On `Self(...)` (that is, a `Res::SelfCtor`), do not use `self.impl_self_ty(...)`. The problem with that method is that it creates unconstrained inference variables for type parameters in the `impl` (e.g. `impl<T> S0<T>`). These variables then eventually get substituted for something else when they come in contact with the expected type (e.g. `S0<u8>`) or merely the arguments passed to the tuple constructor (e.g. the `0` in `Self(0)`). Instead of using `self.impl_self_ty(...)`, we instead merely use `let ty = self.normalize_ty(span, tcx.at(span).type_of(impl_def_id));` to get the rewritten `res`. r? @eddyb
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions
