about summary refs log tree commit diff
path: root/src/test/run-pass/thinlto
diff options
context:
space:
mode:
authorMark Simulacrum <mark.simulacrum@gmail.com>2017-05-13 20:55:10 -0600
committerGitHub <noreply@github.com>2017-05-13 20:55:10 -0600
commitcfea5222268680114949777457237aae394bbfe7 (patch)
treec93ced636000535649dcf84f04304b5e37dde3d8 /src/test/run-pass/thinlto
parent27ea129dd3e8f64c80298071b4c6e31433f2bf43 (diff)
parentdc7ffbeca452e870c18354d59300562bf6536dd3 (diff)
downloadrust-cfea5222268680114949777457237aae394bbfe7.tar.gz
rust-cfea5222268680114949777457237aae394bbfe7.zip
Rollup merge of #41939 - eddyb:trait-assoc-const-default, r=petrochenkov
rustc_resolve: don't deny outer type parameters in embedded constants.

This solves a problem noted at https://github.com/rust-lang/rust/issues/29646#issuecomment-300929548, where an associated const default in a trait couldn't refer to `Self` or type parameters, due to inaccuracies in lexical scoping.

I've also allowed "embedded expressions" (`[T; expr]`,  `[x; expr]`, `typeof expr`) to refer to type parameters in scope. *However*, the typesystem still doesn't handle #34344.
Fully resolving that issue requires breaking cycles more aggressively (e.g. lazy evaluation), *even* in when the expression doesn't depend on type parameters, to type-check it at all, and then also type-level "constant projections" (in the vein of `{expr}` from const generics).
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions