1. 03 3月, 2022 13 次提交
  2. 02 3月, 2022 27 次提交
    • M
      rename ErrorReported -> ErrorGuaranteed · e489a94d
      mark 提交于
      e489a94d
    • S
    • S
      update char signess for openbsd · 3768f0b8
      Sébastien Marie 提交于
      adds more archs for openbsd: arm, mips64, powerpc, powerpc64, and riscv64.
      3768f0b8
    • B
      Auto merge of #94229 - erikdesjardins:rem2, r=nikic · c42d846a
      bors 提交于
      Remove LLVM attribute removal
      
      This was necessary before, because `declare_raw_fn` would always apply
      the default optimization attributes to every declared function.
      Then `attributes::from_fn_attrs` would have to remove the default
      attributes in the case of, e.g. `#[optimize(speed)]` in a `-Os` build.
      (see [`src/test/codegen/optimize-attr-1.rs`](https://github.com/rust-lang/rust/blob/03a8cc7df1d65554a4d40825b0490c93ac0f0236/src/test/codegen/optimize-attr-1.rs#L33))
      
      However, every relevant callsite of `declare_raw_fn` (i.e. where we
      actually generate code for the function, and not e.g. a call to an
      intrinsic, where optimization attributes don't [?] matter)
      calls `from_fn_attrs`, so we can remove the attribute setting
      from `declare_raw_fn`, and rely on `from_fn_attrs` to apply the correct
      attributes all at once.
      
      r? `@ghost` (blocked on #94221)
      `@rustbot` label S-blocked
      c42d846a
    • B
      Auto merge of #94514 - matthiaskrgr:rollup-pdzn82h, r=matthiaskrgr · 2a280de6
      bors 提交于
      Rollup of 9 pull requests
      
      Successful merges:
      
       - #94464 (Suggest adding a new lifetime parameter when two elided lifetimes should match up for traits and impls.)
       - #94476 (7 - Make more use of `let_chains`)
       - #94478 (Fix panic when handling intra doc links generated from macro)
       - #94482 (compiler: fix some typos)
       - #94490 (Update books)
       - #94496 (tests: accept llvm intrinsic in align-checking test)
       - #94498 (9 - Make more use of `let_chains`)
       - #94503 (Provide C FFI types via core::ffi, not just in std)
       - #94513 (update Miri)
      
      Failed merges:
      
      r? `@ghost`
      `@rustbot` modify labels: rollup
      2a280de6
    • M
    • M
      Rollup merge of #94503 - joshtriplett:core-ffi-c, r=Amanieu · 3ea9eebb
      Matthias Krüger 提交于
      Provide C FFI types via core::ffi, not just in std
      
      Tracking issue: https://github.com/rust-lang/rust/issues/94501
      
      The ability to interoperate with C code via FFI is not limited to crates
      using std; this allows using these types without std.
      
      The existing types in `std::os::raw` become type aliases for the ones in
      `core::ffi`. This uses type aliases rather than re-exports, to allow the
      std types to remain stable while the core types are unstable.
      
      This also moves the currently unstable `NonZero_` variants and
      `c_size_t`/`c_ssize_t`/`c_ptrdiff_t` types to `core::ffi`, while leaving
      them unstable.
      
      Historically, we didn't do this because these types are target-dependent.
      However, `core` itself is also target-dependent. `core` should not call
      any OS services, but it knows the target and the target's ABI.
      3ea9eebb
    • M
      Rollup merge of #94498 - c410-f3r:chega-ja-deu, r=Dylan-DPC · 1ff654af
      Matthias Krüger 提交于
      9 - Make more use of `let_chains`
      
      Continuation of #94376.
      
      cc #53667
      1ff654af
    • M
      Rollup merge of #94496 - durin42:llvm-15-moar-intrinsic, r=nikic · aabd068f
      Matthias Krüger 提交于
      tests: accept llvm intrinsic in align-checking test
      
      This changed in upstream change https://reviews.llvm.org/D98152 (aka
      https://github.com/llvm/llvm-project/commit/a266af721153fab6452094207b09ed265ab0be7b)
      wherein LLVM got smarter about using intrinsics. As best I can tell the
      change I've made here preserves the intent of the test on LLVM 14 and
      before while also passing on LLVM 15 and later.
      aabd068f
    • M
      Rollup merge of #94490 - ehuss:update-books, r=ehuss · 823a3867
      Matthias Krüger 提交于
      Update books
      
      ## nomicon
      
      1 commits in 90993eeac93dbf9388992de92965f99cf6f29a03..f6d6126fc96ecf4a7f7d22da330df9506293b0d0
      2022-02-13 12:44:12 +0900 to 2022-02-26 02:21:21 +0900
      - ffi: explicitly declare hello_from_rust for C99 (rust-lang/nomicon#343)
      
      ## reference
      
      20 commits in 70fc73a6b908e08e66aa0306856c5211312f6c05..9d289c05fce7254b99c6a0d354d84abb7fd7a032
      2022-02-14 19:33:01 -0800 to 2022-02-23 08:58:20 -0800
      - Fix typo in `functions.md` (rust-lang/reference#1173)
      - Fix CI
      - Unify global_asm/asm directive list
      - Update src/inline-assembly.md
      - Update src/inline-assembly.md
      - Fix changes unintentional reverted in d5d3d80
      - Add note about operand interpolations
      - Sort lists, add syntax control directives
      - Add another missed batch suggestion
      - Add missed batch suggestion
      - Apply suggestions from code review
      - Add .type, .size, and .p2align
      - Reformat directive lists
      - Add `.inst` directive
      - Add missing directives
      - Add additional directives in use
      - Add `.fill` directive
      - Style fixes
      - Fix code block
      - Add supported Directives list
      
      ## book
      
      13 commits in 67b768c0b660a069a45f0e5d8ae2f679df1022ab..3f255ed40b8c82a0434088568fbed270dc31bf00
      2022-02-09 21:52:41 -0500 to 2022-02-27 21:26:12 -0500
      - Add a back reference about enum variant initializer fns. Fixes rust-lang/book#800.
      - Update ch01-03-hello-cargo.md
      - ch03-05: Add definite article for the block of code
      - Change variable names from "slice" to "values"
      - Remove reference to advanced lifetime section that no longer exists
      - Fix link to go to the right newtype section
      - Remove confusing and redundant part of a sentence about newtypes
      - Make transition less repetitive
      - Correct wording about associated functions.
      - Remove unnecessary extern crate proc_macro
      - Clarify that this code is defining, not using a procedural macro
      - Add manual regeneration steps for cargo new test
      - Update Listing 11-1 to reflect current contents
      
      ## rust-by-example
      
      11 commits in 18c0055b8aea49391e8f758a4400097999c9cf1e..2a928483a20bb306a7399c0468234db90d89afb5
      2022-01-19 08:51:55 -0300 to 2022-02-28 11:36:59 -0300
      - Update destructure_slice.md (rust-lang/rust-by-example#1513)
      - Update iter_find.md (rust-lang/rust-by-example#1512)
      - Add an example of collecting errors while iterating successes (rust-lang/rust-by-example#1509)
      - Fix broken link on asm (rust-lang/rust-by-example#1508)
      - Update abort_unwind.md (rust-lang/rust-by-example#1505)
      - Remove duplicate text in asm.md (rust-lang/rust-by-example#1506)
      - Improve asm clobber example (rust-lang/rust-by-example#1504)
      - Add +1 to next_age (rust-lang/rust-by-example#1503)
      - fix comment on into_iter() for arrays (rust-lang/rust-by-example#1502)
      - Added new Rust 1.58 direct format args (rust-lang/rust-by-example#1501)
      - documentation for cfg_panic (rust-lang/rust-by-example#1500)
      
      ## rustc-dev-guide
      
      13 commits in 62f58394ba7b203f55ac35ddcc4c0b79578f5706..32f2a5b4e7545318846185198542230170dd8a42
      2022-02-11 08:42:50 -0500 to 2022-03-01 10:45:24 -0600
      - Add architecture suggestion for Apple silicon (rust-lang/rustc-dev-guide#1320)
      - cargo timings has been stabilized (rust-lang/rustc-dev-guide#1319)
      - Add known-bug header. (rust-lang/rustc-dev-guide#1311)
      - Fix typo (rust-lang/rustc-dev-guide#1315)
      - Typo (rust-lang/rustc-dev-guide#1313)
      - instrument-coverage has been stabilized.
      - symbol-mangling-version has been stabilized
      - Fix `Ty` link (rust-lang/rustc-dev-guide#1308)
      - Edit glossary (rust-lang/rustc-dev-guide#1302)
      - Fix heading levels in the query chapter (rust-lang/rustc-dev-guide#1305)
      - Fix link
      - Edit "Queries" chapter (rust-lang/rustc-dev-guide#1301)
      - Link to The Rust Performance Book (rust-lang/rustc-dev-guide#1300)
      
      ## edition-guide
      
      1 commits in beea0a3cdc3885375342fd010f9ad658e6a5e09a..c55611dd6c58bdeb52423b5c52fd0f3c93615ba8
      2021-12-05 07:06:45 -0800 to 2022-02-21 14:21:39 +0100
      - Remove `+nightly` for `cargo new` (rust-lang/edition-guide#276)
      823a3867
    • M
      Rollup merge of #94482 - cuishuang:master, r=Dylan-DPC · cd6e53d9
      Matthias Krüger 提交于
      compiler: fix some typos
      cd6e53d9
    • M
      Rollup merge of #94478 - GuillaumeGomez:macro-generated-intra-doc-link, r=notriddle · 64e16d37
      Matthias Krüger 提交于
      Fix panic when handling intra doc links generated from macro
      
      Fixes #78591.
      Fixes #92789.
      
      r? ``@notriddle``
      64e16d37
    • M
      Rollup merge of #94476 - c410-f3r:yet-more-let-chains, r=Dylan-DPC · 42596a71
      Matthias Krüger 提交于
      7 - Make more use of `let_chains`
      
      Continuation of #94376.
      
      cc #53667
      42596a71
    • M
      Rollup merge of #94464 - kckeiks:lifetime-elision-mismatch-hint-for-traits, r=estebank · 2b72ecbb
      Matthias Krüger 提交于
      Suggest adding a new lifetime parameter when two elided lifetimes should match up for traits and impls.
      
      Suggest adding a new lifetime parameter when two elided lifetimes should match up for functions in traits and impls.
      
      Issue #94462
      2b72ecbb
    • B
      Auto merge of #87402 - nagisa:nagisa/request-feature-requests-for-features, r=estebank · 39a3b527
      bors 提交于
      Direct users towards using Rust target feature names in CLI
      
      This PR consists of a couple of changes on how we handle target features.
      
      In particular there is a bug-fix wherein we avoid passing through features that aren't prefixed by `+` or `-` to LLVM. These appear to be causing LLVM to assert, which is pretty poor a behaviour (and also makes it pretty clear we expect feature names to be prefixed).
      
      The other commit, I anticipate to be somewhat more controversial is outputting a warning when users specify a LLVM-specific, or otherwise unknown, feature name on the CLI. In those situations we request users to either replace it with a known Rust feature name (e.g. `bmi` -> `bmi1`) or file a feature request. I've a couple motivations for this: first of all, if users are specifying these features on the command line, I'm pretty confident there is also a need for these features to be usable via `#[cfg(target_feature)]` machinery.  And second, we're growing a fair number of backends recently and having ability to provide some sort of unified-ish interface in this place seems pretty useful to me.
      
      Sponsored by: standard.ai
      39a3b527
    • R
      update Miri · 50790a93
      Ralf Jung 提交于
      50790a93
    • J
      Temporarily make `CStr` not a link in the `c_char` docs · 75c3e9c2
      Josh Triplett 提交于
      When CStr moves to core with an alias in std, this can link to
      `crate::ffi::CStr`. However, linking in the reverse direction (from core
      to std) requires a relative path, and that path can't work from both
      core::ffi and std::os::raw (different number of `../` traversals
      required).
      75c3e9c2
    • J
      Provide C FFI types via core::ffi, not just in std · 335c9609
      Josh Triplett 提交于
      The ability to interoperate with C code via FFI is not limited to crates
      using std; this allows using these types without std.
      
      The existing types in `std::os::raw` become type aliases for the ones in
      `core::ffi`. This uses type aliases rather than re-exports, to allow the
      std types to remain stable while the core types are unstable.
      
      This also moves the currently unstable `NonZero_` variants and
      `c_size_t`/`c_ssize_t`/`c_ptrdiff_t` types to `core::ffi`, while leaving
      them unstable.
      335c9609
    • J
      Add a copy of cfg_if to core's internal_macros.rs · 0f505c63
      Josh Triplett 提交于
      core can't depend on external crates the way std can. Rather than revert
      usage of cfg_if, add a copy of it to core. This does not export our
      copy, even unstably; such a change could occur in a later commit.
      0f505c63
    • J
      6a838e41
    • E
      Demote Windows XP to no_std only · f2878664
      Edwin Amsler 提交于
      Modify the tier 3 non-ARM targets to show the standard library will no longer build for these and there is no work being done to change that.
      f2878664
    • C
      9 - Make more use of `let_chains` · a7b4d667
      Caio 提交于
      Continuation of #94376.
      
      cc #53667
      a7b4d667
    • A
      tests: avoid problems on 32 bit machines · 6fbef7f1
      Augie Fackler 提交于
      6fbef7f1
    • A
      tests: accept llvm intrinsic in align-checking test · 26c5d215
      Augie Fackler 提交于
      This changed in upstream change https://reviews.llvm.org/D98152 (aka
      https://github.com/llvm/llvm-project/commit/a266af721153fab6452094207b09ed265ab0be7b)
      wherein LLVM got smarter about using intrinsics. As best I can tell the
      change I've made here preserves the intent of the test on LLVM 14 and
      before while also passing on LLVM 15 and later.
      26c5d215
    • J
      Restore the local filter on mono item sorting · 723d3346
      Josh Stone 提交于
      In `CodegenUnit::items_in_deterministic_order`, there's a comment that
      only local HirIds should be taken into account, but #90408 removed the
      `as_local` call that sets others to None. Restoring that check fixes the
      s390x hangs seen in [RHBZ 2058803].
      
      [RHBZ 2058803]: https://bugzilla.redhat.com/show_bug.cgi?id=2058803
      723d3346
    • E
      Move submodule checkout before msys2 installation. · 43f83bc0
      Eric Huss 提交于
      For some reason, `tar` behaves differently in such a way that it does
      not create symlinks on Windows correctly, resulting in
      `Cannot create symlink to 'ld.gold': No such file or directory`
      errors.
      43f83bc0
    • F
      update (bless) test results · 1b08cba3
      Fausto 提交于
      1b08cba3