Address more review comments
- Add back various diagnostic methods on `Session`. It seems unfortunate to duplicate these in so many places, but in the meantime, making the API inconsistent between `Session` and `Diagnostic` also seems unfortunate. - Add back TyCtxtAt methods These will hopefully be used in the near future. - Add back `with_const`, it would need to be added soon after anyway. - Add back `split()` and `get_mut()`, they're useful.
This commit is contained in:
@@ -1208,6 +1208,11 @@ pub trait WithConstness: Sized {
|
||||
ConstnessAnd { constness, value: self }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn with_const(self) -> ConstnessAnd<Self> {
|
||||
self.with_constness(Constness::Const)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn without_const(self) -> ConstnessAnd<Self> {
|
||||
self.with_constness(Constness::NotConst)
|
||||
|
||||
Reference in New Issue
Block a user