1
Fork 0

Match unmatched backticks in comments in compiler/

This commit is contained in:
est31 2023-03-03 04:15:15 +01:00
parent ff2c609d66
commit 6df5ae4fb0
24 changed files with 28 additions and 25 deletions

View file

@ -74,7 +74,7 @@ impl<'tcx> ConstMutationChecker<'_, 'tcx> {
//
// `unsafe { *FOO = 0; *BAR.field = 1; }`
// `unsafe { &mut *FOO }`
// `unsafe { (*ARRAY)[0] = val; }
// `unsafe { (*ARRAY)[0] = val; }`
if !place.projection.iter().any(|p| matches!(p, PlaceElem::Deref)) {
let source_info = self.body.source_info(location);
let lint_root = self.body.source_scopes[source_info.scope]

View file

@ -407,7 +407,7 @@ impl<'a, 'tcx> CoverageSpans<'a, 'tcx> {
if self.prev().is_macro_expansion() && self.curr().is_macro_expansion() {
// Macros that expand to include branching (such as
// `assert_eq!()`, `assert_ne!()`, `info!()`, `debug!()`, or
// `trace!()) typically generate callee spans with identical
// `trace!()`) typically generate callee spans with identical
// ranges (typically the full span of the macro) for all
// `BasicBlocks`. This makes it impossible to distinguish
// the condition (`if val1 != val2`) from the optional

View file

@ -248,7 +248,7 @@ fn mir_const_qualif(tcx: TyCtxt<'_>, def: ty::WithOptConstParam<LocalDefId>) ->
// N.B., this `borrow()` is guaranteed to be valid (i.e., the value
// cannot yet be stolen), because `mir_promoted()`, which steals
// from `mir_const(), forces this query to execute before
// from `mir_const()`, forces this query to execute before
// performing the steal.
let body = &tcx.mir_const(def).borrow();

View file

@ -68,8 +68,11 @@ fn lower_slice_len_call<'tcx>(
ty::FnDef(fn_def_id, _) if fn_def_id == &slice_len_fn_item_def_id => {
// perform modifications
// from something like `_5 = core::slice::<impl [u8]>::len(move _6) -> bb1`
// into `_5 = Len(*_6)
// into:
// ```
// _5 = Len(*_6)
// goto bb1
// ```
// make new RValue for Len
let deref_arg = tcx.mk_place_deref(arg);