about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/snippet.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-03-27 08:46:55 +0200
committerGitHub <noreply@github.com>2023-03-27 08:46:55 +0200
commit6535e66fa545acaa3c0fe015b83a2e502c10119a (patch)
tree8d982b4a968c7447561287a1ad00324ba8f0cf1c /compiler/rustc_errors/src/snippet.rs
parent2b7dc94535e2b4f922091ee1834e21a7d18ba4bf (diff)
parent1ce4b37900cf0c7f5e146b866b5a8fae2b93f9fc (diff)
downloadrust-6535e66fa545acaa3c0fe015b83a2e502c10119a.tar.gz
rust-6535e66fa545acaa3c0fe015b83a2e502c10119a.zip
Rollup merge of #109641 - compiler-errors:dont-elaborate-non-obl, r=oli-obk
Don't elaborate non-obligations into obligations

It's suspicious to elaborate a `PolyTraitRef` or `Predicate` into an `Obligation`, since the former does not have a param-env associated with it, but the latter does. This is a footgun that, while not being misused *currently* in the compiler, easily could be misused by someone less familiar with the elaborator's inner workings.

This PR just changes the API -- ideally, the elaborator wouldn't even have to deal with obligations if we're not elaborating obligations, but that would require a bit more abstraction than I could be bothered with today.
Diffstat (limited to 'compiler/rustc_errors/src/snippet.rs')
0 files changed, 0 insertions, 0 deletions