mirror of https://github.com/rust-lang/rust.git
all: fix some typos
Signed-off-by: cuishuang <imcusg@gmail.com>
This commit is contained in:
parent
2f8d1a835b
commit
00fffdddd2
|
@ -1060,7 +1060,7 @@ Version 1.52.1 (2021-05-10)
|
|||
This release disables incremental compilation, unless the user has explicitly
|
||||
opted in via the newly added RUSTC_FORCE_INCREMENTAL=1 environment variable.
|
||||
|
||||
This is due to the widespread, and frequently occuring, breakage encountered by
|
||||
This is due to the widespread, and frequently occurring, breakage encountered by
|
||||
Rust users due to newly enabled incremental verification in 1.52.0. Notably,
|
||||
Rust users **should** upgrade to 1.52.0 or 1.52.1: the bugs that are detected by
|
||||
newly added incremental verification are still present in past stable versions,
|
||||
|
|
|
@ -1064,7 +1064,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
|
|||
let val_type = value.get_type();
|
||||
match (type_is_pointer(val_type), type_is_pointer(dest_ty)) {
|
||||
(false, true) => {
|
||||
// NOTE: Projecting a field of a pointer type will attemp a cast from a signed char to
|
||||
// NOTE: Projecting a field of a pointer type will attempt a cast from a signed char to
|
||||
// a pointer, which is not supported by gccjit.
|
||||
return self.cx.context.new_cast(None, self.inttoptr(value, val_type.make_pointer()), dest_ty);
|
||||
},
|
||||
|
|
|
@ -369,12 +369,12 @@ pub fn target_cpu(sess: &Session) -> &str {
|
|||
/// The list of LLVM features computed from CLI flags (`-Ctarget-cpu`, `-Ctarget-feature`,
|
||||
/// `--target` and similar).
|
||||
pub(crate) fn global_llvm_features(sess: &Session, diagnostics: bool) -> Vec<String> {
|
||||
// Features that come earlier are overriden by conflicting features later in the string.
|
||||
// Features that come earlier are overridden by conflicting features later in the string.
|
||||
// Typically we'll want more explicit settings to override the implicit ones, so:
|
||||
//
|
||||
// * Features from -Ctarget-cpu=*; are overriden by [^1]
|
||||
// * Features implied by --target; are overriden by
|
||||
// * Features from -Ctarget-feature; are overriden by
|
||||
// * Features from -Ctarget-cpu=*; are overridden by [^1]
|
||||
// * Features implied by --target; are overridden by
|
||||
// * Features from -Ctarget-feature; are overridden by
|
||||
// * function specific features.
|
||||
//
|
||||
// [^1]: target-cpu=native is handled here, other target-cpu values are handled implicitly
|
||||
|
@ -383,7 +383,7 @@ pub(crate) fn global_llvm_features(sess: &Session, diagnostics: bool) -> Vec<Str
|
|||
// FIXME(nagisa): it isn't clear what's the best interaction between features implied by
|
||||
// `-Ctarget-cpu` and `--target` are. On one hand, you'd expect CLI arguments to always
|
||||
// override anything that's implicit, so e.g. when there's no `--target` flag, features implied
|
||||
// the host target are overriden by `-Ctarget-cpu=*`. On the other hand, what about when both
|
||||
// the host target are overridden by `-Ctarget-cpu=*`. On the other hand, what about when both
|
||||
// `--target` and `-Ctarget-cpu=*` are specified? Both then imply some target features and both
|
||||
// flags are specified by the user on the CLI. It isn't as clear-cut which order of precedence
|
||||
// should be taken in cases like these.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Type Names for Debug Info.
|
||||
|
||||
// Notes on targetting MSVC:
|
||||
// Notes on targeting MSVC:
|
||||
// In general, MSVC's debugger attempts to parse all arguments as C++ expressions,
|
||||
// even if the argument is explicitly a symbol name.
|
||||
// As such, there are many things that cause parsing issues:
|
||||
|
|
|
@ -535,7 +535,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
let val =
|
||||
self.subst_from_current_frame_and_normalize_erasing_regions(constant.literal)?;
|
||||
// This can still fail:
|
||||
// * During ConstProp, with `TooGeneric` or since the `requried_consts` were not all
|
||||
// * During ConstProp, with `TooGeneric` or since the `required_consts` were not all
|
||||
// checked yet.
|
||||
// * During CTFE, since promoteds in `const`/`static` initializer bodies can fail.
|
||||
|
||||
|
|
|
@ -1228,7 +1228,7 @@ pub fn report_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
|
|||
///
|
||||
/// A custom rustc driver can skip calling this to set up a custom ICE hook.
|
||||
pub fn install_ice_hook() {
|
||||
// If the user has not explicitly overriden "RUST_BACKTRACE", then produce
|
||||
// If the user has not explicitly overridden "RUST_BACKTRACE", then produce
|
||||
// full backtraces. When a compiler ICE happens, we want to gather
|
||||
// as much information as possible to present in the issue opened
|
||||
// by the user. Compiler developers and other rustc users can
|
||||
|
|
|
@ -45,7 +45,7 @@ trait object's internal data to be accessed safely from any trait methods. This
|
|||
rule also goes for any lifetime any struct made into a trait object may have.
|
||||
|
||||
In the implementation for `dyn Person`, the `'2` lifetime representing the
|
||||
internal data was ommitted, meaning that the compiler inferred the lifetime
|
||||
internal data was omitted, meaning that the compiler inferred the lifetime
|
||||
`'static`. As a result, the implementation's `is_cool` is inferred by the
|
||||
compiler to look like this:
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@ pub(super) fn transcribe<'a>(
|
|||
} else {
|
||||
// Other variables are emitted into the output stream as groups with
|
||||
// `Delimiter::None` to maintain parsing priorities.
|
||||
// `Interpolated` is currenty used for such groups in rustc parser.
|
||||
// `Interpolated` is currently used for such groups in rustc parser.
|
||||
marker.visit_span(&mut sp);
|
||||
TokenTree::token(token::Interpolated(nt.clone()), sp)
|
||||
};
|
||||
|
|
|
@ -847,7 +847,7 @@ impl server::Span for Rustc<'_, '_> {
|
|||
/// the `quote` proc-macro. This will save the span of
|
||||
/// "hello" into the metadata of `my_proc_macro`. As a result,
|
||||
/// the body of `my_proc_macro` (after expansion) will end
|
||||
/// up containg a call that looks like this:
|
||||
/// up containing a call that looks like this:
|
||||
/// `proc_macro::Ident::new("hello", proc_macro::Span::recover_proc_macro_span(0))`
|
||||
///
|
||||
/// where `0` is the id returned by this function.
|
||||
|
|
|
@ -27,7 +27,7 @@ pub enum LoadResult<T> {
|
|||
},
|
||||
/// The file either didn't exist or was produced by an incompatible compiler version.
|
||||
DataOutOfDate,
|
||||
/// An error occured.
|
||||
/// An error occurred.
|
||||
Error {
|
||||
#[allow(missing_docs)]
|
||||
message: String,
|
||||
|
|
|
@ -935,7 +935,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
|||
/// performing that replacement, we'll turn all remaining infer type params to use their name from
|
||||
/// their definition, and replace all the `[type error]`s back to being infer so they display in
|
||||
/// the output as `_`. If we didn't go through `[type error]`, we would either show all type params
|
||||
/// by their name *or* `_`, neither of which is desireable: we want to show all types that we could
|
||||
/// by their name *or* `_`, neither of which is desirable: we want to show all types that we could
|
||||
/// infer as `_` to reduce verbosity and avoid telling the user about unnecessary type annotations.
|
||||
struct ResolvedTypeParamEraser<'tcx> {
|
||||
tcx: TyCtxt<'tcx>,
|
||||
|
|
|
@ -58,7 +58,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
|
|||
bug!("Node not an impl.");
|
||||
};
|
||||
|
||||
// Next, let's figure out the set of trait objects with implict static bounds
|
||||
// Next, let's figure out the set of trait objects with implicit static bounds
|
||||
let ty = self.tcx().type_of(*impl_def_id);
|
||||
let mut v = super::static_impl_trait::TraitObjectVisitor(FxHashSet::default());
|
||||
v.visit_ty(ty);
|
||||
|
|
Loading…
Reference in New Issue