diff options
| author | codehorseman <cricis@yeah.net> | 2022-03-16 20:12:30 +0800 |
|---|---|---|
| committer | codehorseman <cricis@yeah.net> | 2022-03-16 20:12:30 +0800 |
| commit | 01dbfb3eb264135c432cef223848416f90dac290 (patch) | |
| tree | 67e0a6d5e9a26aa88fe06b38651fe030d994f508 /src | |
| parent | d8e564715e0eb17130e99e8fcc92a36fce7feaf5 (diff) | |
| download | rust-01dbfb3eb264135c432cef223848416f90dac290.tar.gz rust-01dbfb3eb264135c432cef223848416f90dac290.zip | |
resolve the conflict in compiler/rustc_session/src/parse.rs
Signed-off-by: codehorseman <cricis@yeah.net>
Diffstat (limited to 'src')
28 files changed, 42 insertions, 42 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 7846c6db898..32ccca8bcdd 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -1005,7 +1005,7 @@ impl<'a> Builder<'a> { // the rustc_llvm cache. That will always work, even though it // may mean that on the next non-check build we'll need to rebuild // rustc_llvm. But if LLVM is stale, that'll be a tiny amount - // of work comparitively, and we'd likely need to rebuild it anyway, + // of work comparatively, and we'd likely need to rebuild it anyway, // so that's okay. if crate::native::prebuilt_llvm_config(self, target).is_err() { cargo.env("RUST_CHECK", "1"); diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 9cfd9f92aa7..e030e0bc1cf 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -1185,7 +1185,7 @@ impl Step for Assemble { for tool in LLVM_TOOLS { let tool_exe = exe(tool, target_compiler.host); let src_path = llvm_bin_dir.join(&tool_exe); - // When using `donwload-ci-llvm`, some of the tools + // When using `download-ci-llvm`, some of the tools // may not exist, so skip trying to copy them. if src_path.exists() { builder.copy(&src_path, &libdir_bin.join(&tool_exe)); diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 76054122d00..be965971dbb 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -2082,7 +2082,7 @@ impl Step for RustDev { } } -/// Tarball containing a prebuilt version of the build-manifest tool, intented to be used by the +/// Tarball containing a prebuilt version of the build-manifest tool, intended to be used by the /// release process to avoid cloning the monorepo and building stuff. /// /// Should not be considered stable by end users. diff --git a/src/doc/rustc/src/platform-support/armv7-unknown-linux-uclibceabi.md b/src/doc/rustc/src/platform-support/armv7-unknown-linux-uclibceabi.md index 71afca527d1..09e03e4dc6f 100644 --- a/src/doc/rustc/src/platform-support/armv7-unknown-linux-uclibceabi.md +++ b/src/doc/rustc/src/platform-support/armv7-unknown-linux-uclibceabi.md @@ -89,7 +89,7 @@ To cross compile, you'll need to: ``` * Copy the binary to your target device and run. -We specify `CC`, `CXX`, `AR`, `CFLAGS`, and `CXXFLAGS` environment variables because somtimes a project or a subproject requires the use of your `'C'` cross toolchain. Since Tomatoware has a modified sysroot we also pass via RUSTFLAGS the location of the dynamic-linker and rpath. +We specify `CC`, `CXX`, `AR`, `CFLAGS`, and `CXXFLAGS` environment variables because sometimes a project or a subproject requires the use of your `'C'` cross toolchain. Since Tomatoware has a modified sysroot we also pass via RUSTFLAGS the location of the dynamic-linker and rpath. ### Test with QEMU diff --git a/src/doc/unstable-book/src/compiler-flags/sanitizer.md b/src/doc/unstable-book/src/compiler-flags/sanitizer.md index 735521e667c..3f60caffef5 100644 --- a/src/doc/unstable-book/src/compiler-flags/sanitizer.md +++ b/src/doc/unstable-book/src/compiler-flags/sanitizer.md @@ -212,7 +212,7 @@ fn add_one(x: i32) -> i32 { #[naked] pub extern "C" fn add_two(x: i32) { - // x + 2 preceeded by a landing pad/nop block + // x + 2 preceded by a landing pad/nop block unsafe { asm!( " diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs index c0e7cd0b1f5..d55ba0a188f 100644 --- a/src/librustdoc/clean/types.rs +++ b/src/librustdoc/clean/types.rs @@ -2050,7 +2050,7 @@ crate struct Typedef { /// alias instead of the final type. This will always have the final type, regardless of whether /// `type_` came from HIR or from metadata. /// - /// If `item_type.is_none()`, `type_` is guarenteed to come from metadata (and therefore hold the + /// If `item_type.is_none()`, `type_` is guaranteed to come from metadata (and therefore hold the /// final type). crate item_type: Option<Type>, } diff --git a/src/librustdoc/formats/renderer.rs b/src/librustdoc/formats/renderer.rs index 81053042f67..2403ff4ebaa 100644 --- a/src/librustdoc/formats/renderer.rs +++ b/src/librustdoc/formats/renderer.rs @@ -13,7 +13,7 @@ crate trait FormatRenderer<'tcx>: Sized { /// Gives a description of the renderer. Used for performance profiling. fn descr() -> &'static str; - /// Whether to call `item` recursivly for modules + /// Whether to call `item` recursively for modules /// /// This is true for html, and false for json. See #80664 const RUN_ON_MODULE: bool; diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 3dbe9f735bf..3666767a9d9 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -2821,7 +2821,7 @@ fn render_call_locations(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item) { let mut it = ordered_locations.into_iter().peekable(); // An example may fail to write if its source can't be read for some reason, so this method - // continues iterating until a write suceeds + // continues iterating until a write succeeds let write_and_skip_failure = |w: &mut Buffer, it: &mut Peekable<_>| { while let Some(example) = it.next() { if write_example(&mut *w, example) { diff --git a/src/test/codegen/catch-unwind.rs b/src/test/codegen/catch-unwind.rs index b89c590add0..3ea3a24bfae 100644 --- a/src/test/codegen/catch-unwind.rs +++ b/src/test/codegen/catch-unwind.rs @@ -1,6 +1,6 @@ // compile-flags: -O -// On x86 the closure is inlined in foo() producting something like +// On x86 the closure is inlined in foo() producing something like // define i32 @foo() [...] { // tail call void @bar() [...] // ret i32 0 diff --git a/src/test/codegen/debug-column.rs b/src/test/codegen/debug-column.rs index 5d3afef5289..e61642b8e1b 100644 --- a/src/test/codegen/debug-column.rs +++ b/src/test/codegen/debug-column.rs @@ -1,4 +1,4 @@ -// Verify that debuginfo column nubmers are 1-based byte offsets. +// Verify that debuginfo column numbers are 1-based byte offsets. // // ignore-windows // compile-flags: -C debuginfo=2 diff --git a/src/test/ui/extern/extern-static-size-overflow.rs b/src/test/ui/extern/extern-static-size-overflow.rs index 30a0c445466..a96ce0cf47e 100644 --- a/src/test/ui/extern/extern-static-size-overflow.rs +++ b/src/test/ui/extern/extern-static-size-overflow.rs @@ -4,7 +4,7 @@ struct ReallyBig { } // The limit for "too big for the current architecture" is dependent on the target pointer size -// however it's artifically limited on 64 bits +// however it's artificially limited on 64 bits // logic copied from rustc_target::abi::TargetDataLayout::obj_size_bound() const fn max_size() -> usize { #[cfg(target_pointer_width = "16")] diff --git a/src/test/ui/impl-trait/multiple-lifetimes.rs b/src/test/ui/impl-trait/multiple-lifetimes.rs index 92e5ea2f49d..5407fb6dd28 100644 --- a/src/test/ui/impl-trait/multiple-lifetimes.rs +++ b/src/test/ui/impl-trait/multiple-lifetimes.rs @@ -1,4 +1,4 @@ -// Test that multiple liftimes are allowed in impl trait types. +// Test that multiple lifetimes are allowed in impl trait types. // build-pass (FIXME(62277): could be check-pass?) trait X<'x>: Sized {} diff --git a/src/tools/cargotest/main.rs b/src/tools/cargotest/main.rs index 54ff38e39db..5c33925a9ec 100644 --- a/src/tools/cargotest/main.rs +++ b/src/tools/cargotest/main.rs @@ -67,7 +67,7 @@ const TEST_REPOS: &[Test] = &[ sha: "91493fe47175076f330ce5fc518f0196c0476f56", lock: None, packages: &[], - // Test the embeded sqlite variant of diesel + // Test the embedded sqlite variant of diesel // This does not require any dependency to be present, // sqlite will be compiled as part of the build process features: Some(&["sqlite", "libsqlite3-sys/bundled"]), diff --git a/src/tools/clippy/clippy_lints/src/copies.rs b/src/tools/clippy/clippy_lints/src/copies.rs index a20aa12c9ff..e6a0162fd02 100644 --- a/src/tools/clippy/clippy_lints/src/copies.rs +++ b/src/tools/clippy/clippy_lints/src/copies.rs @@ -126,7 +126,7 @@ declare_clippy_lint! { /// Duplicate code is less maintainable. /// /// ### Known problems - /// * The lint doesn't check if the moved expressions modify values that are beeing used in + /// * The lint doesn't check if the moved expressions modify values that are being used in /// the if condition. The suggestion can in that case modify the behavior of the program. /// See [rust-clippy#7452](https://github.com/rust-lang/rust-clippy/issues/7452) /// diff --git a/src/tools/clippy/clippy_lints/src/fallible_impl_from.rs b/src/tools/clippy/clippy_lints/src/fallible_impl_from.rs index 574678b5542..088d9996516 100644 --- a/src/tools/clippy/clippy_lints/src/fallible_impl_from.rs +++ b/src/tools/clippy/clippy_lints/src/fallible_impl_from.rs @@ -86,9 +86,9 @@ fn lint_impl_body<'tcx>(cx: &LateContext<'tcx>, impl_span: Span, impl_items: &[h // check for `unwrap` if let Some(arglists) = method_chain_args(expr, &["unwrap"]) { - let reciever_ty = self.typeck_results.expr_ty(&arglists[0][0]).peel_refs(); - if is_type_diagnostic_item(self.lcx, reciever_ty, sym::Option) - || is_type_diagnostic_item(self.lcx, reciever_ty, sym::Result) + let receiver_ty = self.typeck_results.expr_ty(&arglists[0][0]).peel_refs(); + if is_type_diagnostic_item(self.lcx, receiver_ty, sym::Option) + || is_type_diagnostic_item(self.lcx, receiver_ty, sym::Result) { self.result.push(expr.span); } diff --git a/src/tools/clippy/clippy_lints/src/float_equality_without_abs.rs b/src/tools/clippy/clippy_lints/src/float_equality_without_abs.rs index ca8886228de..98aee7592ae 100644 --- a/src/tools/clippy/clippy_lints/src/float_equality_without_abs.rs +++ b/src/tools/clippy/clippy_lints/src/float_equality_without_abs.rs @@ -20,7 +20,7 @@ declare_clippy_lint! { /// /// ### Known problems /// If the user can ensure that b is larger than a, the `.abs()` is - /// technically unneccessary. However, it will make the code more robust and doesn't have any + /// technically unnecessary. However, it will make the code more robust and doesn't have any /// large performance implications. If the abs call was deliberately left out for performance /// reasons, it is probably better to state this explicitly in the code, which then can be done /// with an allow. @@ -69,7 +69,7 @@ impl<'tcx> LateLintPass<'tcx> for FloatEqualityWithoutAbs { if_chain! { - // left hand side is a substraction + // left hand side is a subtraction if let ExprKind::Binary( Spanned { node: BinOpKind::Sub, @@ -84,7 +84,7 @@ impl<'tcx> LateLintPass<'tcx> for FloatEqualityWithoutAbs { if let Res::Def(DefKind::AssocConst, def_id) = cx.qpath_res(epsilon_path, rhs.hir_id); if match_def_path(cx, def_id, &paths::F32_EPSILON) || match_def_path(cx, def_id, &paths::F64_EPSILON); - // values of the substractions on the left hand side are of the type float + // values of the subtractions on the left hand side are of the type float let t_val_l = cx.typeck_results().expr_ty(val_l); let t_val_r = cx.typeck_results().expr_ty(val_r); if let ty::Float(_) = t_val_l.kind(); diff --git a/src/tools/clippy/clippy_lints/src/only_used_in_recursion.rs b/src/tools/clippy/clippy_lints/src/only_used_in_recursion.rs index b828d9334ee..8e61f234776 100644 --- a/src/tools/clippy/clippy_lints/src/only_used_in_recursion.rs +++ b/src/tools/clippy/clippy_lints/src/only_used_in_recursion.rs @@ -224,7 +224,7 @@ pub fn is_array(ty: Ty<'_>) -> bool { /// This builds the graph of side effect. /// The edge `a -> b` means if `a` has side effect, `b` will have side effect. /// -/// There are some exmaple in following code: +/// There are some example in following code: /// ```rust, ignore /// let b = 1; /// let a = b; // a -> b diff --git a/src/tools/clippy/clippy_lints/src/suspicious_operation_groupings.rs b/src/tools/clippy/clippy_lints/src/suspicious_operation_groupings.rs index 940a8428f77..b5dd27ff80d 100644 --- a/src/tools/clippy/clippy_lints/src/suspicious_operation_groupings.rs +++ b/src/tools/clippy/clippy_lints/src/suspicious_operation_groupings.rs @@ -290,7 +290,7 @@ fn ident_swap_sugg( // used instead, in these cases. *applicability = Applicability::MaybeIncorrect; - // We arbitraily choose one side to suggest changing, + // We arbitrarily choose one side to suggest changing, // since we don't have a better guess. If the user // ends up duplicating a clause, the `logic_bug` lint // should catch it. @@ -374,19 +374,19 @@ fn strip_non_ident_wrappers(expr: &Expr) -> &Expr { } fn extract_related_binops(kind: &ExprKind) -> Option<Vec<BinaryOp<'_>>> { - append_opt_vecs(chained_binops(kind), if_statment_binops(kind)) + append_opt_vecs(chained_binops(kind), if_statement_binops(kind)) } -fn if_statment_binops(kind: &ExprKind) -> Option<Vec<BinaryOp<'_>>> { +fn if_statement_binops(kind: &ExprKind) -> Option<Vec<BinaryOp<'_>>> { match kind { ExprKind::If(ref condition, _, _) => chained_binops(&condition.kind), - ExprKind::Paren(ref e) => if_statment_binops(&e.kind), + ExprKind::Paren(ref e) => if_statement_binops(&e.kind), ExprKind::Block(ref block, _) => { let mut output = None; for stmt in &block.stmts { match stmt.kind { StmtKind::Expr(ref e) | StmtKind::Semi(ref e) => { - output = append_opt_vecs(output, if_statment_binops(&e.kind)); + output = append_opt_vecs(output, if_statement_binops(&e.kind)); }, _ => {}, } diff --git a/src/tools/clippy/clippy_lints/src/trailing_empty_array.rs b/src/tools/clippy/clippy_lints/src/trailing_empty_array.rs index c9b2ce476e8..58cc057a39e 100644 --- a/src/tools/clippy/clippy_lints/src/trailing_empty_array.rs +++ b/src/tools/clippy/clippy_lints/src/trailing_empty_array.rs @@ -10,7 +10,7 @@ declare_clippy_lint! { /// Displays a warning when a struct with a trailing zero-sized array is declared without a `repr` attribute. /// /// ### Why is this bad? - /// Zero-sized arrays aren't very useful in Rust itself, so such a struct is likely being created to pass to C code or in some other situation where control over memory layout matters (for example, in conjuction with manual allocation to make it easy to compute the offset of the array). Either way, `#[repr(C)]` (or another `repr` attribute) is needed. + /// Zero-sized arrays aren't very useful in Rust itself, so such a struct is likely being created to pass to C code or in some other situation where control over memory layout matters (for example, in conjunction with manual allocation to make it easy to compute the offset of the array). Either way, `#[repr(C)]` (or another `repr` attribute) is needed. /// /// ### Example /// ```rust diff --git a/src/tools/clippy/clippy_lints/src/trait_bounds.rs b/src/tools/clippy/clippy_lints/src/trait_bounds.rs index be9d538c362..43e0132a7ec 100644 --- a/src/tools/clippy/clippy_lints/src/trait_bounds.rs +++ b/src/tools/clippy/clippy_lints/src/trait_bounds.rs @@ -46,7 +46,7 @@ declare_clippy_lint! { /// /// ### Why is this bad? /// Duplicate bounds makes the code - /// less readable than specifing them only once. + /// less readable than specifying them only once. /// /// ### Example /// ```rust diff --git a/src/tools/clippy/clippy_lints/src/unwrap_in_result.rs b/src/tools/clippy/clippy_lints/src/unwrap_in_result.rs index 2c13f1049b5..b32be238cd5 100644 --- a/src/tools/clippy/clippy_lints/src/unwrap_in_result.rs +++ b/src/tools/clippy/clippy_lints/src/unwrap_in_result.rs @@ -83,9 +83,9 @@ impl<'a, 'tcx> Visitor<'tcx> for FindExpectUnwrap<'a, 'tcx> { fn visit_expr(&mut self, expr: &'tcx Expr<'_>) { // check for `expect` if let Some(arglists) = method_chain_args(expr, &["expect"]) { - let reciever_ty = self.typeck_results.expr_ty(&arglists[0][0]).peel_refs(); - if is_type_diagnostic_item(self.lcx, reciever_ty, sym::Option) - || is_type_diagnostic_item(self.lcx, reciever_ty, sym::Result) + let receiver_ty = self.typeck_results.expr_ty(&arglists[0][0]).peel_refs(); + if is_type_diagnostic_item(self.lcx, receiver_ty, sym::Option) + || is_type_diagnostic_item(self.lcx, receiver_ty, sym::Result) { self.result.push(expr.span); } @@ -93,9 +93,9 @@ impl<'a, 'tcx> Visitor<'tcx> for FindExpectUnwrap<'a, 'tcx> { // check for `unwrap` if let Some(arglists) = method_chain_args(expr, &["unwrap"]) { - let reciever_ty = self.typeck_results.expr_ty(&arglists[0][0]).peel_refs(); - if is_type_diagnostic_item(self.lcx, reciever_ty, sym::Option) - || is_type_diagnostic_item(self.lcx, reciever_ty, sym::Result) + let receiver_ty = self.typeck_results.expr_ty(&arglists[0][0]).peel_refs(); + if is_type_diagnostic_item(self.lcx, receiver_ty, sym::Option) + || is_type_diagnostic_item(self.lcx, receiver_ty, sym::Result) { self.result.push(expr.span); } diff --git a/src/tools/clippy/tests/lint_message_convention.rs b/src/tools/clippy/tests/lint_message_convention.rs index b4d94dc983f..dc82ba891fb 100644 --- a/src/tools/clippy/tests/lint_message_convention.rs +++ b/src/tools/clippy/tests/lint_message_convention.rs @@ -16,7 +16,7 @@ impl Message { fn new(path: PathBuf) -> Self { let content: String = std::fs::read_to_string(&path).unwrap(); // we don't want the first letter after "error: ", "help: " ... to be capitalized - // also no puncutation (except for "?" ?) at the end of a line + // also no punctuation (except for "?" ?) at the end of a line let regex_set: RegexSet = RegexSet::new(&[ r"error: [A-Z]", r"help: [A-Z]", diff --git a/src/tools/clippy/tests/ui/manual_memcpy/with_loop_counters.rs b/src/tools/clippy/tests/ui/manual_memcpy/with_loop_counters.rs index ba388a05a28..c826b082adf 100644 --- a/src/tools/clippy/tests/ui/manual_memcpy/with_loop_counters.rs +++ b/src/tools/clippy/tests/ui/manual_memcpy/with_loop_counters.rs @@ -59,7 +59,7 @@ pub fn manual_copy_with_counters(src: &[i32], dst: &mut [i32], dst2: &mut [i32]) } // make sure parentheses are added properly to bitwise operators, which have lower precedence than - // arithmetric ones + // arithmetic ones let mut count = 0 << 1; for i in 0..1 << 1 { dst[count] = src[i + 2]; diff --git a/src/tools/clippy/tests/workspace.rs b/src/tools/clippy/tests/workspace.rs index 677b4a4d569..e13efb3e016 100644 --- a/src/tools/clippy/tests/workspace.rs +++ b/src/tools/clippy/tests/workspace.rs @@ -93,7 +93,7 @@ fn test_no_deps_ignores_path_deps_in_workspaces() { output }; - // Trigger a sucessful build, so Cargo would like to cache the build result. + // Trigger a successful build, so Cargo would like to cache the build result. successful_build(); // Make sure there's no spurious rebuild when nothing changes. diff --git a/src/tools/rustfmt/src/lists.rs b/src/tools/rustfmt/src/lists.rs index 7aa0315f18c..29d75585eb7 100644 --- a/src/tools/rustfmt/src/lists.rs +++ b/src/tools/rustfmt/src/lists.rs @@ -575,7 +575,7 @@ where pub(crate) fn extract_pre_comment(pre_snippet: &str) -> (Option<String>, ListItemCommentStyle) { let trimmed_pre_snippet = pre_snippet.trim(); // Both start and end are checked to support keeping a block comment inline with - // the item, even if there are preceeding line comments, while still supporting + // the item, even if there are preceding line comments, while still supporting // a snippet that starts with a block comment but also contains one or more // trailing single line comments. // https://github.com/rust-lang/rustfmt/issues/3025 diff --git a/src/tools/rustfmt/src/types.rs b/src/tools/rustfmt/src/types.rs index 5de30129266..a49d473a13f 100644 --- a/src/tools/rustfmt/src/types.rs +++ b/src/tools/rustfmt/src/types.rs @@ -251,7 +251,7 @@ fn rewrite_segment( match **args { ast::GenericArgs::AngleBracketed(ref data) if !data.args.is_empty() => { // HACK: squeeze out the span between the identifier and the parameters. - // The hack is requried so that we don't remove the separator inside macro calls. + // The hack is required so that we don't remove the separator inside macro calls. // This does not work in the presence of comment, hoping that people are // sane about where to put their comment. let separator_snippet = context diff --git a/src/tools/tidy/src/pal.rs b/src/tools/tidy/src/pal.rs index f5ff3860afe..c5414233f09 100644 --- a/src/tools/tidy/src/pal.rs +++ b/src/tools/tidy/src/pal.rs @@ -132,7 +132,7 @@ fn check_cfgs( continue; } - let preceeded_by_doc_comment = { + let preceded_by_doc_comment = { let pre_contents = &contents[..idx]; let pre_newline = pre_contents.rfind('\n'); let pre_doc_comment = pre_contents.rfind("///"); @@ -143,7 +143,7 @@ fn check_cfgs( } }; - if preceeded_by_doc_comment { + if preceded_by_doc_comment { continue; } diff --git a/src/tools/tidy/src/style.rs b/src/tools/tidy/src/style.rs index 9861cba410d..5a061009b6b 100644 --- a/src/tools/tidy/src/style.rs +++ b/src/tools/tidy/src/style.rs @@ -396,7 +396,7 @@ pub fn check(path: &Path, bad: &mut bool) { }; suppressible_tidy_err!(err, skip_file_length, ""); } else if lines > (LINES * 7) / 10 { - // Just set it to something that doesn't trigger the "unneccessarily ignored" warning. + // Just set it to something that doesn't trigger the "unnecessarily ignored" warning. skip_file_length = Directive::Ignore(true); } |
