mirror of
https://github.com/rust-lang/rust
synced 2024-10-04 15:50:51 +00:00
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
|
This release disables incremental compilation, unless the user has explicitly
|
||||||
opted in via the newly added RUSTC_FORCE_INCREMENTAL=1 environment variable.
|
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 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
|
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,
|
newly added incremental verification are still present in past stable versions,
|
||||||
|
|
|
@ -1064,7 +1064,7 @@ fn pointercast(&mut self, value: RValue<'gcc>, dest_ty: Type<'gcc>) -> RValue<'g
|
||||||
let val_type = value.get_type();
|
let val_type = value.get_type();
|
||||||
match (type_is_pointer(val_type), type_is_pointer(dest_ty)) {
|
match (type_is_pointer(val_type), type_is_pointer(dest_ty)) {
|
||||||
(false, true) => {
|
(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.
|
// a pointer, which is not supported by gccjit.
|
||||||
return self.cx.context.new_cast(None, self.inttoptr(value, val_type.make_pointer()), dest_ty);
|
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`,
|
/// The list of LLVM features computed from CLI flags (`-Ctarget-cpu`, `-Ctarget-feature`,
|
||||||
/// `--target` and similar).
|
/// `--target` and similar).
|
||||||
pub(crate) fn global_llvm_features(sess: &Session, diagnostics: bool) -> Vec<String> {
|
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:
|
// Typically we'll want more explicit settings to override the implicit ones, so:
|
||||||
//
|
//
|
||||||
// * Features from -Ctarget-cpu=*; are overriden by [^1]
|
// * Features from -Ctarget-cpu=*; are overridden by [^1]
|
||||||
// * Features implied by --target; are overriden by
|
// * Features implied by --target; are overridden by
|
||||||
// * Features from -Ctarget-feature; are overriden by
|
// * Features from -Ctarget-feature; are overridden by
|
||||||
// * function specific features.
|
// * function specific features.
|
||||||
//
|
//
|
||||||
// [^1]: target-cpu=native is handled here, other target-cpu values are handled implicitly
|
// [^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
|
// 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
|
// `-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
|
// 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
|
// `--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
|
// 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.
|
// should be taken in cases like these.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Type Names for Debug Info.
|
// 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,
|
// In general, MSVC's debugger attempts to parse all arguments as C++ expressions,
|
||||||
// even if the argument is explicitly a symbol name.
|
// even if the argument is explicitly a symbol name.
|
||||||
// As such, there are many things that cause parsing issues:
|
// As such, there are many things that cause parsing issues:
|
||||||
|
|
|
@ -535,7 +535,7 @@ pub fn eval_operand(
|
||||||
let val =
|
let val =
|
||||||
self.subst_from_current_frame_and_normalize_erasing_regions(constant.literal)?;
|
self.subst_from_current_frame_and_normalize_erasing_regions(constant.literal)?;
|
||||||
// This can still fail:
|
// 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.
|
// checked yet.
|
||||||
// * During CTFE, since promoteds in `const`/`static` initializer bodies can fail.
|
// * 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.
|
/// A custom rustc driver can skip calling this to set up a custom ICE hook.
|
||||||
pub fn install_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
|
// full backtraces. When a compiler ICE happens, we want to gather
|
||||||
// as much information as possible to present in the issue opened
|
// as much information as possible to present in the issue opened
|
||||||
// by the user. Compiler developers and other rustc users can
|
// 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.
|
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
|
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
|
`'static`. As a result, the implementation's `is_cool` is inferred by the
|
||||||
compiler to look like this:
|
compiler to look like this:
|
||||||
|
|
||||||
|
|
|
@ -233,7 +233,7 @@ pub(super) fn transcribe<'a>(
|
||||||
} else {
|
} else {
|
||||||
// Other variables are emitted into the output stream as groups with
|
// Other variables are emitted into the output stream as groups with
|
||||||
// `Delimiter::None` to maintain parsing priorities.
|
// `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);
|
marker.visit_span(&mut sp);
|
||||||
TokenTree::token(token::Interpolated(nt.clone()), sp)
|
TokenTree::token(token::Interpolated(nt.clone()), sp)
|
||||||
};
|
};
|
||||||
|
|
|
@ -847,7 +847,7 @@ fn source_text(&mut self, span: Self::Span) -> Option<String> {
|
||||||
/// the `quote` proc-macro. This will save the span of
|
/// the `quote` proc-macro. This will save the span of
|
||||||
/// "hello" into the metadata of `my_proc_macro`. As a result,
|
/// "hello" into the metadata of `my_proc_macro`. As a result,
|
||||||
/// the body of `my_proc_macro` (after expansion) will end
|
/// 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))`
|
/// `proc_macro::Ident::new("hello", proc_macro::Span::recover_proc_macro_span(0))`
|
||||||
///
|
///
|
||||||
/// where `0` is the id returned by this function.
|
/// 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.
|
/// The file either didn't exist or was produced by an incompatible compiler version.
|
||||||
DataOutOfDate,
|
DataOutOfDate,
|
||||||
/// An error occured.
|
/// An error occurred.
|
||||||
Error {
|
Error {
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
message: String,
|
message: String,
|
||||||
|
|
|
@ -935,7 +935,7 @@ pub fn need_type_info_err_in_generator(
|
||||||
/// performing that replacement, we'll turn all remaining infer type params to use their name from
|
/// 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
|
/// 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
|
/// 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.
|
/// infer as `_` to reduce verbosity and avoid telling the user about unnecessary type annotations.
|
||||||
struct ResolvedTypeParamEraser<'tcx> {
|
struct ResolvedTypeParamEraser<'tcx> {
|
||||||
tcx: TyCtxt<'tcx>,
|
tcx: TyCtxt<'tcx>,
|
||||||
|
|
|
@ -58,7 +58,7 @@ pub(super) fn try_report_mismatched_static_lifetime(&self) -> Option<ErrorGuaran
|
||||||
bug!("Node not an impl.");
|
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 ty = self.tcx().type_of(*impl_def_id);
|
||||||
let mut v = super::static_impl_trait::TraitObjectVisitor(FxHashSet::default());
|
let mut v = super::static_impl_trait::TraitObjectVisitor(FxHashSet::default());
|
||||||
v.visit_ty(ty);
|
v.visit_ty(ty);
|
||||||
|
|
Loading…
Reference in a new issue