1. 22 8月, 2021 5 次提交
    • J
      Rollup merge of #88072 - kit-981:feature/build-ios-toolchain-on-linux, r=Mark-Simulacrum · 5ffff5cc
      Jack Huey 提交于
      Allow the iOS toolchain to be built on Linux
      
      The iOS toolchain can be built on Linux with minor changes. The compilation will invoke `xcrun` to find the path to the iPhone SDK but a fake `xcrun` executable can be used.
      
      ```
      #!/bin/sh
      echo "/path/to/sdk"
      ```
      
      The iOS toolchain can then be built and linked with rustup.
      
      ```
      $ ./x.py build --stage 2 --host x86_64-unknown-linux-gnu \
        	 --target aarch64-apple-ios
      $ rustup toolchain link stage1 build/x86_64-unknown-linux-gnu/stage1
      ```
      
      It's possible to take this toolchain and compile an iOS executable with it. This requires the ld64 linker and an iOS SDK. The ld64 linker can be taken from [cctools](https://github.com/tpoechtrager/cctools-port). A project's .cargo/config can then be edited to use the linker for this target.
      
      ```
      [target.aarch64-apple-ios]
      linker = "/path/to/cctools/bin/arm-apple-darwin-ld"
      rustflags = [
          "-C",
          """
      link-args=
          -F/path/to/sdk/System/Library/Frameworks
          -L/path/to/sdk/usr/lib
          -L/path/to/sdk/usr/lib/system/
          -adhoc_codesign
          """,
      ]
      ```
      5ffff5cc
    • J
      Rollup merge of #88057 - ehuss:releases-doc-macros, r=Mark-Simulacrum · 9e8b143e
      Jack Huey 提交于
      Update RELEASES to clarify attribute macro values.
      
      As noted in #87681, macros do not work with the `#[path]` attribute.  Since the places where macros *can* be used is very limited, I have changed this to just focus on `#[doc]` which is the only attribute where this is really useful.
      9e8b143e
    • J
      Rollup merge of #87604 - yaymukund:verify-backported-commits, r=Mark-Simulacrum · 8660e3d1
      Jack Huey 提交于
      CI: Verify commits in beta & stable are in upstream branches.
      
      Closes #74721
      
      I think this does the trick. https://github.com/rust-lang/rust/pull/87597 is an example of it failing as it should.
      8660e3d1
    • B
      Auto merge of #88135 - crlf0710:trait_upcasting_part_3, r=nikomatsakis · d3e2578c
      bors 提交于
      Trait upcasting coercion (part 3)
      
      By using separate candidates for each possible choice, this fixes type-checking issues in previous commits.
      
      r? `@nikomatsakis`
      d3e2578c
    • B
      Auto merge of #82776 - jyn514:extern-url-fallback, r=GuillaumeGomez · b1928aa3
      bors 提交于
      Give precedence to `html_root_url` over `--extern-html-root-url` by default, but add a way to opt-in to the previous behavior
      
      ## What is an HTML root url?
      
      It tells rustdoc where it should link when documentation for a crate is
      not available locally; for example, when a crate is a dependency of a
      crate documented with `cargo doc --no-deps`.
      
       ## What is the difference between `html_root_url` and `--extern-html-root-url`?
      
      Both of these tell rustdoc what the HTML root should be set to.
      `doc(html_root_url)` is set by the crate author, while
      `--extern-html-root-url` is set by the person documenting the crate.
      These are often different. For example, docs.rs uses
      `--extern-html-root-url https://docs.rs/crate-name/version` to ensure
      all crates have documentation, even if `html_root_url` is not set.
      Conversely, crates such as Rocket set `doc(html_root_url =
      "https://api.rocket.rs")`, because they prefer users to view the
      documentation on their own site.
      
      Crates also set `html_root_url` to ensure they have
      documentation when building locally when offline. This is unfortunate to
      require, because it's more work from the library author. It also makes
      it impossible to distinguish between crates that want to be viewed on a
      different site (e.g. Rocket) and crates that just want documentation to
      be visible offline at all (e.g. Tokio). I have authored a separate
      change to the API guidelines to no longer recommend doing this:
      rust-lang/api-guidelines#230.
      
       ## Why change the default?
      
      In the past, docs.rs has been the main user of `--extern-html-root-url`.
      However, it's useful for other projects as well. In particular, Cargo
      wants to pass it by default when running `--no-deps`
      (rust-lang/cargo#8296).
      
      Unfortunately, for these other use cases, the priority order is
      inverted. They want to give *precedence* to the URL the crate picks, and
      only fall back to the `--extern-html-root` if no `html_root_url` is
      present. That allows passing `--extern-html-root` unconditionally,
      without having to parse the source code to see what attributes are
      present.
      
      For docs.rs, however, we still want to keep the old behavior, so that
      all links on docs.rs stay on the site.
      b1928aa3
  2. 21 8月, 2021 13 次提交
  3. 20 8月, 2021 22 次提交