diff options
| author | Michael Goulet <michael@errs.io> | 2023-04-22 03:54:33 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-04-24 18:59:42 +0000 |
| commit | 794cb890dee2df982403d85a951f9414f86b6daf (patch) | |
| tree | 0ba9e925e8c0e9d50ece5adcdf2d02d863c88cb5 /compiler/rustc_middle/src/ty | |
| parent | b72460fe46a873da0c40582636c26e7675e92288 (diff) | |
| download | rust-794cb890dee2df982403d85a951f9414f86b6daf.tar.gz rust-794cb890dee2df982403d85a951f9414f86b6daf.zip | |
Consider polarity in new solver
Diffstat (limited to 'compiler/rustc_middle/src/ty')
| -rw-r--r-- | compiler/rustc_middle/src/ty/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index 42b98540ac7..8025697d6d1 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -861,6 +861,11 @@ impl<'tcx> PolyTraitPredicate<'tcx> { pub fn is_const_if_const(self) -> bool { self.skip_binder().is_const_if_const() } + + #[inline] + pub fn polarity(self) -> ImplPolarity { + self.skip_binder().polarity + } } /// `A: B` |
