diff options
| author | Michael Goulet <michael@errs.io> | 2022-08-12 02:00:37 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-08-24 17:53:35 +0000 |
| commit | 4e976262a1598fa48cd08fa0e429f05299d1ae3e (patch) | |
| tree | 765187cd924729ed3dc049bc2dedf670deac2860 /compiler | |
| parent | 4a24f08ba43166cfee86d868b3fe8612aec6faca (diff) | |
| download | rust-4e976262a1598fa48cd08fa0e429f05299d1ae3e.tar.gz rust-4e976262a1598fa48cd08fa0e429f05299d1ae3e.zip | |
Call them constants instead of types
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_infer/src/infer/error_reporting/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_infer/src/infer/error_reporting/mod.rs b/compiler/rustc_infer/src/infer/error_reporting/mod.rs index 59ea1f3f9de..16cffb45f0f 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/mod.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/mod.rs @@ -1588,9 +1588,14 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> { Mismatch::Variable(infer::ExpectedFound { expected, found }), ) } + ValuePairs::Terms(infer::ExpectedFound { + expected: ty::Term::Const(_), + found: ty::Term::Const(_), + }) => (false, Mismatch::Fixed("constant")), ValuePairs::TraitRefs(_) | ValuePairs::PolyTraitRefs(_) => { (false, Mismatch::Fixed("trait")) } + ValuePairs::Regions(_) => (false, Mismatch::Fixed("lifetime")), _ => (false, Mismatch::Fixed("type")), }; let vals = match self.values_str(values) { |
