diff options
author | bors <bors@rust-lang.org> | 2023-04-25 22:11:09 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2023-04-25 22:11:09 +0000 |
commit | f33379b0a6485b7d0e5894b003d849778b80afd3 (patch) | |
tree | dfe5c844cbd437ee3ade1cc292f6af316a2fd017 /compiler/rustc_middle/src/ty | |
parent | 458d4dae845ec155b285681a5b88305641abb868 (diff) | |
parent | bb99cdc7cd3f2c0b1ab533735604ade7c2fdf9ad (diff) | |
download | rust-f33379b0a6485b7d0e5894b003d849778b80afd3.tar.gz |
Auto merge of #110811 - compiler-errors:vars-are-question-mark, r=WaffleLapkin
Use `?0` notation for ty/ct/int/float/region vars
Aligns the notation for infer vars that T-types and friends most often uses for inference variables with the notation in the compiler (which is kinda a sigil nightmare IMO: `_#`) by adopting `?0` style infer vars.
This mostly affects debug output since verbose infer vars shouldn't show up in user-facing places.
Does this need an MCP? It's debug output, so I'm thinking no, but happy to open one. :thinking:
r? types
Diffstat (limited to 'compiler/rustc_middle/src/ty')
-rw-r--r-- | compiler/rustc_middle/src/ty/structural_impls.rs | 2 | ||||
-rw-r--r-- | compiler/rustc_middle/src/ty/sty.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/ty/structural_impls.rs b/compiler/rustc_middle/src/ty/structural_impls.rs index a2611022406..b35b514d795 100644 --- a/compiler/rustc_middle/src/ty/structural_impls.rs +++ b/compiler/rustc_middle/src/ty/structural_impls.rs @@ -95,7 +95,7 @@ impl<'tcx> fmt::Debug for ty::FnSig<'tcx> { impl<'tcx> fmt::Debug for ty::ConstVid<'tcx> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "_#{}c", self.index) + write!(f, "?{}c", self.index) } } diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index 29ae42be096..82dec7d98ad 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -1436,7 +1436,7 @@ pub struct ConstVid<'tcx> { rustc_index::newtype_index! { /// A **region** (lifetime) **v**ariable **ID**. #[derive(HashStable)] - #[debug_format = "'_#{}r"] + #[debug_format = "'?{}"] pub struct RegionVid {} } |