mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-21 22:34:05 +00:00
chore: fix some comments
Signed-off-by: xiaoxiangxianzi <zhaoyizheng@outlook.com>
This commit is contained in:
parent
0dcc1309d0
commit
3157114f0b
@ -151,8 +151,8 @@ toolchain.
|
|||||||
directory and uncomment the line `MSYS2_PATH_TYPE=inherit`.
|
directory and uncomment the line `MSYS2_PATH_TYPE=inherit`.
|
||||||
|
|
||||||
You could install and use MSYS2's version of git instead with `pacman`,
|
You could install and use MSYS2's version of git instead with `pacman`,
|
||||||
however this is not recommended as it's excrutiatingly slow, and not frequently
|
however this is not recommended as it's excruciatingly slow, and not frequently
|
||||||
tested for compatability.
|
tested for compatibility.
|
||||||
|
|
||||||
3. Start a MINGW64 or MINGW32 shell (depending on whether you want 32-bit
|
3. Start a MINGW64 or MINGW32 shell (depending on whether you want 32-bit
|
||||||
or 64-bit Rust) either from your start menu, or by running `mingw64.exe`
|
or 64-bit Rust) either from your start menu, or by running `mingw64.exe`
|
||||||
|
@ -75,7 +75,7 @@ pub(crate) struct FixupContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// The default amount of fixing is minimal fixing. Fixups should be turned on
|
/// The default amount of fixing is minimal fixing. Fixups should be turned on
|
||||||
/// in a targetted fashion where needed.
|
/// in a targeted fashion where needed.
|
||||||
impl Default for FixupContext {
|
impl Default for FixupContext {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
FixupContext {
|
FixupContext {
|
||||||
|
@ -592,7 +592,7 @@ impl<'a, 'b, 'tcx> TypeVerifier<'a, 'b, 'tcx> {
|
|||||||
}
|
}
|
||||||
self.cx.borrowck_context.constraints.outlives_constraints.push(constraint)
|
self.cx.borrowck_context.constraints.outlives_constraints.push(constraint)
|
||||||
}
|
}
|
||||||
// If the region is live at at least one location in the promoted MIR,
|
// If the region is live at least one location in the promoted MIR,
|
||||||
// then add a liveness constraint to the main MIR for this region
|
// then add a liveness constraint to the main MIR for this region
|
||||||
// at the location provided as an argument to this method
|
// at the location provided as an argument to this method
|
||||||
//
|
//
|
||||||
|
@ -409,7 +409,7 @@ fn const_validate_mplace<'mir, 'tcx>(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
ecx.const_validate_operand(&mplace.into(), path, &mut ref_tracking, mode)
|
ecx.const_validate_operand(&mplace.into(), path, &mut ref_tracking, mode)
|
||||||
// Instead of just reporting the `InterpError` via the usual machinery, we give a more targetted
|
// Instead of just reporting the `InterpError` via the usual machinery, we give a more targeted
|
||||||
// error about the validation failure.
|
// error about the validation failure.
|
||||||
.map_err(|error| report_validation_error(&ecx, error, alloc_id))?;
|
.map_err(|error| report_validation_error(&ecx, error, alloc_id))?;
|
||||||
inner = true;
|
inner = true;
|
||||||
|
@ -11,7 +11,7 @@ use super::HirTyLowerer;
|
|||||||
impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
|
impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
|
||||||
/// Prohibit or lint against *bare* trait object types depending on the edition.
|
/// Prohibit or lint against *bare* trait object types depending on the edition.
|
||||||
///
|
///
|
||||||
/// *Bare* trait object types are ones that aren't preceeded by the keyword `dyn`.
|
/// *Bare* trait object types are ones that aren't preceded by the keyword `dyn`.
|
||||||
/// In edition 2021 and onward we emit a hard error for them.
|
/// In edition 2021 and onward we emit a hard error for them.
|
||||||
pub(super) fn prohibit_or_lint_bare_trait_object_ty(
|
pub(super) fn prohibit_or_lint_bare_trait_object_ty(
|
||||||
&self,
|
&self,
|
||||||
|
@ -2768,7 +2768,7 @@ impl<'a> Parser<'a> {
|
|||||||
};
|
};
|
||||||
return if self.token.kind == token::CloseDelim(Delimiter::Parenthesis) {
|
return if self.token.kind == token::CloseDelim(Delimiter::Parenthesis) {
|
||||||
// We know for sure we have seen `for ($SOMETHING in $EXPR)`, so we recover the
|
// We know for sure we have seen `for ($SOMETHING in $EXPR)`, so we recover the
|
||||||
// parser state and emit a targetted suggestion.
|
// parser state and emit a targeted suggestion.
|
||||||
let span = vec![start_span, self.token.span];
|
let span = vec![start_span, self.token.span];
|
||||||
let right = self.prev_token.span.between(self.look_ahead(1, |t| t.span));
|
let right = self.prev_token.span.between(self.look_ahead(1, |t| t.span));
|
||||||
self.bump(); // )
|
self.bump(); // )
|
||||||
|
@ -806,7 +806,7 @@
|
|||||||
//!
|
//!
|
||||||
//! As a consequence, the struct *must not* be [`#[repr(packed)]`][packed].
|
//! As a consequence, the struct *must not* be [`#[repr(packed)]`][packed].
|
||||||
//!
|
//!
|
||||||
//! 3. *Structural Notice of Destruction.* You must uphold the the
|
//! 3. *Structural Notice of Destruction.* You must uphold the
|
||||||
//! [`Drop` guarantee][drop-guarantee]: once your struct is pinned, the struct's storage cannot
|
//! [`Drop` guarantee][drop-guarantee]: once your struct is pinned, the struct's storage cannot
|
||||||
//! be re-used without calling the structurally-pinned fields' destructors, as well.
|
//! be re-used without calling the structurally-pinned fields' destructors, as well.
|
||||||
//!
|
//!
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Check that the targetted element has the expected styles.
|
// Check that the targeted element has the expected styles.
|
||||||
go-to: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html#method.a_method"
|
go-to: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html#method.a_method"
|
||||||
show-text: true
|
show-text: true
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user